Abstract:
A method may include causing a first model to be executed. The causing the first model to be executed may be performed by a device. The method may further include causing a second model to be executed to simulate a functionality of the first model. The causing the second model to be executed may be performed by the device. The method may further include interacting with a model element, of the second model, associated with implicitly accessing information regarding a state of the first model. The state may be a representation of the first model at a particular simulation time-step. The interacting with the model may be performed by the device. The method may further include accessing, by the model element, information associated with the state of the first model. The accessing the information may be performed by the device.
Abstract:
A computing device may include a memory to store data that describes a state machine model that includes destination states and source states. The source states may be associated with conditions upon which the state machine model is to transition from a corresponding source state to one of the destination states. The device may also include a processor configured to generate data to describe a state diagram from the data that describes the state machine model. The state diagram may include the graphical symbols and lines. Each of the graphical symbols may represent one of the source states or one of the destination states. The lines may represent transitions and include one or more vertical lines to represent transitions to one of the destination states from more than one of the source states. The graphical symbol may represent the one of the destination states is not adjacent to the graphical symbols to represent the more than one of the source states. The processor may arrange graphical symbols in a first row, arrange lines, and arrange vertical lines in a second row that does not overlap with the first row.
Abstract:
A device may receive a model generated via a technical computing environment, where the model included a state chart with one or more variables. The device may receive a selection of a particular variable from the state chart, and may provide, for display and based on the selection, a user interface for defining attributes associated with the particular variable. The device may receive, via the user interface, one or more user-defined attributes for the particular variable, where at least one of the one or more user-defined attributes is defined independently of a reference to the particular variable. The device may apply the one or more user-defined attributes in the model and the state chart.
Abstract:
A model of a state machine may be created in a modeling environment, and the model may be executed over a simulation time. A duration operator may be defined within the model. The duration operator may include as an input argument, a conditional expression that may evaluate to True or False. During execution, the modeling environment may define a plurality of time steps over the course of the model's simulation time. The conditional expression of the duration operator may be evaluated at the time steps. When the conditional expression evaluates to True, the modeling environment may begin tracking elapsed simulation time, and may continue to track elapsed simulation time while the conditional expression remains True. The value of elapsed simulation time may be made available to other portions of the model.
Abstract:
A device receives information that identifies a model, of a finite state machine, that includes information that identifies a parent state and sub-states of the parent state. The device generates a data structure that designates an enumerated data type associated with the parent state, where the enumerated data type includes values corresponding to the sub-states. The device executes the model, based on the data structure, and monitors operation of the finite state machine and state transitions among some of the sub-states. The device detects, based on the state transitions, a change in an active sub-state that represents a particular sub-state, of the sub-states, that is active at a particular time during execution of the model. The device provides state transition information that identifies changes in the active sub-state over time.
Abstract:
A device may receive a state chart generated via a technical computing environment. The state chart may include a state block with a single section of textual code. The single section of textual code may include a time-based portion and an output portion. The device may initiate execution of the state chart, and may process, during the execution of the state chart, the time-based portion with a graphical engine of the technical computing environment to generate a time-based method. The device may process, during the execution of the state chart, the output portion with a textual engine of the technical computing environment to generate an output method. The device may provide the time-based method and the output method in output code, where the time-based method may be separate from the output method in the output code.
Abstract:
A computer-readable memory device may include instructions to store data describing a state machine model including source states and destination states. The device may also include instructions to store, for each of the source states, a condition field identifying a condition upon which, when satisfied, the state machine model transitions from the source state to one of the destination states. The device may also include instructions to store, for each of source states, a destination field identifying the one of the destination states. Each of at least two of the source states may identify an identical destination state in the corresponding destination field. Each of at least two of the source states may identify an identical condition in the corresponding condition field.
Abstract:
A device receives a state chart that includes a state block, and receives a time-based or an event-based operator (time-based/event-based operator) associated with the state block. The time-based/event-based operator includes textual code understood by a textual engine of technical computing environment (TCE), and a portion of the time-based/event-based operator is not understood by a graphical engine of the TCE. The device transforms the portion of the time-based/event-based operator into a form that is understood by the graphical engine, and initiates execution of the state chart. The device processes, during the execution of the state chart, the transformed portion of the time-based/event-based operator and the state block with the graphical engine to generate graphical results. The device processes, during the execution of the state chart, the textual code of the time-based/event-based operator with the textual engine to generate textual results, and combines the graphical results with the textual results.
Abstract:
A model of a state machine may be created in a modeling environment, and the model may be executed over a simulation time. A duration operator may be defined within the model. The duration operator may include as an input argument, a conditional expression that may evaluate to True or False. During execution, the modeling environment may define a plurality of time steps over the course of the model's simulation time. The conditional expression of the duration operator may be evaluated at the time steps. When the conditional expression evaluates to True, the modeling environment may begin tracking elapsed simulation time, and may continue to track elapsed simulation time while the conditional expression remains True. The value of elapsed simulation time may be made available to other portions of the model.
Abstract:
A device may receive a chart generated via a technical computing environment, where the chart includes a textual portion and a graphical portion, and the graphical portion includes state information. The device may parse the chart into the textual portion and the graphical portion, and may process the textual portion with a textual engine of the technical computing environment to generate textual results. The device may process the graphical portion with a graphical engine of the technical computing environment to generate graphical results, and may combine the textual results with the graphical results to generate chart results. The device may output or store the chart results.