SCIP Doxygen Documentation
 
Loading...
Searching...
No Matches
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 1142 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 1150 of file reader_nl.cpp.

References assert().

◆ LinearPartHandler() [2/2]

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

Definition at line 1162 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 1169 of file reader_nl.cpp.

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