Package-level declarations
Types
A data class for transferring the data associated with a control.
A control represents an element within a model that can be changed by the user. Every control has a type (DOUBLE, INTEGER, LONG, FLOAT, SHORT, BYTE, BOOLEAN). The user can set the value of the control. If the supplied value is not within the allowed range of the control, the value will be limited to within the range. If the user assigns the value of the control to less than the lower bound, then the value is set to the lower bound. If the user assigns the value greater than the upper bound, then the value is set at the upper bound. For example, suppose the lower bound of the control is 1.0 and the upper bound is 10.0. Setting the control value to 0.0 will set the control to 1.0. Setting the control value to 12.0 will set the control to 10.0. Thus, out-of-range values are not permitted and corrected (silently). The limitToRange() function can be used to inspect the value that will result if the control is set to the supplied value.
Summary result returned by Controls.importAll and Controls.importAllFromJson.
Defines the set of valid control types. The valid types are (DOUBLE, INTEGER, LONG, FLOAT, SHORT, BYTE, BOOLEAN). All control types are ultimately coerced to type Double, with BOOLEAN mapping true to 1.0 and false to 0.0.
Thrown when a JsonControlIfc or StringControlIfc cannot apply an incoming value.
Decodes a null control value as +∞ — the only non-finite value a real control carries (an EventGenerator's "run forever" initialEndingTime). A control value of -∞ or NaN does not occur in practice, so mapping null to +∞ round-trips every real control exactly.
A data-transfer object carrying the state of a single JsonControlIfc.
Represents a JSON-valued simulation control extracted from a property annotated with KSLJsonControl.
A KSLControl annotation is used on the setter method of properties within model elements to indicate that those properties should be used to control the execution of the simulation model. The annotation field type must be supplied and must be one of the valid control types as specified by the enum ControlType. The user is responsible for making sure that the type field matches (or is consistent with) the type of the property. Even though the optional annotation fields (lowerBound and upperBound) are specified as double values, they will be converted to an appropriate value for the specified type. Boolean properties are represented as a 1.0 (true) and 0.0 (false) within the numerical conversion for the controls. If a control is BOOLEAN, then the user can supply a 1.0 to represent true and a 0.0 to represent false when setting the control, which will then be set to true or false, appropriately.
Marks a property setter as a JSON-valued simulation control.
Decodes a null lower bound as -∞ (unbounded below).
A serializable snapshot of all controls extracted from a model instance, spanning all three control families.
A Double serializer that tolerates a JSON null on decode, mapping it to whenNull, while keeping the field a non-nullable Double.
A data-transfer object carrying the state of a single StringControlIfc.
Represents a string-valued simulation control extracted from a property annotated with KSLStringControl.
Decodes a null upper bound as +∞ (unbounded above).