Scippy

SCIP

Solving Constraint Integer Programs

AMPLProblemHandler::LinearPartHandler Class Reference

Detailed Description

handles receiving the linear part of an objective or constraint

for objective, set the objective-coefficient of the variable for linear constraints, add to the constraint for nonlinear constraints, add to nlconslin vector; adding to constraint later

Definition at line 1049 of file reader_nl.cpp.

Public Member Functions

 LinearPartHandler (AMPLProblemHandler &amplph_, int constraintIndex_)
 
 LinearPartHandler (AMPLProblemHandler &amplph_)
 
void AddTerm (int variableIndex, double coefficient)
 

Constructor & Destructor Documentation

◆ LinearPartHandler() [1/2]

AMPLProblemHandler::LinearPartHandler::LinearPartHandler ( AMPLProblemHandler amplph_,
int  constraintIndex_ 
)
inlineexplicit
Parameters
amplph_problem handler
constraintIndex_constraint index

Definition at line 1057 of file reader_nl.cpp.

◆ LinearPartHandler() [2/2]

AMPLProblemHandler::LinearPartHandler::LinearPartHandler ( AMPLProblemHandler amplph_)
inlineexplicit
Parameters
amplph_problem handler

Definition at line 1069 of file reader_nl.cpp.

Member Function Documentation

◆ AddTerm()

void AMPLProblemHandler::LinearPartHandler::AddTerm ( int  variableIndex,
double  coefficient 
)
inline
Parameters
variableIndexAMPL index of variable
coefficientcoefficient of variable

Definition at line 1076 of file reader_nl.cpp.

References SCIP_CALL_THROW, SCIPaddCoefLinear(), and SCIPchgVarObj().