COMP 522 Modelling and Simulation model everything Hans Vangheluwe - - PowerPoint PPT Presentation

comp 522 modelling and simulation model everything
SMART_READER_LITE
LIVE PREVIEW

COMP 522 Modelling and Simulation model everything Hans Vangheluwe - - PowerPoint PPT Presentation

Fall Term 2006 COMP 522 Modelling and Simulation model everything Hans Vangheluwe Modelling, Simulation and Design Lab (MSDL) School of Computer Science, McGill University, Montr eal, Canada Hans Vangheluwe hv@cs.mcgill.ca


slide-1
SLIDE 1

Fall Term 2006

COMP 522 Modelling and Simulation “model everything”

Hans Vangheluwe

Modelling, Simulation and Design Lab (MSDL) School of Computer Science, McGill University, Montr´ eal, Canada

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 1/37

slide-2
SLIDE 2

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 2/37

slide-3
SLIDE 3

A Variety of Complex Systems . . .

Need to be modelled

  • at most appropriate level of abstraction
  • in most appropriate formalism(s)

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 3/37

slide-4
SLIDE 4

Available Information, Questions to be Answered, . . .

⇒ choice of Abstraction Level/Formalism

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 4/37

slide-5
SLIDE 5

Power Window

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 5/37

slide-6
SLIDE 6

Power Window: need for multiple formalisms

http://www.mathworks.com/products/demos/simulink/PowerWindow/html/PowerWindow1.html

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 6/37

slide-7
SLIDE 7

COMP 522A: Modelling and Simulation

  • . . . to study (static/dynamic) structure and (dynamic) behaviour
  • . . . for analysis and design of complex systems
  • . . . for different application domains:

computer networks, software design, traffic control, software engineering, biology, physics, chemistry, management, . . .

  • . . . implemented using Computer Science
  • . . . focus on Software Engineering

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 7/37

slide-8
SLIDE 8

Overview

  • 1. What is Modelling and Simulation ?
  • 2. Which topics does COMP 522 cover ?
  • 3. What are the pre-requisites ?
  • 4. How is evaluation done ?
  • 5. What are the assignments about ?
  • 6. Where do I get the material covered in CS522 ?

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 8/37

slide-9
SLIDE 9

What is Modelling and Simulation ?

  • Modelling: represent/re-use/exchange knowledge

about system structure and behaviour

  • Simulation: to accurately and efficiently emulate real behaviour
  • Why ?

– cost, danger, . . . – what-if analysis ? – optimization (do it right the first time) ! ⇒ modelling and simulation based design

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 9/37

slide-10
SLIDE 10

Modelling and Simulation Based Design

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 10/37

slide-11
SLIDE 11

M&S in action: Flight Simulation

www.flightgear.org

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 11/37

slide-12
SLIDE 12

M&S in action: Environment

NATO’s Sarajevo WWTP www.nato.int/sfor/cimic/env-pro/waterpla.htm

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 12/37

slide-13
SLIDE 13

M&S in action: Environment

www.hemmis.com/products/west/

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 13/37

slide-14
SLIDE 14

M&S in action: Traffic

www.engr.utexas.edu/trafficSims/

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 14/37

slide-15
SLIDE 15

M&S in action: Training

USC Institute for Creative Technologies www.ict.usc.edu

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 15/37

slide-16
SLIDE 16

M&S in action: Game AI, Physics, Narratives, . . .

www.info.ea.com/company/company tw.php

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 16/37

slide-17
SLIDE 17

Modelling and Simulation . . .

  • . . . is Computer Science, Artificial Intelligence
  • . . . is Numerical Analysis, Computer Algebra
  • . . . is Systems Theory, Control Theory
  • . . . is Operations Research
  • . . . is Application Domain: Mechanical Engineering, . . .

. . . or something more GENERIC ?

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 17/37

slide-18
SLIDE 18

Real-World entity Base Model System S

  • nly study behaviour in

experimental context experiment within context Model M Simulation Results Experiment Observed Data

within context

simulate = virtual experiment Model Base a-priori knowledge

validation

REALITY MODEL GOALS

Modelling and Simulation Process

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 18/37

slide-19
SLIDE 19

COMP 522 Concept Map

Hierarchy of System Specifications Finite State Automata (FSA) Petri Nets DEVS GPSS Event Scheduling Activity Scanning Process Interaction Discrete Event Statecharts Hybrid Continuous-Time Forrester System Dynamics Population Dynamics Modelica (multi-physics) CSSLs continuous-time CBDs discrete-time CBDs time-less CBDs Causal Block Diagrams Formalisms Animation is theory behind visualized using

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 19/37

slide-20
SLIDE 20

Which topics does the course cover ?

  • 1. Modelling formalism syntax and semantics.

The Causal Block Diagram formalisms.

I O

^−1

IC IC 4.0 K 1.0 M 1.0 V0 0.0 X0

DEP INDEP

Print

DEP INDEP

Plot TIME

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 20/37

slide-21
SLIDE 21
  • 2. Untimed Discrete Event Formalisms:

(a) (non)Deterministic State Automata. (b) Adding Concurrency and Synchronisation: Petri Nets (e.g., specifying network protocols).

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 21/37

slide-22
SLIDE 22

(c) Adding Hierarchy and Orthogonality: Statecharts (e.g., UML, specifying reactive software).

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 22/37

slide-23
SLIDE 23
  • 3. Communicating Sequential Processes (CSP/kiltera).

process sender[output]: seq print ("sender","sending","message") wait 0 -> send "message" to output -> print ("sender","sent message") process receiver[input]: seq print ("receiver","waiting for input") wait 2 -> receive msg from input -> print ("receiver","received",msg) main channel a in par sender[a] receiver[a] Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 23/37

slide-24
SLIDE 24
  • 4. Timed Discrete Event Formalisms:

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 24/37

slide-25
SLIDE 25

(a) Event Scheduling. (b) Activity Scanning. (c) Three Phase Approach. (d) Process Interaction for queueing systems (GPSS).

FN1 12 2 V2 V1 PH 1 LR PH1 V1 H 2 P2 NE P1 S PH1 LNKS R PH1 1 LR PH2 R PH1 LNKS 1 S PH2 FN1 120 Function: 1 LNKS 10

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 25/37

slide-26
SLIDE 26

(e) DEVS as a rigourous basis for hierarchical modelling.

  • 5. Deterministic Simulation of Stochastic Processes:

(a) Pseudo Random Number Generation. (b) Gathering Statistics (performance metrics).

  • 6. Animation
  • 7. Continuous-time Formalisms:

(a) Ordinary Differential Equations, Algebraic Equations, Differential Algebraic Equations. (b) CSSLs: sorting and algebraic loop detection. (c) Forrester System Dynamics, Population Dynamics.

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 26/37

slide-27
SLIDE 27

Predator Prey Grazing_efficiency uptake_predator loss_prey predator_surplus_DR prey_surplus_BR

2−species predator−prey system

predator prey

trajectories

10 20 30 200 400 600

(d) Object-oriented Physical Systems Modelling: non-causal modelling, Modelica (www.modelica.org).

  • 8. Hierarchy of System Specifications, Systems Theory.

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 27/37

slide-28
SLIDE 28

Assignments cover these topics

  • 1. A Causal Block Diagram simulation tool.
  • 2. Petri Net model and analysis.
  • 3. Statechart model and software synthesis.
  • 4. kiltera model
  • 5. GPSS (process interaction) model of a queueing system.
  • 6. A DEVS model of a traffic system.

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 28/37

slide-29
SLIDE 29

Project

  • For a formalism of choice (possibly construct your own):

build a modelling and/or simulation environment.

  • Using an existing modelling/simulation system:

study a specific problem.

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 29/37

slide-30
SLIDE 30

Exam: mini-quiz(es)

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 30/37

slide-31
SLIDE 31

What are the pre-requisites ?

  • COMP 251 (data structures and algorithms),
  • COMP 302 (programming languages and paradigms),
  • COMP 350 (numerical computing).

. . . or equivalent (see me). Note:

  • all assignment/project programming in Python (where

appropriate)

  • no prior knowledge required, read Tutorial at www.python.org

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 31/37

slide-32
SLIDE 32

How is evaluation done ?

  • 60% on assignments.
  • 30% on the project (work, correctness, presentation).
  • 10% on a mini-quiz(es).

Together, assignments, mini-quiz(es) and project cover the entire course. Hence, there is no final exam.

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 32/37

slide-33
SLIDE 33

Assignment/project rules of the game ?

  • Completely in HTML form: requirements, design, code, discussion.
  • Submit via WebCT.
  • All coding in Python www.python.org (where appropriate).
  • Assignments and projects in teams of 2. Clearly describe work

distribution !

  • Original work, some presented in class.
  • Respect deadlines (or do more work to compensate).
  • Alternate subjects may be proposed.

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 33/37

slide-34
SLIDE 34

Need help ?

  • Use the discussion forum in WebCT
  • Come and see me Monday 16:00 - 18:00 in MC328
  • See the TA (Ximeng Sun) in MC202
  • Send TA or me e-mail
  • Talk to me after class or make an appointment
  • Assignments/projects are never fully specified ! Give feedback !

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 34/37

slide-35
SLIDE 35

Undergraduate or Graduate course ?

  • Challenging course (work load)
  • ”graduate” flavour (independent thinking)
  • some of the highest grades ever were obtained by ugrads

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 35/37

slide-36
SLIDE 36

What are the project subjects ?

  • Model/simulate a particular application (e.g., traffic, biology)
  • Build a modelling/simulation/animation tool for a particular

formalism Give suggestions !

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 36/37

slide-37
SLIDE 37

Where do I get the material covered in CS522 ?

moncs.cs.mcgill.ca/people/hv/teaching/MS/

  • Class presentations/notes online in PDF format.
  • Some handouts during the term.
  • Links and references for background info.

Hans Vangheluwe hv@cs.mcgill.ca Modelling and Simulation 37/37