Error and Profiling Results as Data

Error and profiler data are stored in AIMMS’ sets and parameters; then serialized. This way, they are shared between the end-users and specialists that use the application at hand. This article discusses how this information flows through the GuardServerSession library and which procedures can be used to store error information.

Data flow of error information

The data flow of errors to support this user interface is organized as follows:


The red triangles are a stream of warnings and errors. These errors move via various steps upwards towards the blue box of errors shown in the User Interface.

There are two paths from “red” to “blue” for this error information, depending on whether the errors are generated inside the data session or in a solver session.

Data session errors

  1. Errors occurring in the data session are collected by the error handler gss::pr_appendError in gss::dataSessionProfilerErrorData which represents the orange box “Data session errors”

  2. When the WebUI page GSS Session History Management is opened, the data in the orange box is copied to the blue box, making the error data visible to the end-user.

Solver session errors

  1. Errors in solver sessions are collected by the error handler gss::pr_appendError in gss::serverSessionErrorData which represents the purple box “Solver session errors”.

  2. When the output case is loaded, this error information is loaded in the data session (to identifiers with the same name).

  3. Immediately after, this error information is copied to a slice in the green big box “Solver sessions and uploaded sessions” by the procedure gss::pr_saveTrackedSessionData.

  4. In the WebUI page GSS Session History Management, the selection widget controls which session’s error data is displayed. When you select a sessionID in the drop down, the corresponding error information is copied to the blue box and displayed.

Data flow of profiler information

The profiler information is captured at the end of a solver session, or at the start of opening the GSS Session History Management. Then it follows the same path as the error information through the application before it is shown.

Converting errors to data

Use the procedures pr_appendError and pr_appendMessage to convert errors and messages respectively to data in AIMMS identifiers. The identifiers in which this data is stored are located in:

  1. gss::dataSessionProfilerErrorData for data sessions

  2. gss::serverSessionErrorData for server sessions

  1. The procedure pr_appendError(ep_err,sp_prefix) appends the error to the open error collector.


    1. Input element parameter ep_err with range errh::PendingErrors. This is a reference to the error to be handled.

    2. Input string parameter sp_prefix. This can be used to prefix the error message stored from the message of the error referenced by ep_err.

    Throws exceptions: None

    Return value: None.

  2. The procedure pr_appendMessage(sp_msg,ep_lev) Appends the message sp_msg to the open error collector.


    1. Input string parameter sp_msg. The message to be stored.

    2. Input element parameter ep_lev with range gss::s_messageLevels and default 'info'. The importance level of the message sp_msg.

    Throws exceptions: None

    Return value: None.

Converting profiling information to data

By adding ProfilerStart() to MainInitialization the AIMMS process will start collecting profiling information.

The GuardServerSession library uses ProfilerCollectAllData() to collect the profiling information; no need to add calls to this procedure in your application.