| |
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 | ) |
const SimEventAttribute & faudes::ProposingExecutor::EventAttribute | ( | Idx | index | ) | const |
Simulation event attribute lookup.
doxygen group
index |
Definition at line 33 of file sp_plpexecutor.cpp.
void faudes::ProposingExecutor::EventAttribute | ( | Idx | index, | |
const SimEventAttribute & | rAttr | |||
) |
Set simulation event attribute.
Requires Reset().
index | Event index | |
rAttr | New attribute |
Exception | Index not found in EventSymbolMap (id 42) |
Definition at line 38 of file sp_plpexecutor.cpp.
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 |
Definition at line 43 of file sp_plpexecutor.cpp.
const sEventSet& faudes::ProposingExecutor::Alphabet | ( | void | ) | const [inline] |
Access alphabet (incl simulation event attributes).
Reimplemented from faudes::ParallelExecutor.
Definition at line 231 of file sp_plpexecutor.h.
TimedEvent faudes::ProposingExecutor::ExecuteNextTransition | ( | void | ) |
Execute next transition.
doxygen group
Choose the transition to execute by priorities and stochastic properties.
Definition at line 417 of file sp_plpexecutor.cpp.
const TimedEvent & faudes::ProposingExecutor::ProposeNextTransition | ( | void | ) |
Propose next transition.
Propose a transition to execute by priorities and stochastic properties.
Definition at line 249 of file sp_plpexecutor.cpp.
std::string faudes::ProposingExecutor::EventStatesToString | ( | void | ) | const |
Inspect stochastic event states (debugging).
return EventInfoMap string
Definition at line 84 of file sp_plpexecutor.cpp.
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.
Definition at line 74 of file sp_plpexecutor.cpp.
void faudes::ProposingExecutor::Clear | ( | void | ) | [virtual] |
Clear all data (generators, simulation attributes etc).
Reimplemented from faudes::LoggingExecutor.
Reimplemented in faudes::DeviceExecutor.
Definition at line 25 of file sp_plpexecutor.cpp.
bool faudes::ProposingExecutor::ExecuteTime | ( | tpTime::Type | duration | ) | [virtual] |
Execute time duration.
Reimplemented from faudes::LoggingExecutor.
Definition at line 110 of file sp_plpexecutor.cpp.
bool faudes::ProposingExecutor::ExecuteEvent | ( | Idx | event | ) | [virtual] |
Execute event.
Reimplemented from faudes::LoggingExecutor.
Reimplemented in faudes::DeviceExecutor.
Definition at line 155 of file sp_plpexecutor.cpp.
bool faudes::ProposingExecutor::ExecuteTransition | ( | const TimedEvent & | tevent | ) |
Execute event by transition.
Definition at line 236 of file sp_plpexecutor.cpp.
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.
Definition at line 655 of file sp_plpexecutor.cpp.
void faudes::ProposingExecutor::ResetProposer | ( | long int | seed = 0 |
) | [private] |
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 |
Definition at line 461 of file sp_plpexecutor.cpp.
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.
Definition at line 605 of file sp_plpexecutor.cpp.
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.
Definition at line 593 of file sp_plpexecutor.cpp.
Simulation event attributes, incl stochastic and priority data.
Definition at line 342 of file sp_plpexecutor.h.
bool faudes::ProposingExecutor::mPValid [private] |
libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6