|
|
||||||
|
Public Types |
Public Member Functions |
Public Attributes |
Static Public Attributes |
Protected Member Functions |
Protected Attributes |
Static Private Attributes |
List of all members
faudes::AttributeSimCondition Class Reference Detailed DescriptionAttribute for a simulation condition. In order to extract statistical data from a simulation by a LoggingExecutor or some derived class, so called simulation conditions are defined. At any instance of time, a condition is satisfied or dissatisfied. Statistical data can then be requested regarding the period and duration of each condition. Currently, two types of conditions are available:
A Condition may be flagged as a break condition to halt simulation when satisfied. A condition may be enabled for tracking or not. The class AttributeSimCondition summarizes all data to represent faudes simulation conditions. It also holds some state of the condition wrt execution and provides an interface for sampling. The latter may be seperated to a different class in a future revision. The class AttributeSimCondition does, however, not implement any test whether or not a condition is satisfied. This is done by the LoggingExecutor. As a faudes attribute, conditions can be referenced by names via the std faudes container TaNameSet. For token io, a ParallelExecutor should be provided as context to access symbolic state names. The file format of a set of events equipped with condition attributes is illustrated by the below example to monitor some performance aspects of one simple machine: <Conditions>
% monitor when the machine is idle
"IdleCond"
% halt simulation when the machine is down
% however, the condition is disabled
"DownCond"
+Break+
+Disabled+
% monitor how long the prozessing one work piece takes
"OperationCond"
<StartEvents> "alpha" </StartEvents>
<StopEvents> "beta" </StopEvents>
</Conditions>
const SimEventCondition & EventCondition(void) const Get event condition. Definition: sp_simconditionset.h:245 const SimStateCondition & StateCondition(void) const Get state condition. Definition: sp_simconditionset.h:255 Definition at line 134 of file sp_simconditionset.h.
Member Typedef Documentation◆ CIterator
Definition at line 142 of file sp_simconditionset.h. ◆ Iterator
Convenience typedef. Definition at line 141 of file sp_simconditionset.h. Constructor & Destructor Documentation◆ AttributeSimCondition() [1/2]
Default constructor. Constructs a AttributeSimCondition of with no type ie neither state condition nor event condition. Definition at line 34 of file sp_simconditionset.cpp. ◆ AttributeSimCondition() [2/2]
Copy constructor. with no type ie neither state condition nor event condition. Definition at line 45 of file sp_simconditionset.cpp. Member Function Documentation◆ Breakpoint() [1/2]
Set break flag.
Definition at line 227 of file sp_simconditionset.h. ◆ Breakpoint() [2/2]
Test for break condition.
Definition at line 188 of file sp_simconditionset.h. ◆ DoAssign()
Assignment method.
Definition at line 55 of file sp_simconditionset.cpp. ◆ DoEqual()
Equality method.
Definition at line 72 of file sp_simconditionset.cpp. ◆ DoRead()
Reads the attribute from TokenReader, see AttributeVoid for public wrappers. If the current token indicates a condition section, the method reads the
Reimplemented from faudes::AttributeFlags. Definition at line 134 of file sp_simconditionset.cpp. ◆ DoWrite()
Writes the attribute to TokenWriter, see AttributeVoid for public wrappers. Writes a condition section to include data on state- or event-condition. The label argument is ignored, we use hardcoded keywords "EventCondition" and StateCondition". When a ParallelExecutor is provided as context, it state conditions are written with symbolic state names.
Reimplemented from faudes::AttributeFlags. Definition at line 86 of file sp_simconditionset.cpp. ◆ Enabled() [1/2]
Set enabled flag.
Definition at line 235 of file sp_simconditionset.h. ◆ Enabled() [2/2]
Test whether condition is enabled.
Definition at line 196 of file sp_simconditionset.h. ◆ EventCondition() [1/2]
Set event condition attribute. Define this attribute to represent the specified event condition.
Definition at line 218 of file sp_simconditionset.h. ◆ EventCondition() [2/2]
Get event condition. Note that the attribute can only return meaningful data if it actually is an event condition.
Definition at line 245 of file sp_simconditionset.h. ◆ IsDefault()
Test for default value.
Reimplemented from faudes::AttributeFlags. Definition at line 162 of file sp_simconditionset.h. ◆ IsEventCondition()
Test for event condition.
Definition at line 180 of file sp_simconditionset.h. ◆ IsStateCondition()
Test for state condition.
Definition at line 172 of file sp_simconditionset.h. ◆ Reset()
Reset conditions execution state. The execution state of a condition consists of all data accumulated during simulation eg statistical data and whether or not the condition is currently satisfied. The execution state resides in the attribute for pragmatic reasons only. Definition at line 263 of file sp_simconditionset.h. ◆ Satisfied() [1/2]
Set the condition to be satisfied. This is part of the condition execution state. Since it is the executor that determines whether a condition is satisfied, and since the condition state resides in the attribute, the executor is meant to notify state changes.
Definition at line 251 of file sp_simconditionset.cpp. ◆ Satisfied() [2/2]
Test whether the condition is currently satisfied. This is part of the condition execution state.
Definition at line 273 of file sp_simconditionset.h. ◆ StateCondition() [1/2]
Set state condition attribute. Define this attribute to represent the specified state condition.
Definition at line 205 of file sp_simconditionset.h. ◆ StateCondition() [2/2]
Get state condition. Note that the attribute can only return meaningful data if it actually is an state condition.
Definition at line 255 of file sp_simconditionset.h. Member Data Documentation◆ mActivationTime
Condition state: when last satisfied became true. Definition at line 321 of file sp_simconditionset.h. ◆ mAllSCFlags
All flags used by CFlags. Definition at line 390 of file sp_simconditionset.h. ◆ mBreakpointFlag
Definition at line 301 of file sp_simconditionset.h. ◆ mDefSCFlags
Overall default value. Definition at line 387 of file sp_simconditionset.h. ◆ mEnabledFlag
Definition at line 300 of file sp_simconditionset.h. ◆ mEventCondition
Indicate precense of a event condition. Definition at line 306 of file sp_simconditionset.h. ◆ mEventConditionAttribute
Event based condition data. Definition at line 312 of file sp_simconditionset.h. ◆ mSamplesDuration
Sampled durations, for which this condition remains satisfied. Definition at line 297 of file sp_simconditionset.h. ◆ mSamplesPeriod
Sampled period, at which this condition becomes satisfied. Definition at line 292 of file sp_simconditionset.h. ◆ mSatisfied
Condotion state: recorded as satisfied. Definition at line 318 of file sp_simconditionset.h. ◆ mStateCondition
Indicate precense of a state condition. Definition at line 309 of file sp_simconditionset.h. ◆ mStateConditionAttribute
State based condition data. Definition at line 315 of file sp_simconditionset.h. The documentation for this class was generated from the following files: libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen |