public class SimpleHierarchicalModel extends CoupledDevs
SimpleCoupledModel
) and three atomic models
(SimpleAtomic
) all at the same level. The second level is
made of the atomic models under the two coupled models.
In total there are nine atomic models and three coupled models being simulated.
The simulation starts when a Message is received by this coupled model, which transmits it to one of its coupled model.
Modifier and Type | Class and Description |
---|---|
static class |
SimpleHierarchicalModel.SHMFactory
The factory of this coupled model.
|
CoupledDevs.CoupledFactory
Devs.DevsFactory
_componentDictionary, _components, _couplingInfo
_inputMessage, _inputPorts, _name, _output, _outputPorts, _parent, _simulator
Constructor and Description |
---|
SimpleHierarchicalModel(String name)
Create a new instance of this coupled model with the passed name.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
Instantiates this coupled model and makes a simulation of it until all
atomic models are in a passive state for an infinite time (next event
in the system at infinity).
|
protected static void |
storeEventsInFile(ICoordinator coord,
Class<? extends CoupledDevs> c,
String fileName)
Takes a coupled model and prints its content (state of its atomic
models at all levels) to a file.
|
add, addCoupling, addPair, componentDictionary, components, couplingInfo, initialize, setSimulator, simulator, toString
addInport, addOutport, compareTo, fullName, makeContent, name, parent, setParent, setSimulator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
act, addInport, addOutport, deltcon, deltext, deltint, fullName, lambda, parent, setParent, setSimulator, ta
compareTo
public SimpleHierarchicalModel(String name)
name
- The name of the new instance.public static void main(String[] args)
Message
in the system at t = 0.0.
At the end of the simulation the content of the coupled model is
printed to a file.args
- unused.protected static void storeEventsInFile(ICoordinator coord, Class<? extends CoupledDevs> c, String fileName)
coord
- The coordinator managing the simulation.c
- The class of the root coupled model.fileName
- The name of the file. The actual path depends on the
class name and a predefined part.Copyright © 2017–2019 UniversitĂ© CĂ´te d'Azur, CNRS, I3S. All rights reserved.