340 likes | 546 Views
Why building models?. Cannot experience on the real system of interest Cost Danger The real system does not exist Why using simulation? Reduced cost of computers Improved facilities of modern computers Ease to use Flexibility. M&S Entities and Relations. modeling relation. simulation
E N D
Why building models? • Cannot experience on the real system of interest • Cost • Danger • The real system does not exist Why using simulation? • Reduced cost of computers • Improved facilities of modern computers • Ease to use • Flexibility
M&S Entities and Relations modeling relation simulation relation Experimental Frame Device for executing model Real World Simulator Data: Input/output relation pairs Conditions under which the system is experimented with/observed Model Each entity can be formalized as a Mathematical Dynamic System (mathematical manipulations to prove system properties) Structure generating behavior claimed to represent real world
Modelling system dynamics • Interested in modeling systems’ dynamic behavior ¾ how it organizes itself over time in response to imposed conditions and stimuli. • Predict how a system will react to external inputs and proposed structural changes.
Modelling techniques classification • Example: waiting in a line for service. • Conceptual Modelling: informal model. • Communicates the basic nature of the process • Provides a vocabulary for the system (ambiguous) • General description of the system to be modeled
Formal Modelling • Advantage of Formal Methods • Correctness and completeness Testing • Communication means Teamwork • Formalism • Communication convention • Formal specification in unambiguous manner • Abstraction (representation) + Manipulation of abstraction • Formal model - Formal specification
Declarative models • System states (representing system entities) • Transitions between states • State-based declarative models • Example: States = number of persons waiting in line • Transitions: arrival of new customers/departure of serviced ones
Declarative models (cont.) • Event-based declarative models • Arcs: represent scheduling. • Event relation: from arrival of token i to departure of token i.
Functional models • “Black box”. • Input: signal defined over time • Output: depending on the internal function. • Timing delays: discrete or continuous • Example: inputs = customers arriving • Outputs = delayed output of the input customers
Spatial models • Space notions included • Relationship between time and space positions • Example: customers moving through the server.
A Systems Dynamics classification Classifying modelling techniques according to the system dynamics
Discrete time/Discrete variable • Finite State Machines • Finite State Automata • Petri Nets • CSP • CCS • Markov chains
Automata a b c 1 s22 2
Markov Chains P1,1 P0,1 0 1 P1,0
Finite State Machines Y Y S l S l d X d X (a)Moore machine; (b) Mealy machine
DES modelling • Characteristic of DES (DTS is a special case of DES) • Man-made system • Naturally concurrent system • Not well-grounded mathematical formalism form modeling • Difficulties in computer experimentation • Non-linear • No accurate analytic solution • No transformation method
Examples of Discrete Event Systems • Examples of Discrete Event System : Man-made system • Multi-computer system • communication network • Distributed control • Manufacturing system • Game • Traffic system
Discrete variable/Continuous time • Min-max algebra • Timed Finite State Machines • Timed Petri Nets • Generalized Semi-Markov Process (GSMP) • Timed automata • Timed graphs • Event graphs • Event scheduling • DEVS
Multiformalism utility • Different Abstraction Level of Dynamic System < Multilevel Abstraction in System Design > state Higher Abstraction Level S/W Real-time program Timed DES event1 event2 event3 event4 event5 time Concurrent program Untimed DES state Sequential program Finite State Automata time state H/W Diff. Eqn FMS time state time
Example: hierarchical control Operator Planning/scheduling Event-based control Discrete Event Controller Supervisory control Discrete state Command PID controller analog/digital Time-based control actuation Sensor Plant
Basic definitions • System: “natural” or artificial entity. Ordered set of related objects that interact. Source of observational data or more specifically, behavior. Data viewed or acquired through an experimental frame of interest to the modeller. • Model: abstract representation of a system. Constructed to generate behavior, indistinguishable from system behavior within one or more experimental frames. Behavior generated using specific rules, equations or a modelling formalism.
More Definitions • Behavior: specific form of data observable in a system over time within an experimental frame. • Experimental Frame:conditions under which a system or model are observed or experimented with. We do not reason but on MODELS. Problems cannot be solved on the real systems. Every problem is studied on abstract representations of the systems. Problem solving is related to an experimental frame in which the model is analyzed.
A definition Simulation is the reproduction of the dynamic behavior of a real system with the goal of obtaining conclusions that can be applied to the real system. • Dynamic behavior • Real system • Obtaining conclusions
More definitions • Event: a change in the state of the model, which occurs at a given instant (called the event time), causing the model to activate. • model's activation produce state change (i.e., at least one attribute in the model will change). • model's state is the set of values of all the attributes of the model at a given instant. • State variables: those that can be used to uniquely define the model’s behavior in the future
More definitions • Abstraction: basic process we use when modeling to extract a set of entities and relations from a complex reality. • Higher level of abstraction: information is lost, but allows to better define the model's behavior, prove properties of the system by manipulating the abstract model definition. • Verification and Validation (V&V) • Validation: relationship between model, system and experimental frame (it is possible to distinguish behavior of model/system within EF?) • Verification: process of checking that a simulator of a model correctly generates the desired behavior.
Types of Simulation Models • According to the objectives and decisions to be taken we distinguish: • Exploration: to better understand the operation of the system; • Prediction: to predict the future behavior of the system. • Improvement: to optimize performance through analysis of alternatives; • Conception: system does not exist yet; model is used to test different options prior construction. • Engineering design: design devices in engineering applications (ranging from bridges to electron devices). • Rapid prototyping: quickly obtain a working model to test ideas and get early feedback from stakeholders. • Planning: risk-free mechanism for thinking about the future (manufacturing to governance). • Acquisition: very large pieces of equipment (i.e., helicopters, airplanes, submarines) are extremely expensive. M&S can help to decide in the purchasing process, enabling the customer to exploring different alternatives without the need of constructing the equipment prior to take the decision. • Proof of concept: test ideas and put them to work before creating the actual application. • Training: controlled experiments to enhance decision making skills in defense (called constructive simulation). business gaming and virtual simulators (human-in-the-loop simulators to learn and enhance motor skills when operating complex vehicles). • Education: used in sciences to provide insight into the nature of dynamic phenomena as well as the underlying mechanisms. • Entertainment: games and animations are the two most popular applications of simulation.
Phases in a M&S study • Problem definition • Input/output data collection and analysis • Modelling • Implementation • Verification and validation • Experimentation • Experiment optimization • Output data analysis