Getting the status of a simulation engine

This endpoint enables you to get the status of the simulation engine.

The response provides an XML file according to orca2.xsd (see ORCA2.xsd).

In the response, 3 elements can be detected:

Status of the engine

The status of the simulation engine is reported in the XML tag <Action>:

Action Description

Waiting

The engine is ready to receive a request.

Working

​The engine is waiting to get free resources to run the request.

Closing

The engine is releasing the resource after a shutdown request.

ImportingNetworkData

The engine is loading the network data; it is not ready to receive a run request.

ImportingRealTimeData

​The engine is updating real time data.

ExportingData

The engine is exporting the result of the run request.

PerformingSimulation

The engine is running the simulation.

PerformingDTA

The engine is computing the route search in DTA.

Status of the simulation

The status of the simulation is stored in the attribute status of the XML tag <simulation>.

Status Description

0

Ready.

The request is in the queue, waiting to be run.

1

Completed.

The simulation has been completed.

2

InProgress.

The simulation is started but not completed.

3

CalculatingKPI.

The simulation is completed and the KPI computations are started but not completed.

4

​CompletedKPI.

The KPI has been calculated and is available to be analyzed.

5

ErrorKPI.

Error during the KPI computation.

6

Cancelled.

The request has been canceled by the user.

7

Failed.

The request has failed.

Status of the simulation group

The status of the simulation group is stored in the attribute status of the XML tag <simulationGroup>.

Status Description
0

Ready

The simulation group is ready to be run and the engine can take it in charge as soon as its computing resources are free.

1

Completed

All the simulations of the simulation group are completed.

2

InProgress

The first simulation the simulation group has started.

6

Cancelled

The execution was canceled by the user.

7

Failed

An error occurred during the execution.

Configuration of ISO 8601 date format

You can get a response including a timestamp:

The option is handled through a string parameter associated with the tag <configuration>/<api-date-format> of the file /opt/ptv-optima-as/standalone/configuration/optima/optima-configuration.xml.

Property

Type

Description

api-date-format

String

It determines the timestamp format:

  • iso: the timestamp is in the format ISO 8601
  • legacy: otherwise

Important:  If api-date-format is not present in the optima-configuration.xml file, the legacy timestamp is enabled.

Example

If api-date-format=iso, the result is:

<simt>2023-02-14T14:20:40+01:00</simt>
<sday>2023-02-14T00:00:00+01:00</sday>

If api-date-format=legacy, the result is:

<simt>2023-02-14 14:20:40 (+01:00)</simt>
<sday>14/02/2023 00:00:00</sday>

Authentication phase

Before using the endpoint, you must run the authentication phase (→ Login).

After the authentication, a session opens and a valid session token persists until: