|
|
||||||
|
faudes::ProposingExecutor Class Reference
Detailed DescriptionExecuter that proposes which transition to execute. Priority and Stochastic SemanticsWhilst the LoggingExecutor (and all lower level executors) is aware of which transitions are enabled, the ProposingExecutor actually proposes either one particular transition for execution or a particular amount of time to let pass. The proposal refers to additional semantics parametrised by data from SimEventAttribute. The decision procedure is organized in four stages, were the first stage that yields a proposal wins: 1.) SimPriorityEventAttribute, positive priority
2.) SimStochasticEventAttribute, stochastic timing
3.) passing by clock time
4.) SimPriorityEventAttribute, negative priority
Note that the above procedure will never come up with a proposal that fails to satisfy invariant and guard conditions. In this sense, the above procedure is compliant with Alur semantics of timed automata. If the above procedure fails to indicate a transition to execute or clock time to let pass, the system is deadlocked. If the procedure sticks with case 3) and infinite duration, it might be either life locked (no enabled events) or just unwilling/unable to execute a negative priority event. The latter case can be used for sensor events in a hardware-in-the-loop simulation. Scheduling Stochastic EventsThe mechnism to schedule events with stochastic timing comes in three flavors.
Note that type Extern or Delay schedules can disable the respective event in a way that potentially leads to blocking behaviour even if the timed automata is non-blocking by Alur semantics. This is a consequence of the fact that both types model additional phenomena that are synchronized with the timed automata, and it is perferctly reasonable that this synchronisation introduces blocking situations. In contrast, events of type Trigger are not affected by the blocking issue provided that guards lie within the respective invariant. File IOFor token IO, the ProposingExecutor reads and writes a section with default label "Executor". It contains a ParallelExecutor section to define a vector of generators, a SimConditionSet section to define relevant conditions, and a SimEventSet section to define the above event attributes. Example: <Executor>
<Generators>
"./some_generator.gen"
"./other_generator.gen"
</Generators>
"IdleCond"
<EventCondition>
<StartEvents> "beta" "mue" </StartEvents>
<StopEvents> "alpha" </StopEvents>
</EventCondition>
"DownCond"
<StateCondition>
</StateCondition>
</Conditions>
<SimEvents>
"alpha"
<Priority> 100 </Priority>
"beta"
<Stochastic> +Trigger+ +Gauss+ <Parameter> 10 5 </Parameter> </Stochastic>
"mue"
<Stochastic> +Delay+ +Gauss+ <Parameter> 20 5 </Parameter> </Stochastic>
"lambda"
<Priority> 100 </Priority>
</SimEvents>
</Executor>
const SimConditionSet & Conditions(void) const Definition: sp_lpexecutor.cpp:209 Technical detail: since the trace buffer only covers the dynamic state of the parallel executor, the RevertToStep method cannot recover the stochastic event states. Including stochastic states with the trace buffer is considered to expensive. Definition at line 165 of file sp_plpexecutor.h. Constructor & Destructor Documentation◆ ProposingExecutor() [1/2]
doxygen group Creates an emtpy ProposingExecutor Definition at line 21 of file sp_plpexecutor.cpp. ◆ ProposingExecutor() [2/2]
Copy constrcutor Definition at line 26 of file sp_plpexecutor.cpp. Member Function Documentation◆ Alphabet() [1/2]
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().
Definition at line 59 of file sp_plpexecutor.cpp. ◆ Alphabet() [2/2]
Access alphabet (incl simulation event attributes)
Definition at line 245 of file sp_plpexecutor.h. ◆ Clear()
Clear all data (generators, simulation attributes etc) Reimplemented from faudes::LoggingExecutor. Reimplemented in faudes::DeviceExecutor. Definition at line 33 of file sp_plpexecutor.cpp. ◆ DoAssign()
Assignment method
Definition at line 40 of file sp_plpexecutor.cpp. ◆ DoRead()
Reads proposing executor from TokenReader, see also public wrappers Type::Read.
Reimplemented from faudes::LoggingExecutor. Definition at line 620 of file sp_plpexecutor.cpp. ◆ DoWrite()
Write to TokenWriter, see also public wrappers Type::Write.
Reimplemented from faudes::LoggingExecutor. Definition at line 608 of file sp_plpexecutor.cpp. ◆ EventAttribute() [1/2]
doxygen group Simulation event attribute lookup
Definition at line 49 of file sp_plpexecutor.cpp. ◆ EventAttribute() [2/2]
Set simulation event attribute. Requires Reset().
Definition at line 54 of file sp_plpexecutor.cpp. ◆ EventStatesToString()
Inspect stochastic event states (debugging) return EventInfoMap string Definition at line 105 of file sp_plpexecutor.cpp. ◆ ExecuteEvent()
Execute event.
Reimplemented from faudes::LoggingExecutor. Definition at line 168 of file sp_plpexecutor.cpp. ◆ ExecuteNextTransition()
doxygen group Execute next transition. Choose the transition to execute by priorities and
Definition at line 431 of file sp_plpexecutor.cpp. ◆ ExecuteTime()
Execute time duration.
Reimplemented from faudes::LoggingExecutor. Definition at line 123 of file sp_plpexecutor.cpp. ◆ ExecuteTransition()
Execute event by transition
Definition at line 250 of file sp_plpexecutor.cpp. ◆ ProposeNextTransition()
Propose next transition. Propose a transition to execute by priorities and
Definition at line 263 of file sp_plpexecutor.cpp. ◆ Reset() [1/2]
doxygen group Reset the ProposingExecutor. This includes a reset of the ParallelExecutor and the simulation event states.
Reimplemented in faudes::DeviceExecutor. Definition at line 95 of file sp_plpexecutor.cpp. ◆ Reset() [2/2]
Reset the ProposingExecutor. This method uses the systemtime as seed. Reimplemented from faudes::LoggingExecutor. Definition at line 307 of file sp_plpexecutor.h. ◆ ResetProposer()
Reset stochastic state of events. Definition at line 67 of file sp_plpexecutor.cpp. ◆ RevertToStep()
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 670 of file sp_plpexecutor.cpp. ◆ Schedule()
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.
Definition at line 475 of file sp_plpexecutor.cpp. Member Data Documentation◆ mProposal
Available proposal Definition at line 374 of file sp_plpexecutor.h. ◆ mPValid
Valid proposal available Definition at line 369 of file sp_plpexecutor.h. ◆ mSimEvents
Simulation event attributes, incl stochastic and priority data Definition at line 364 of file sp_plpexecutor.h. The documentation for this class was generated from the following files: libFAUDES 2.33b --- 2025.05.07 --- c++ api documentaion by doxygen |