ContentsIndexHome
PreviousUpNext
IAimmsMathProgramCallback::GetNextCuts Method

Get user cuts from AIMMS.

virtual _LONG_T GetNextCuts(
    int max_no, 
    int max_elem_cut, 
    double lb[], 
    double ub[], 
    int nnonz[], 
    int col_no[], 
    double val[], 
    int is_local[], 
    int is_purgeable[]
) = 0;
Parameters 
Description 
int max_no 
Number of cuts to be retrieved. Value can be -1 which has a special meaning; see below. 
int max_elem_cut 
Deprecated; not used. 
double lb[] 
Double-valued array with the lower bounds of the cuts. Length must be at least max_no. This argument may be NULL. 
double ub[] 
Double-valued array with the upper bounds of the cuts. Length must be at least max_no. This argument may be NULL. 
int nnonz[] 
Integer array with the number of nonzero elements in each cut. Length must be at least max_no. This argument may be NULL. 
int col_no[] 
Integer array with the column numbers of the cut elements.Length must be equal to max_no times the return value of the GetMaximumCutElements method. This argument may be NULL. 
double val[] 
Double-valued array with the cut coefficients.Length must be equal to max_no times the return value of the GetMaximumCutElements method. This argument may be NULL. 
int is_local[] 
Integer array of length max_no, indicating for each cut whether it is a local (value 1) or global (value 0) cut. This argument may be NULL. 
int is_purgeable[] 
Integer array of length max_no, indicating for each cut whether it is purgeable (value 1) or not (value 0) cut. This argument may be NULL. 

The number of user cuts added during the last call to the RunCallback method.

The GetNextCuts method returns information about user cuts added during a cuts callback. It should only be called just after the RunCallback method returns from a cuts callback.

  1. The GetNextCuts method can be called with argument max_no equal to -1. In that case this method only returns the number of cuts added during the last call to the RunCallback method. All other arguments are ignored and hence can be NULL.
  2. The best way to use this method is to first call the GetNextCuts method with argument max_no equal to -1 to obtain the number of cuts added during the last call to the RunCallback method, and call the GetMaximumCutElements method to obtain the maximum number of elements among all cuts added during the last call to the RunCallback method. Using these two numbers you can then allocate the buffers for the array arguments of GetNextCuts before finally calling GetNextCuts to retrieve the actual cut data.

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