Analytics Builder 10.13.0 | Using Analytics Builder for Cumulocity IoT | Using the Model Manager | Deploying a model
 
Deploying a model
A model (or instance) can have one of two states. The current state is always indicated on the card that is shown for a model:
*Active. This state indicates that the model has been deployed.
*Inactive. This state indicates that the model is currently not deployed.
The inputs that a model receives and what happens to its outputs depends on the mode to which the model is set. Each model can be set to one of the following modes:
*Draft. The model is still under development. (New models are created in draft mode.)
*Test. This mode is only permitted for models using a single device. When active, the model is deployed to the Apama correlator so that the measurements and events from the device are processed. The output of the model is only stored (and recorded as an Operation or Measurement object of a virtual device) and not sent back to the device.
Note:
Test mode is not supported for a model which contains a custom block which consumes input data and also produces output data. Custom blocks are created with the Block SDK; see also Creating your own blocks.
*Simulation. This mode is only permitted for models using a single device. When active, the model uses historical input data (replayed in real time from previously received data) and is deployed to the Apama correlator. The output of the model is only stored (and recorded as an Operation or Measurement object of a virtual device) and not sent back to the device. To start a simulation, you must define the time range from which the input data is to be used. When all data from the time range has been replayed, the model is automatically undeployed from Apama and the model state is changed to Inactive. The timestamps of the historical data entries remain unchanged for easier comparison of simulation runs. See also Model Simulation.
*Production. When active, the model is deployed to the Apama correlator so that the measurements and events from the devices are processed. The output of the model is stored and sent back to the devices.
A model in draft mode can only be in the Inactive state. A model in test, simulation or production mode can be in either the Active or Inactive state.
Note:
The above information on the different states and modes similarly applies for the instances of a template model. The following instruction, however, only applies for non-template models. If you want to deploy the instances of a template model, see Deploying an instance.
When a model is imported by loading a JSON file, it is always imported as an inactive model.
*To deploy a model
1. In the model manager, click the drop-down menu in the model that you want to deploy and select one of Production, Test or Simulation.
2. If you have selected simulation mode, click the calendar icon which is now shown, specify the time span that is to be used, and click Apply. See also Simulation parameters.
3. When the toggle button currently shows Inactive, click this button to change the state to Active. For simulation mode, you can only set the state to Active when a valid time range has been defined.