ContentsIndexHome
PreviousUpNext
ISolverMathProgramInstance::DoSolve Method

Loads and solves a math program instance.

virtual void DoSolve(
    _LONG_T type, 
    _LONG_T options, 
    _LONG_T int_param[], 
    double dbl_param[], 
    size_t int_stat[], 
    double dbl_stat[]
) = 0;
Parameters 
Description 
_LONG_T type 
The solve type to be performed by the solver, taken from the SolveType enumeration 
_LONG_T options 
If 1 then at least one of the solver related options has changed and the solver should retrieve these changed options by calling the GetChangedOptions method before actually solving the problem 
_LONG_T int_param[] 
The integer problem parameter array of size IntegerMathProgramInfo::IPARAM_MAX, indexed over the IntegerMathProgramInfo enumeration 
double dbl_param[] 
The double-valued problem parameter array of size DoubleMathProgramInfo::DPARAM_MAX, indexed over the DoubleMathProgramInfo enumeration 
size_t int_stat[] 
The integer solution status array of size IntegerMathProgramStatus::ISTAT_MAX to be filled by the solver after solving the problem, indexed over the IntegerMathProgramStatus enumeration 
double dbl_stat[] 
The double-valued solution status array of size DoubleMathProgramStatus::DSTAT_MAX to be filled by the solver after solving the problem, indexed over the DoubleMathProgramStatus enumaration 

The DoSolve method has no return value. Instead the status is returned via the int_stat and dbl_stat output arguments.

The DoSolve method is the main method called by AIMMS to request a solver to load and solve a math program instance. The implementation of the method for a particular solver should include the following tasks:

  • Store relevant problem information passed by AIMMS.
  • Retrieve changed option settings.
  • Transfer model data from AIMMS to the solver.
  • Call the solver to actually solve the problem.
  • Pass status information regarding the solution process back to AIMMS.
The DoSolve method does not have pass the solution back to AIMMS. Instead, AIMMS will call the GetRowSolution and GetColumnSolution methods to retrieve the solution for the given math program instance.

Copyright © 1993–2016 by AIMMS B.V. All rights reserved.