Initializing help system before first use

ScenarioExecutionStatus

Contains information about the current state of execution
Example
// Retrieving an ExecutionStatus from a scenario.
var statusPromise = scenario.getCurrentExecutionStatus();
statusPromise
     .then( function (status) {
         // status available here
     });

Method summary

name description
getExecutionTime The amount of time this job has been executing.
getGap Returns the current relative gap for this job.
getJobId The identifier of the job associated with this execution status.
getNumberOfSolutions Returns the current number of solutions for this job.
getObjective Returns the current objective value for this job.
getScenarioId The identifier of the scenario associated with this execution status.
getStatus Return the job state code.
isExecuting Returns true if this job is executing.
isQueued Returns true if this job is queued for execution.
constructor

Constructor

new ScenarioExecutionStatus ( scenarioId, data )

Snapshot of the current scenario's execution status.

Parameters:
params
Name Type Description
scenarioId the scenario associated with this execution status
data execution status data
details

Methods

method
getExecutionTime ( ) → {number}

The amount of time this job has been executing.

details
Returns:
returns table
Type Description
type
number
the amount of time this job has been executing
Example
examples
var execTimeInMs = status.getExecutionTime();
Back to Top
method
getGap ( ) → {number}

Returns the current relative gap for this job.

details
Returns:
returns table
Type Description
type
number
the current relative gap for this job
Example
examples
var gapNum = status.getGap();
Back to Top
method
getJobId ( ) → {string}

The identifier of the job associated with this execution status.

details
Returns:
returns table
Type Description
type
string
the job identifier associated with this execution status
Example
examples
var jobId = status.getJobId();
Back to Top
method
getNumberOfSolutions ( ) → {number}

Returns the current number of solutions for this job.

details
Returns:
returns table
Type Description
type
number
the current number of solutions for this job
Example
examples
var numSolutions = status.getNumberOfSolutions();
Back to Top
method
getObjective ( ) → {number}

Returns the current objective value for this job.

details
Returns:
returns table
Type Description
type
number
the current objective value for this job
Example
examples
var num = status.getObjective();
Back to Top
method
getScenarioId ( ) → {string}

The identifier of the scenario associated with this execution status.

details
Returns:
returns table
Type Description
type
string
the scenario identifier associated with this execution status
Example
examples
var scenId = status.getScenarioId();
Back to Top
method
getStatus ( ) → {insight.enums.ScenarioExecutionStatus}

Return the job state code.

details
Returns:
returns table
Type Description
type
insight.enums.ScenarioExecutionStatus
the job state code
Example
examples
if ( status.getStatus() === insight.enums.ScenarioExecutionStatus.EXECUTING ) {
     // do something if scenario is executing
}
Back to Top
method
isExecuting ( ) → {boolean}

Returns true if this job is executing.

details
Returns:
returns table
Type Description
type
boolean
true if this job is executing, otherwise false
Example
examples
if ( status.isExecuting() ) {
     // run if scenario is currently executing.
}
Back to Top
method
isQueued ( ) → {boolean}

Returns true if this job is queued for execution.

details
Returns:
returns table
Type Description
type
boolean
true if this job is queued for execution, otherwise false
Example
examples
if ( status.isQueued() ) {
     // run if scenario is currently queued for execution.
}
Back to Top