Design of a simulation model with Xcarecrows 4 MDA.
-
Upload
jean-mathews -
Category
Documents
-
view
219 -
download
0
Transcript of Design of a simulation model with Xcarecrows 4 MDA.
Design of a simulation model with Xcarecrows 4 MDA
2
Design of a simulation model with Xcarecrows 4 MDA - contents Xcarecrows 4 MDA definitions State machines hierarchical design Database usage through operative objects Simulation Conclusion
3
Xcarecrows 4 MDA(*) definition Uses UML to design the structure and behaviour application
Uses hierarchical families of elements, which cooperate in
controlling logic, data is kept apart
Interfaces itself with an UML modelling tool conformant with XMI 2
Is an Eclipse plug-in
* Xcarecrows is a trade mark of Cogenit
Conclusion
Database…
Hierarchy… Simulation
Design…
4
Design of a simulation model with Xcarecrows 4 MDA - contents Xcarecrows 4 MDA définition State machine hierarchical design Database usage through operative objects Simulation Conclusion
5
Why ? Cover all specifications
Set a hierarchical view Use refinements to manage
complete design Separate features Add or modify features easily Simplify a complex problem Bind the simulation model with
a requirements tool
Conclusion
Database…
Hierarchy… Simulation
Design…
6
Requirements traceability tool Use a requirements traceability tool to prove
the model completeness Interface Xcarecrows 4 MDA with customer
requirements traceability tool
Conclusion
Database…
Hierarchy… Simulation
Design…
7
Xcarecrows 4 MDA family A simulation model is made of cooperative elements family A family uses hierarchy model The family organisation is :
A leader to deal with messages inside the family ; A set of cooperative objects like : state machine, operative
object, leaders ; A set of signals to mark messages managed by a leader.
Elements follow hierarchical dependency : Each cooperative element in a family knows only its leader ; The leader is the only one who knows all sub-elements.
Conclusion
Database…
Hierarchy… Simulation
Design…
8
Sample: a simple ecosystem Two populations:
the lice the hosts
The lice population increases or decreases. The hosts population increases, decreases
and hosts lice. The model describes population evolution.
Conclusion
Database…
Hierarchy… Simulation
Design…
9
Presentation of the simulated modelAs is in the customer order
Conclusion
Database…
Hierarchy… Simulation
Design…
Dad Papuan With lice Id
1 1 1 (1) Y’a des papas papou à poux
1 1 0 (2) Et des papas papou pas à poux ;
1 0 1 (3) y’a des papas pas papou à poux
1 0 0 (4) et des papous pas papou pas à poux ;
0 1 1 (5) y’a des pas papas papou à poux
0 1 0 (6) et des pas papas papou pas à poux ;
0 0 1 (7) y’a des pas papas pas papou à poux
0 0 0 (8) et des pas papas pas papou pas à poux !
10
Logic of control : the state machine Is defined by UML state diagrams
Uses an error event
Associates a behaviour for each state/event
pair
Deals with its hierarchy
Is extracted from an UML modelling tool to be
used in the Eclipse IDE
Conclusion
Database…
Hierarchy… Simulation
Design…
11
Processing of data : the operative object Is defined by its interface contract as defined
by Xcarecrows 4 MDA model
The Java code is restricted to operative
objects behaviour
Deals with its hierarchy
Is modelled by a signal source and an event
hole
Conclusion
Database…
Hierarchy… Simulation
Design…
12
Easy to use The hierarchical design :
Is easy to understand ; Uses the functionalities defined in the specifications of the
simulated process. The modelling process is guided by the
Xcarecrows 4 MDA graphical interface The control design is extracted from UML Xcarecrows 4 MDA is plugged into Eclipse IDE
Conclusion
Database…
Hierarchy… Simulation
Design…
13
Ease of development Java code needed only for object behaviour The UML model defines objects interface The simulation model is easy to extend Programming rules for a Xcarecrows 4 MDA family
are checked on the fly The documentation is automatically produced A requirement traceability tool is used to check
extracted documentation from the model
Conclusion
Database…
Hierarchy… Simulation
Design…
14
Painless refinement Keep one functionality in mind at a time Less code is written so less possible errors Remaining errors are easy to track in the state
machine behaviour.
Conclusion
Database…
Hierarchy… Simulation
Design…
15
Design of a simulation model with Xcarecrows 4 MDA - contents Xcarecrows 4 MDA definition State machine hierarchical design Database usage through operative objects Simulation Conclusion
16
Database and simulation environment The data base deals
with : the model operative data ; the scenarios ; the simulation results ; the concurrent access to
objects.
Conclusion
Database…
Hierarchy… Simulation
Design…
17
Organisation of process during simulation run
Chronology
process
Entity
process
Product
process
Incident 1
process
Incident 2
process
Consistency
spy process
Simulation instantaneous state
Database
Test log
Consistency
spy process
Evolution laws
List and characteristic features of entitiesSpecifications
Conclusion
Database…
Hierarchy… Simulation
Design…
18
Model sample Model specifications
Parameterized evolution laws
Scenarios
Logical model
Observation of model running
Conclusion
Database…
Hierarchy… Simulation
Design…
19
Specifications Location
A set of villages with people.
Biology A set of people and parasites.
Mobility Vehicles move people and hosted parasites from
village to another.
Conclusion
Database…
Hierarchy… Simulation
Design…
20
Parameterized evolution laws An host could have child as soon as he is a days
old * Disease
Each host have a life expectancy of b days. Each parasite costs the host d days of life, less than c
days old * Each parasite costs the host e days of life, assuming
that the host is more than c days old * * Numerical value are to be assigned to a to e. Other evolution laws can be added.
Conclusion
Database…
Hierarchy… Simulation
Design…
21
Scenarios Are a set of steps generated a priori Describe possible evolutions of the model Comply with specifications Are built independently of the evolution laws Ignore the real state of the system at
simulation time Test uncommon set of events
Conclusion
Database…
Hierarchy… Simulation
Design…
22
The logical model
The model traduces the specifications.
It receives orders from the scenario.
It applies orders and checks that they do not
break : the specifications ;
the evolution laws.
Conclusion
Database…
Hierarchy… Simulation
Design…
23
Observation of the simulation run
Synchronizes : the a priori view from the scenario ; with the observed reality and applied evolution
laws.
At each step, checks are done : step feasibility through pre-condition ; reality situation drift against scenarios and
evolution laws with a post-condition.
Conclusion
Database…
Hierarchy… Simulation
Design…
24
Production of scenario A scenario producer works :
in a reproducible way ;
from database ;
from pseudo-random generation number ;
using many combinations of scenario steps.
The scenario is an XML document.
Each scenario could be edited.
Conclusion
Database…
Hierarchy… Simulation
Design…
25
Scenario sampleConclusion
Database…
Hierarchy… Simulation
Design…
J
J+1
Set the start dateCreate the village AubagneCreate the Papuan village Daru
People census
Bind the lice Vivien Demars to Basile DucheminBind the lice Lazare Dusoleil to Odilon PetitBind the lice Bernardin Demai to Donatien Martin…
People census
Vehicle from Aubagne to Daru with Basile Duchemin
Vehicle from Aubagne to Daru with Donatien Martin
People census
Create a Papuan person:
Basile Duchemin
Create a person: Donatien Martin
Create a person: Odilon Petit
Create a lice: Vivien Demars
Create a lice: Lazare Dusoleil
Create a lice: Bernardin Demai
…
26
Comfortable behaviour analysis Provides :
An observation of the simulation running in the analysis environment
A check of simulation model A check of parameters choice A coverage of the simulation model
Conclusion
Database…
Hierarchy… Simulation
Design…
27
Design of a simulation model with Xcarecrows 4 MDA - contents Xcarecrows 4 MDA definition State machines hierarchical design Database usage through operative objects Simulation Conclusion
28
Multi Xcarecrows 4 MDA ™ families used Multi Xcarecrows 4 MDA families
Help the refinement and favor usage of non-regression tests.
Conclusion
Database…
Hierarchy… Simulation
Design…
29
Major scheduling laws
The database allows : to enact integrity rules ; to synchronize data access through native primitives ; to observe, during simulation, stable reliable situation ; to insulate the check of the integrity rules within the
simulation.
Conclusion
Database…
Hierarchy… Simulation
Design…
30
Design of a simulation with Xcarecrows 4 MDA - contents Xcarecrows 4 MDA definition State machine hierarchical design Database usage through operative objects Simulation Conclusion
31
Conclusion Xcarecrows 4 MDA leads to :
extract automatically a documentation for a check-in requirements tool ; separate functionalities ; distribute the functionalities along hierarchy ; thoroughly model validation ; control the model design process ; split simulation into many threads.
The simulation model : is easily extendable ; separates control data from operative data ; interfaces itself with existing data base and applications ; checks data consistency.
Conclusion
Database…
Hierarchy… Simulation
Design…