Package-level declarations
Types
The model-assembly curation surface handed to Model.curateCatalog. Extends ElementCatalogScope with the ability to remove nominations contributed by the element roll-up — the tool for pruning a catalog that a heavily-reused element has over-populated — and to override an element's nomination (a plain re-nomination of the same key replaces it; the model-level metadata wins).
Processes the ConditionalActions to check if their testCondition() is true, if so the action is executed. All actions are checked until no action's testCondition() is true To prevent conditional cycling the number of rescans is limited to DEFAULT_MAX_SCANS, which can be changed by the user or turned off via setMaxScanFlag()
Additive-only nomination surface handed to a model element's ModelElement.specifyCatalog override. An element nominates the inputs and outputs it considers salient — preferably by passing the object instances it already holds (a control, response, counter, random variable, or a property of one of its own model elements), so keys and names are derived rather than hand-formatted. String-keyed forms are available as well.
This class provides the information for running a simulation experiment. An experiment is a specification for the number of replications, the warm-up length, replication length, etc. for controlling the running of a simulation.
Buffers every SimulationSnapshot emitted by a SimulationLifeCycleEmitters into an in-memory list for later batch processing.
This class represents a simulated event. It allows for the simulation of durations of simulated time. These events are placed on the Executive and ordered by time, priority, and order of creation.
A class implementing the ModelProviderIfc interface to manage and provide models based on unique identifiers. It uses a mutable map to store model builders, where each builder is responsible for instantiating a specific model.
A simulation model is a representation of a system for the purpose of recreating the system's behavior over time. A KSL model consists of many model elements that represent the components of the system. The user create a model to contain model elements and adds the model elements prior to executing the simulation.
An interface representing a builder for creating Model instances.
An optional, author-curated catalog of a model's most important inputs and outputs, layered over the exhaustive ModelDescriptor. Applications may use it to focus their UX (surface the salient knobs first, pre-select the headline outputs) but must not depend on it being present.
The engine that assembles a ModelCatalog for a model. It is both the ElementCatalogScope fed to each element's ModelElement.specifyCatalog during roll-up and the CatalogCurationScope fed to each Model.curateCatalog block during model-level curation. Created and driven only by Model; never constructed directly.
This interface defines a function that can be called when the model is being set up, prior to the execution of any replications. The intention is to allow the modeler to specify via the configuration map specifications for configuring the model for the experiments. A KSL model has two methods for providing input variations, ksl.controls.Controls and ksl.utilities.random.rvariable.parameters.RVParameterSetter. This interface provides a third more general method. The map can hold information that the specific implementor of the interface can use to adjust, change, update, or configure the model in the way necessary to prepare it before executing the simulation experiments. The general idea is that the key indicates what will be done or changed and the associated value can be used to make the change. For example, a key could be a model element name and the value could be a JSON string that can be deserialized to required inputs for the change.
A type alias for a function that creates and returns an instance of the Model class.
A data class that describes a model's configuration at a point in time.
The internal constructor for creating model elements. A model element is some construct that is an element of a model. Model elements are added to the main model when they are constructed by supplying a parent model element. The constructed model element becomes a child to the parent in the model element hierarchy. This constructor is internal because of the interaction with the class Model, which serves as the parent to all model elements.
An interface that promises to provide a model instance based on some identifier for the model.
One author-nominated input — a control or random-variable parameter the model developer has flagged as worth surfacing first in an application.
The family a NominatedInput belongs to. Derived automatically when an input is nominated, so the author never supplies it: a control key resolves to one of the three control families, and ModelCatalogBuilder.rvParameter stamps RV_PARAMETER.
One author-nominated output — a response or counter the model developer has flagged as a headline result. name joins back to a name in ModelDescriptor.responseNames.
Mutable holder for the lean metadata attached to a single nomination, configured inside the trailing lambda of a catalog-scope method:
Holds the bounded CoroutineDispatcher used for concurrent simulation execution.
Holds one typed Emitter for each simulation lifecycle boundary.
This class facilitates simulation output reporting. There are two main reporting functions: within replication statistics and across replication statistics. The class automatically reports within replication and across replication statistics to comma-separated value files by attaching observers to the model. If you do not want this automated output, then you should use the appropriate turnOffXXX methods.
When added to a Model, this class will cause batch statistics to be collected for Response and TWResponse variables. It uses the TWBatchingElement and the ResponseBatchingElement to perform this functionality.