ContentsIndexHome
PreviousUpNext
ISolverMathProgramInstance::DoTuning Method

Loads and tunes a math program instance, or tunes one or more MPS files.

virtual void DoTuning(
    _LONG_T options, 
    _LONG_T int_param[], 
    double dbl_param[], 
    size_t int_stat[], 
    double dbl_stat[], 
    _LONG_T nr_int_opt, 
    _LONG_T int_opt_stat[], 
    _LONG_T int_opt_tuned[], 
    _LONG_T nr_dbl_opt, 
    _LONG_T dbl_opt_stat[], 
    double dbl_opt_tuned[], 
    _LONG_T nr_files, 
    _LONG_T start_pos[], 
    _LONG_T filenames_len, 
    char * filenames
) = 0;
Parameters 
Description 
_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 tuning 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 tuning 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 tuning the problem, indexed over the DoubleMathProgramStatus enumaration 
_LONG_T nr_int_opt 
Number of integer solver options 
_LONG_T int_opt_stat[] 
On input, tuning action to be taken for each integer solver option. On output, tuning result for each integer solver option. Value taken from the TuningType enumeration 
_LONG_T int_opt_tuned[] 
The tuned value of the integer solver options 
_LONG_T nr_dbl_opt 
Number of double-valued solver options 
_LONG_T dbl_opt_stat[] 
On input, tuning action to be taken for each double-valued solver option. On output, tuning result for each double-valued solver option. Value taken from the TuningType enumeration 
double dbl_opt_tuned[] 
The tuned value of the double-valued solver options 
_LONG_T nr_files 
Number of MPS files. Value can be 0 in which case the model data should be transferred from AIMMS to the solver (similar to method DoSolve
_LONG_T start_pos[] 
Integer array of length nr_files containing the starting position of the MPS file names 
_LONG_T filenames_len 
Length of filenames, i.e., the total length of all MPS file names 
char * filenames 
String containing the MPS file names where filenames[start_pos[i]] contains the start of name i 

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

The DoTuning method is called by AIMMS to request a solver to load and tune a math program instance, or to tune one or more MPS files. In case the solver is able of loading and tuning a math program instance then the implementation of this method for a particular solver should be similar to method DoSolve and 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 tune the problem.
  • Pass status information regarding the tuning process back to AIMMS.
In case the solver is able of tuning one or more MPS files the implementation of this method should include:
  • Retrieve changed option settings.
  • Pass names of MPS files to the solver.
  • Call the solver to actually tune the problem.
  • Pass status information regarding the tuning process back to AIMMS.
AIMMS does not retrieve the solution for the given math programming instance after calling the DoTuning method.

  1. The DoTuning method will only be called by AIMMS if the capability flag SolverCapability2::CAPAB2_TUNING is set in the GetInitialInfo method.
  2. AIMMS will not attempt to retrieve the solution from the solver.

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