| |
libFAUDES
Sections
Index
|
faudes::ProposingExecutor Class Reference |
Public Member Functions | |
Constructors & Destructor | |
ProposingExecutor () | |
Creates an emtpy ProposingExecutor. | |
Simulation Event Attributes | |
const SimEventAttribute & | EventAttribute (Idx index) const |
Simulation event attribute lookup. | |
void | EventAttribute (Idx index, const SimEventAttribute &rAttr) |
Set simulation event attribute. | |
void | Alphabet (const sEventSet &rAlphabet) |
Set all simulation event attributes. | |
const sEventSet & | Alphabet (void) const |
Access alphabet (incl simulation event attributes). | |
Execution Proposal | |
TimedEvent | ExecuteNextTransition () |
Execute next transition. | |
const TimedEvent & | ProposeNextTransition () |
Propose next transition. | |
std::string | EventStatesToString (void) const |
Inspect stochastic event states (debugging). | |
Re-implemenented from ParallelExecutor | |
virtual void | Reset (long int seed=0) |
Reset the ProposingExecutor. | |
virtual void | Clear (void) |
Clear all data (generators, simulation attributes etc). | |
bool | ExecuteTime (tpTime::Type duration) |
Execute time duration. | |
bool | ExecuteEvent (Idx event) |
Execute event. | |
bool | ExecuteTransition (const TimedEvent &tevent) |
Execute event by transition. | |
bool | RevertToStep (Idx step) |
Revert executor to past step. | |
Private Member Functions | |
void | ResetProposer (long int seed=0) |
Reset stochastic state of events. | |
tpTime::Type | Schedule (Idx event, SimEventAttribute *pattr) |
Evaluate random variable to schedule event. | |
virtual void | DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0) |
Reads proposing executor from TokenReader, see also public wrappers Type::Read. | |
virtual void | DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const |
Write to TokenWriter, see also public wrappers Type::Write. | |
Private Attributes | |
sEventSet | mSimEvents |
Simulation event attributes, incl stochastic and priority data. | |
bool | mPValid |
Valid proposal available. | |
TimedEvent | mProposal |
Available proposal. |
faudes::ProposingExecutor::ProposingExecutor | ( | void | ) |
Creates an emtpy ProposingExecutor.
doxygen group
const SimEventAttribute & faudes::ProposingExecutor::EventAttribute | ( | Idx | index | ) | const |
Simulation event attribute lookup.
doxygen group
index |
void faudes::ProposingExecutor::EventAttribute | ( | Idx | index, | |
const SimEventAttribute & | rAttr | |||
) |
void faudes::ProposingExecutor::Alphabet | ( | const sEventSet & | rAlphabet | ) |
Set all simulation event attributes.
Any previous attributes are removed. Any events not in rAlphabet become the default attribute attached (which is priority 0) Requires Reset().
rAlphabet | EventSet with SimEventAttrute data |
const sEventSet& faudes::ProposingExecutor::Alphabet | ( | void | ) | const [inline] |
TimedEvent faudes::ProposingExecutor::ExecuteNextTransition | ( | void | ) |
Execute next transition.
doxygen group
Choose the transition to execute by priorities and stochastic properties.
const TimedEvent & faudes::ProposingExecutor::ProposeNextTransition | ( | void | ) |
Propose next transition.
Propose a transition to execute by priorities and stochastic properties.
std::string faudes::ProposingExecutor::EventStatesToString | ( | void | ) | const |
Inspect stochastic event states (debugging).
return EventInfoMap string
void faudes::ProposingExecutor::Reset | ( | long int | seed = 0 |
) | [virtual] |
Reset the ProposingExecutor.
doxygen group This includes a reset of the ParallelExecutor and the simulation event states.
seed | Seed for random generator, 0<>system time |
Reimplemented in faudes::DeviceExecutor.
void faudes::ProposingExecutor::Clear | ( | void | ) | [virtual] |
Clear all data (generators, simulation attributes etc).
Reimplemented from faudes::LoggingExecutor.
Reimplemented in faudes::DeviceExecutor.
bool faudes::ProposingExecutor::ExecuteTime | ( | tpTime::Type | duration | ) | [virtual] |
bool faudes::ProposingExecutor::ExecuteEvent | ( | Idx | event | ) | [virtual] |
Execute event.
Reimplemented from faudes::LoggingExecutor.
Reimplemented in faudes::DeviceExecutor.
bool faudes::ProposingExecutor::ExecuteTransition | ( | const TimedEvent & | tevent | ) |
Execute event by transition.
bool faudes::ProposingExecutor::RevertToStep | ( | Idx | step | ) | [virtual] |
Revert executor to past step.
This will revert only the executor dynamic state (incl clock values, current time). The condition and event states, however, will not be reverted.
Reimplemented from faudes::LoggingExecutor.
void faudes::ProposingExecutor::ResetProposer | ( | long int | seed = 0 |
) | [private] |
Reset stochastic state of events.
tpTime::Type faudes::ProposingExecutor::Schedule | ( | Idx | event, | |
SimEventAttribute * | pattr | |||
) | [private] |
Evaluate random variable to schedule event.
Referring to the specified stochastic attribute, take a random sample to schedule the next occurence of the event. The result is given as return value and is also recorded in the simulation state of the event attribute.
event | Event to schedule, by index | |
pattr | Pointer to event attribute |
void faudes::ProposingExecutor::DoRead | ( | TokenReader & | rTr, | |
const std::string & | rLabel = "" , |
|||
const Type * | pContext = 0 | |||
) | [private, virtual] |
Reads proposing executor from TokenReader, see also public wrappers Type::Read.
rTr | TokenReader to read from | |
rLabel | Section to read, defaults to "LoggingExecutor" | |
pContext | Read context to provide contextual information (ignored) |
Exception |
|
Reimplemented from faudes::LoggingExecutor.
void faudes::ProposingExecutor::DoWrite | ( | TokenWriter & | rTw, | |
const std::string & | rLabel = "" , |
|||
const Type * | pContext = 0 | |||
) | const [private, virtual] |
Write to TokenWriter, see also public wrappers Type::Write.
rTw | Reference to TokenWriter | |
rLabel | Label of section to write, defaults to "LoggingExecutor" | |
pContext | Write context to provide contextual information (ignored) |
Exception |
|
Reimplemented from faudes::LoggingExecutor.
Simulation event attributes, incl stochastic and priority data.
bool faudes::ProposingExecutor::mPValid [private] |
Valid proposal available.
Available proposal.
libFAUDES 2.13a c++ source docu by doxygen 1.5.6