Skip to content
On this page

Scenario Object Reference

 

This Scenario object is the response to a simulation request.

json
  {
    "Id":"do.vj5rf3xjrgsvhzzuqejwa",
    "StatusNbr": 2,
    "StatusDescription": "Request started",
    "SimulationStates": [
      {
        "StatusTimestamp" : "08/22/2022 22:28:44",
        "StatusNbr" : 2,
        "Message" : "Request started"
      },
      {
        "StatusTimestamp" : "08/22/2022 22:28:43",
        "StatusNbr" : 1,
        "Message" : "Received request"
      }
    ],
    "Progress": null,
    "ResourcesForecast": null,
    "NoSolutionGraphs": null,
    "Errors": null,
    "Settings": null,
  }

INFO

A simulation request involves a series of operations to fulfill a request. SimulationStates identify the states a request has completed. The content of the Scenario object corresponds to those states.

For example, the submitted PoolResourcesModel may fail validation. The request will then be terminated and report StatusNbr 14, along with the Error object identifying the nature of the error. If a request reaches an executing simulation state, StatusNbr 6, Progress will contain information.

If the submitted PoolResourcesModel contains one or more constraints, solutions may be omitted from the solution space that do not comply with the included constraints. Omitted solutions (in the form of graphs) are reported in the NoSolutionsGraph object. It is also feasible, no solution may comply with the included constraints, and the ResourcesForecast object will therefore be null.

Attributes

Id - string
Uniquely identifies a scenario.
StatusNbr - integer
Status number of the most recent simulation state.
StatusDescription - string
Status description of the most recent simulation state.
SimulationStates - array of objects
Identifies the various states of a simulation task. A request is managed as an on-demand task. An error-free request proceeds through states 1 - 7. Any state above 7 indicates a state in which a task cannot complete and a scenario cannot be generated. When a request is reporting the simulator is running (state 6), the Progress object provides progress information.

INFO

The Pool Resources Model is large and it's fairly common that initial attempts to run a simulation with a newly specified model will fail validation. The reported simulation states will be 1,2 and 14. Description of the error(s) are found in the Error object.

Progress - object
Description of progress and transactional statistics of a running simulation. Available when Simulation State is 6 or 7.
Results - array of objects
Object that contains a preferred result with respect to the type of simulation selected. The object is a collection of key performance metrics and time-series forecasts for each pool resource.
Time-Series Collection Items
  • Financial KPI
  • Financial Summary
  • Hardware KPI
  • Hardware Summary
  • Hardware Transactions
  • Software KPI
  • Software Summary
  • Software Transactions
  • Facility KPI
  • Facility Summary
  • Facility Transactions
NoSolutionGraphs - array of objects
A list of graph object for which a solution was not found. A graph with no solution may arise when the model includes a Constraints object.
Errors - array of objects
List of scenario error descriptions.
Settings - object
Object that contains user provided values received from the PoolResourceModel Settings object. Zypr adds several date properties to this object and returns the Scenario Settings object.

 

SimulationStates

This SimulationStates object reports the various states a request steps through to generate a scenario.

json
  {
    "StatusTimestamp" : "08/22/2022 22:28:43",
    "StatusNbr" : 3,
    "Message" : "Model validation succeeded"
  }

Attributes

StatusTimestamp - DateTime in UTC
Indicates when the state was posted.
StatusNbr - integer
The status number that corresponds to a simulation state.
Message - string
Describes the simulation state that corresponds to the status number.
Status Numbers and Description
NbrDescription
1Received request
2Start request initiated
3Model validation succeeded
4Request added to simulator queue
5Simulator verified start
6Simulator is executing
7Simulator completed
8Simulator reports error
9Request exceeds user's rate limit
10A required database transaction failed
11Server returned an error
12Request to run simulator failed
13Request failed simulator host service authentication
14Model validation failed

 

Progress

This Progress object reports the current progress of a running scenario.

json
  {
    "Started": true,
    "Completed": false,
    "PercentComplete": 42,
    "TransactionCount": 12847,
    "SequenceCount": 832 
  }

 

TIP

To fetch the status of a running scenario use the appropriate GET endpoint in Simulation Management

Attributes

Started - boolean
Indicates the simulator has a valid input model to work with and construction of a scenario has commenced.
Completed - boolean
The simulator has completed and generated a scenario or encountered an error.
PercentComplete - integer
An estimate of progress to generate a scenario.
TransactionCount - integer
An estimate of feasible server add/remove transactions.
TransactionCount - integer
An estimate of feasible sequences of transactions corresponding to time-series duration as indicated by SolutionTargetTime property in the SimulationRules object.

 

Resources Forecast

This ResourcesForecast object reports the results of the scenario. Definitions of each object can be found in Resources Forecast object reference.

json
  {
    "FinancialKpi": {},
    "FinancialSummary": {},
    "ServerKPI": {},
    "ServerSummary": {},
    "ServerTransactions": {}, 
    "SoftwareKPI": {},
    "SoftwareSummary": {},
    "SoftwareTransactions": {},
    "FacilityKPI": {},
    "FacilitySummary": {},
    "FacilityTransactions": {} 
  }

 

No Solution Graphs

This NoSolutionGraphs object may list of one or more graphs that failed because a solution could not be found for that graph. If the Constraints object is used to constrain the feasible solution space, it is likely the object has a value that is too restrictive.

json
  {
    "FailedGraphNbr": 9,
    "EdgeNbr" : 0,
    "NodeY" : 0,
    "NodeX" : 0,
    "Message:" "Your constraint is too restrictive.
                No graph solution compliant with constraint."
    "AtRelativeTargetTime": 0.0,
    "AtAbsoluteTargetTime": 0.0,
    "LowestConstraintMetricVarianceRate": 0.0,
    "StackTrace": null,
    "NonCompliantSequences": null
  }

 

INFO

The code block above indicates the solution space for Graph 9 is empty. This graph failed immediately at start time 0.0, indicated by both the AtRelativeTargetTime and AtAbsoluteTargetTime at 0.0, and the graph's EdgeNbr, and node address at NodeY, and NodeX, which are both 0.

Attributes

FailedGraphNbr - integer
The graph number the simulation engine attempted to build, but failed.
EdgeNbr - integer
Edge number of graph.
NodeY - integer
Node Y dimension of edge number.
NodeX - integer
Node X dimension of edge number.

INFO

Graph, Edge, and Node numbers represent a location address in Zypr's simulation engine.

Message - string
Description of failure.
AtRelativeTargetTime - numeric
Time (yrs) of failure relative to the edge number.
AtAbsoluteTargetTime - numeric
Time (yrs) of failure in absolute time.
LowestConstraintMetricVarianceRate - numeric
Variance from the target constraint.

 

Errors

This Error object identifies and describes one or more errors.

json
  {
    "Type": "Model input error",
    "Message": "Processor Set Size must be positive at JE 2",
  }

 

INFO

The code block above indicates the received PoolResourceModel object failed validation. The Message description refers to a Jump Event with EventId #2 in the JumpEvents object.

Attributes

Type - string
Error type.
Message - string
Detailed description of error.

 

Settings

This Scenario Settings object is includes properties received from the PoolResourcesModel Settings object, plus Zypr generated date properties used to generated all time-series results.

json
  {
    "ScenarioName": "My Scenario Name",
    "DataValidationCascadeMode": "Stop",
    "ModelEffectiveDate": "1/7/2022",
    "ModelStartDate": "1/7/2022",
    "ScenarioCreatedDate": "3/1/2022",
    "CultureInfoISOCode": "EN",
    "EmailResults": true,
    "Pool": {
      "Id": "ATL1_42_PROD",
      "Name": "Name of service pool",
      "Description": "A long description of pool"
    },
  }

Attributes (added by Zypr)

ModelStartDate - date
Starting date of time-series forecast contained in Results object. If a valid ModelEffectiveDate was received from the PoolResourcesModel Settings object, then the ModelStartDate property is set to this date. If a valid ModelEffectiveDate was not received, then the ModelStartDate property is set to the ScenarioCreateDate property.
ScenarioCreateDate - date
Timestamp when scenario was created and executed.

Ravello Analytics, LLC