
public abstract class AtomicDevs extends Devs implements IAtomicDevs
Atomic models are independent objects which have a state. Their state asynchronously transition, either spontaneously (called an internal event) or when a Message from another atomic model is received (called external event). Messages are sent when an atomic model makes an internal transition.
| Modifier and Type | Class and Description |
|---|---|
static class |
AtomicDevs.AtomicFactory |
Devs.DevsFactory| Modifier and Type | Field and Description |
|---|---|
protected int |
_act
Define the system ability to output things for the next internal event.
|
protected String |
_phase
Current model _phase ("passive","active", ...)
|
protected double |
_sigma
Time interval between the last event that happen and and the next
internal event occurrence date.
|
_inputMessage, _inputPorts, _name, _output, _outputPorts, _parent, _simulator| Modifier | Constructor and Description |
|---|---|
protected |
AtomicDevs(String name)
Creates an instance with the passed name.
|
| Modifier and Type | Method and Description |
|---|---|
int |
act()
Getter on the model's ability to output things.
|
void |
AdvanceTime(Double e)
Update sigma considering a time advance of e.
|
void |
holdIn(String phase,
Double sigma)
Update sigma and phase to some specified values.
|
void |
holdInNoOut(String phase,
double sigma)
Update sigma and phase to the specified value.
|
Boolean |
isPhase(String phase)
Check if the specified phase is the model's current phase.
|
void |
passivate()
Set model's phase to passive and sigma to infinity.
|
void |
passivateIn(String phase)
Set model's phase to a specified value and sigma to infinity.
|
String |
phase()
Getter on the model's phase.
|
void |
setSigma(Double sigma)
Setter on sigma value.
|
Double |
sigma()
Getter on sigma value.
|
Double |
ta()
Return the time advance to the next event's occurrence.
|
String |
toString()
Serialize instance into a string.
|
addInport, addOutport, compareTo, fullName, makeContent, name, parent, setParent, setSimulator, simulatorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddInport, addOutport, deltcon, deltext, deltint, fullName, initialize, lambda, parent, setParent, setSimulator, simulatorcompareToprotected double _sigma
protected String _phase
protected int _act
protected AtomicDevs(String name)
name - Name of the new AtomicDevs.public void setSigma(Double sigma)
setSigma in interface IAtomicDevssigma - New sigma value.public Double sigma()
sigma in interface IAtomicDevspublic String toString()
public int act()
public void AdvanceTime(Double e)
AdvanceTime in interface IAtomicDevse - Time advance.public void passivateIn(String phase)
passivateIn in interface IAtomicDevsphase - The phase name to set.public void passivate()
passivate in interface IAtomicDevspublic void holdIn(String phase, Double sigma)
holdIn in interface IAtomicDevsphase - The new phase.sigma - The new sigma value.public void holdInNoOut(String phase, double sigma)
holdInNoOut in interface IAtomicDevsphase - the new phase.sigma - the new sigma value.public Boolean isPhase(String phase)
isPhase in interface IAtomicDevsphase - The phase to check.Copyright © 2017–2019 UniversitĂ© CĂ´te d'Azur, CNRS, I3S. All rights reserved.