Chapter16 Methodology: How to Model and Simulate - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Chapter16 Methodology: How to Model and Simulate

Description:

... coupled models and and test them in hierarchical stage wise fashion in SimView. ... in JBuilder of by changing directory to DevsJava/classes and entering ... – PowerPoint PPT presentation

Number of Views:55
Avg rating:3.0/5.0
Slides: 17
Provided by: zeig2
Category:

less

Transcript and Presenter's Notes

Title: Chapter16 Methodology: How to Model and Simulate


1
Chapter16 Methodology How to Model and Simulate
2
MS Methodology
  • First think about your objectives- find a level
    of difficulty that seems achievable in the time
    available.
  • Develop the experimental frames first to meet
    these objectives.
  • Develop your atomic models and coupled models and
    and test them in hierarchical stage wise fashion
    in SimView.
  • Start your exploratory phase -- get some
    preliminary results of execution within
    experimental frames. What is the lay of the
    land? Which factors appear to matter most?
  • Start your production runs (for final results) by
    concentrating on the factors that seem to be
    important from your initial exploration.
  • If you need better performance, remove all
    unessential code, including output and print
    statements. Switch execution from SimView to
    fast-as-can simulation as shown next.
  • For greater performance migrate your model to
    parallel/distributed fast-as-can simulation (not
    currently available).
  • If your objectives were to develop real-time
    execution models, migrate them to real-time
    execution (distributed, non-distributed) as shown
    next.

3
Suggested Project Report Outline
  • Problem statement Objectives of the
    Project
  • General Description of the System to be
    Studied
  • Objectives of the Modeling and Simulation
    Study
  • The Simulation Model
  • System Entity Structure or Hierarchical diagrams
    and
  • explanation of operation
  • Illustrative DEVSJAVA code or pseudo code
  • Experimental frame and how it serves to achieve
    the Objectives
  • Experiments
  • Results ( or expected results)
  • Conclusions (what did you learn from this
    work
  • Future Work
  • References
  • Appendix more details or code

4
Categorizing Simulation Modes and Packages in
DEVSJAVA
5
Model Development using Model Continuity
Implementation/ Logical Simulation
Model Distribution/ Distributed Simulation
Real-Time Distributed Simulation/ Execution
Modeling
Checks Model Logical Behavior
Checks Model Logical Behavior in
Distributed Environment
Checks Model Temporal Behavior
DEVS Formalism
genDevs. simulation. distributed
genDevs. simulation. realTime
genDevs. simulation
6
Using inheritance and polymorphism to allow easy
switching from structure/behavior viewing to
fast simulation
Later, when ready for production runs, execute
them without change in fast-as-can simulation
Even though ViewableAtomic and ViewableDigraph
models can hold information intended for
SimView, they need not be altered to run outside
of SimView. For example, to run a
ViewableDigraph model in a main routine
define public static void main(String
args) ViewableDigraph d new
(Random,rule30CellSpace) r new coordinator
(d) r.initialize() //to measure execution
time if desired initTime System.currentTimeMill
is() r.simulate(100) termTime
System.currentTimeMillis() This can be
executed in JBuilder of by changing directory to
DevsJava/classes and entering on the command line
gtjava Random.rule30CellSpace
You can develop models and test them in SimView
simView. ViewableDigraph
To understand how this is possible, consider that
in atomicSimulator the Devs Simulator Cycle
implementation includes hooks within its
methods, e.g., public void computeInputOutput(do
uble t) if(equalTN(t)) output
myModel.Out() elseoutput new message()
computeInputOutputHook1() These hooks are
dummy methods within atomicSimulator,
e.g., protected void computeInputOutputHook1()
In ViableAtomicSimulator the hooks are given
definitions that allow the SimViewCoordinator to
get the infromation it needs to display in
SimView, .e.g., protected void
computeInputOutputHook1() if (listener
null) return ContentIteratorInterface
iterator output.mIterator() while
(iterator.hasNext())
ContentInterface content iterator.next()
listener.contentOutputted((content)content
,\ viewableAtomic,
content.getPort().getName())
simView. ViewableAyatomic
7
Using toString() and toObject() to facilitate
deploying models in distributed simulation
receiver
sender
DEVS simulator uses toString() to encode the
entity as a String which is sent across the wire
public message out( ) message m new
message() m.add(makeContent("out",
new vect2DEnt(x,y))) return m
public void deltext(double e ,message x) for
(int i0 ilt x.getLength()i) if
(messageOnPort(x,in",i)) entity en
x.getValOnPort(in",i) position
vect2DEnt.toObject(en)
The modeler also needs to define toObject() and
use this method in decoding the message. public
static vect2DEnt toObject(String nm) int
commaIndex nm.indexOf(",") String xs
nm.substring(0,commaIndex) String ys
nm.substring(commaIndex1,nm.length()) return
new vect2DEnt(Double.parseDouble(xs),Double.parseD
ouble(ys)) public static vect2DEnt
toObject(entity ent) return toObject(ent.getName(
))
The modeler must define toString() for the
simulator to use polymorphically. For example
public String toString() return
doubleFormat.niceDouble( x )
","doubleFormat.niceDouble(y) public String
getName() return toString()
8
Deploying a coupled model onto a distributed,
decentralized, real-time simulation
For the coupled model define a RTCoordinatorServer
,e.g., public class StartVehicleSpaceServer
public static void main(String args)
try System.out.println("For use by clients,
this host is " InetAddress.getLocalHost().getHost
Address()) catch(Exception c) new
RTCoordinatorServer(new vehicleSpace(), 10)
You can develop models and test them in SimView
This will give you the address needed by clients
For each component model define a
RTCoordinatorClient, e.g., public class
StartEvaderClient public static void
main(String args) new RTCoordinatorClient
( new vehicle("evader",new
vect2DEnt(40,40)), "192.168.1.101",
//RTCoordinatorServers address

//or if on same machine as the
server //you can use "localhost",
Constants.serverPortNumber)
StartPursuer Client
StartVehicleSpaceServer
StartEvader Client
Continuity. StartVehicleSpaceServer
intranet or internet
Later, when ready for production runs, execute
them without change in distributed, real0time,
decentralized simulation
You can now distribute these classes onto one or
more computers and execute them from jBuilder or
from the command line as illustrated before.
You can also distribute hierarchically using
RTCoordinatorServerAndClient
9
VV
10
General System Philosophy
George Klir, Architecture of General Systems
11
Modeling Simulation/Systems Theory
12
MS Framework
Objectives represented by
Layered architecture
Entities formalized as systems relations as
system morphisms
13
DEVS Modeling Simulation Framework
  • DEVS Discrete Event System Specification
  • Provides sound MS framework
  • Derived from Mathematical dynamical system
    theory
  • Supports hierarchical, modular composition and
    reuse
  • Can express Discrete Time, Continuous and hybrid
    models
  • Event-orientation enables efficient simulation
  • HLA/SOA enables interoperability of existing
    simulations
  • DEVS supports developing new simulation models
    within an object-oriented computational framework

14
Joint MEASURETM
  • Jointly Developed by Lockheed and UA under DARPA
    ASTT
  • Mission Effectiveness Simulator for
  • System-of-Systems
  • employs moderate level of resolution

Threat Detection Data
JM Application C4ISR System-of-System Design
WAN link
Mission Effectiveness Analysis Simulator for
Utility, Research and Evaluation
15
Hierarchy of System Specifications and Morphisms
simulation model construction at high levels
VV loop
structure to behavior
behavior to structure
experimental testing at low levels
16
VV
Write a Comment
User Comments (0)
About PowerShow.com