Scippy

SCIP

Solving Constraint Integer Programs

AMPLProblemHandler::LinearExprHandler Class Reference

Detailed Description

handles linear part of a common expression sets up a sum expression, if the linear part isn't empty

Definition at line 742 of file reader_nl.cpp.

Public Member Functions

 LinearExprHandler (AMPLProblemHandler &amplph_, int index, int num_linear_terms)
 constructor More...
 
void AddTerm (int var_index, double coef)
 receives notification of a term in the linear expression More...
 

Constructor & Destructor Documentation

◆ LinearExprHandler()

AMPLProblemHandler::LinearExprHandler::LinearExprHandler ( AMPLProblemHandler amplph_,
int  index,
int  num_linear_terms 
)
inline

constructor

Parameters
amplph_problem handler
indexindex of common expression
num_linear_termsnumber of terms to expect

Definition at line 750 of file reader_nl.cpp.

References NULL, SCIP_CALL_THROW, and SCIPcreateExprSum().

Member Function Documentation

◆ AddTerm()

void AMPLProblemHandler::LinearExprHandler::AddTerm ( int  var_index,
double  coef 
)
inline

receives notification of a term in the linear expression

Parameters
var_indexAMPL index of variable
coefvariable coefficient

Definition at line 767 of file reader_nl.cpp.

References NULL, SCIP_CALL_THROW, SCIPappendExprSumExpr(), SCIPcreateExprVar(), and SCIPreleaseExpr().