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 Attribute for a simulation condition. More...
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>
Definition at line 134 of file sp_simconditionset.h. Member Typedef Documentation
Definition at line 142 of file sp_simconditionset.h.
Convenience typedef. Definition at line 141 of file sp_simconditionset.h. Constructor & Destructor Documentation
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.
Copy constructor. with no type ie neither state condition nor event condition. Definition at line 45 of file sp_simconditionset.cpp. Member Function Documentation
Test for break condition.
Definition at line 188 of file sp_simconditionset.h.
Set break flag.
Definition at line 227 of file sp_simconditionset.h.
Assignment method.
Definition at line 55 of file sp_simconditionset.cpp.
Equality method.
Definition at line 72 of file sp_simconditionset.cpp.
Reads the attribute from TokenReader, see AttributeVoid for public wrappers. If the current token indicates a condition section, the method reads the condition data from that section. Else it does nothing. Exceptions may only be thrown on invalid data within the condition section. The label argiment is ignored, we use hardcoded labled "EventCondition" and "StateCondition" to figure the type of condition. When a ParallelExecutor is provided as context, it is used to interpret symbolc state names of a state condition.
Reimplemented from faudes::AttributeFlags. Definition at line 134 of file sp_simconditionset.cpp.
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.
Test whether condition is enabled.
Definition at line 196 of file sp_simconditionset.h.
Set enabled flag.
Definition at line 235 of file sp_simconditionset.h.
Set event condition attribute. Define this attribute to represent the specified event condition.
Definition at line 218 of file sp_simconditionset.h.
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.
Test for default value.
Reimplemented from faudes::AttributeFlags. Definition at line 162 of file sp_simconditionset.h.
Test for event condition.
Definition at line 180 of file sp_simconditionset.h.
Test for state condition.
Definition at line 172 of file sp_simconditionset.h.
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.
Test whether the condition is currently satisfied. This is part of the condition execution state.
Definition at line 273 of file sp_simconditionset.h.
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.
Set state condition attribute. Define this attribute to represent the specified state condition.
Definition at line 205 of file sp_simconditionset.h.
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
Condition state: when last satisfied became true. Definition at line 321 of file sp_simconditionset.h.
All flags used by CFlags. Definition at line 390 of file sp_simconditionset.h.
Definition at line 301 of file sp_simconditionset.h.
Overall default value. Definition at line 387 of file sp_simconditionset.h.
Definition at line 300 of file sp_simconditionset.h.
Indicate precense of a event condition. Definition at line 306 of file sp_simconditionset.h.
Event based condition data. Definition at line 312 of file sp_simconditionset.h.
Sampled durations, for which this condition remains satisfied. Definition at line 297 of file sp_simconditionset.h.
Sampled period, at which this condition becomes satisfied. Definition at line 292 of file sp_simconditionset.h.
Condotion state: recorded as satisfied. Definition at line 318 of file sp_simconditionset.h.
Indicate precense of a state condition. Definition at line 309 of file sp_simconditionset.h.
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.28a --- 2016.09.13 --- c++ api documentaion by doxygen |