ContentsIndexHome
PreviousUpNext
Request to solve a model

Obviously the most interesting part of the AimmsOSI is the phase in which AIMMS requests the solver to solve a specific model. This phase typically consists of the following sequence:

  • AIMMS initiates the solution process by calling a function that passes parameter values related to the size and other characteristics of the model.
  • Subsequently, your solver typically starts a sequence of data retrieval requests to AIMMS to obtain
    • the current value of all options not at their default value,
    • all relevant column data such as lower and upper bounds, level values, basis status, etc.,
    • all relevant row data (similar to column data), and
    • the initial nonzero pattern (for nonlinear programming) and the coefficients associated with the underlying model matrix.
  • When all data is obtained, the solver starts the solution algorithm. During the solution process, your solver will make callbacks to AIMMS in order to:
    • report progress information,
    • get function and/or Jacobian values associated with nonlinear constraints, and
    • execute model-defined callback procedures written in AIMMS.
  • After the solution algorithm has terminated, AIMMS will request the solution and, optionally, various types of sensitivity data provided by your solver.

Before every request to solve a completely new model, AIMMS will call the function Reset. When called, you should set all relevant options back to their default, and if useful and possible, free all dynamically allocated memory chunks. 

Through the function DoSolve AIMMS will request your solver to Solve request solve a model, and will pass information about the model such as the number of rows and columns, the optimization direction, etc. In addition, AIMMS signals your solver whether there are option settings that have been changed. 

In addition to models directly generated on the basis of a mathematical program defined in an AIMMS model, AIMMS can also request your solver to solve auxiliary models based on the original model formulation. Such models are generated automatically by AIMMS, with the purpose of computing particular types of advanced sensitivity information requested by the user. In those cases you may wish to keep the original model, if at all possible, to allow for subsequent update runs of the original model. 

If the initiating call to DoSolve indicated that some of the global or solver-specific options have been modified, you should call the function GetChangedOptions to obtain the current settings before the actual solution process. 

The next step before the solution process is to retrieve all model data from AIMMS. This model data can be retrieved by calling the functions

During an AIMMS session the solver commonly receives requests to consecutively solve the same model with only small changes in the model data. AIMMS and many solvers offer facilities to communicate only the changes (or updates) to the model since the last solve. In the call to DoSolve AIMMS will indicate whether a solve only concerns an update to the previously solved model. If it is an update, you can indicate in the three data retrieval functions for rows, columns and matrix data whether you just want to retrieve the full problem again, or only the updates. If a your solver does cannot deal with updates, you can indicate this during the solver initialization phase, which will cause AIMMS never to suggest the partial retrieval mode for retrieving the updates. 

In case the solver can handle updates and the solver has requested the partial retrieval mode, AIMMS will only provide the column, row and matrix updates. The performance of your solver may drastically improve when it has built-in facilities that allow for just a modification of existing data. 

The function SetMatrixOrder must be used if the solver wants to use a column-wise representation of the underlying matrix instead of the default row-wise representation. In addition, this function must be called by the solver prior to each full data retrieval to indicate to AIMMS that its internal row and column counts must be reset to zero. 

The functions GetRowData and GetColumnData are used by the solver-interface DLL to obtain the lower and upper bounds, level values, basis status, etc. of all, or only the updated, the rows and columns of the problem. 

The function GetMatrixData is used to pass all, or only the updated, non-zero coefficients of the model matrix. In addition, for nonlinear programming models, this function will indicate whether a row depends linearly or nonlinearly on a particular variable. 

The above three functions must be used for every model type. Whenever the model contains special ordered sets, is a quadratic programming model, or a mixed complementarity model, there are additional functions to retrieve this specific model data, namely ... 

When a mathematical programming model contains nonlinear constraints, you can call the function EvaluateRow during the solution process to let AIMMS compute the value of the nonlinear component of a particular row based on the current value of the columns. 

Similarly, the function EvaluateDiffRow can be used to let AIMMS calculate not only the nonlinear function values, but also the associated first-order derivative values (i.e. Jacobian values) corresponding to a particular constraint based on the current value of the variables.

Name 
Description 
During the solution process you should make calls to various callback functions on a regular basis. These functions allow AIMMS to
  • display a variety of progress-related information,
  • run special callback procedures, which are defined in the calling AIMMS model, and
  • handle pending Windows related messages, for example for screen updating.
 
When the completion of the solution process, AIMMS calls the functions  
Copyright © 1993–2016 by AIMMS B.V. All rights reserved.