ContentsIndexHome
PreviousUpNext
IAimmsMathProgramNonLinearEvaluator::EvaluateDiffRow Method

Evaluate a nonlinear row and calculate the Jacobian.

virtual _LONG_T EvaluateDiffRow(
    _LONG_T row_no, 
    double point[], 
    int new_point, 
    double jac[], 
    double * val
) = 0;
Parameters 
Description 
_LONG_T row_no 
The row number. 
double point[] 
Double-valued array containing the point of evaluation. The length of the array should match the total number of columns. 
int new_point 
The new point indicator. If this argument is set to 0, then AIMMS ignores the point argument and uses the same point as in the previous call to the method. If set to 1, then AIMMS will use the point information passed to point
double jac[] 
Double-valued array containing the Jacobian values on output. The length of the array should match the total number of columns. 
double * val 
A pointer to the location where the function value is returned. 

The EvaluateDiffRow method returns the number of domain (evaluation) errors that occurred while calculating the function value and the Jacobian.

The EvaluateDiffRow method is used to let AIMMS evaluate a nonlinear row and calculate the Jacobian values of that row. AIMMS will also calculate the linear part of the row if the capability flag SolverCapability::CAPAB_EVAL_LIN_PART is set in the GetInitialInfo method, else AIMMS will only calculate the nonlinear part. This method should be used only for nonlinear models.

  1. The performance of EvaluateDiffRow increases if AIMMS can use the same point as in the previous call. Therefore you should use the setting new_point=0 as much as possible.
  2. The total number of columns in the model is equal to the value of parameter IntegerMathProgramInfo::IPARAM_COLS, as passed to the DoSolve method.
  3. If the capability flag SolverCapability::CAPAB_EVAL_LIN_PART has been set in the GetInitialInfo method, then AIMMS will not empty the Jacobian vector jac prior to filling it, but only store Jacobian elements for those variables on which the given row depends nonlinearly. Setting this flag can result in a substantial decrease of the Jacobian evaluation time, but your solver should only refer to those elements that are actually replaced.

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