MCPcopy Create free account
hub / github.com/NeuralNetworkVerification/Marabou / informLPSolverOfBounds

Method informLPSolverOfBounds

src/engine/Engine.cpp:3212–3233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3210}
3211
3212void Engine::informLPSolverOfBounds()
3213{
3214 if ( _lpSolverType == LPSolverType::GUROBI )
3215 {
3216 struct timespec start = TimeUtils::sampleMicro();
3217 for ( unsigned i = 0; i < _preprocessedQuery->getNumberOfVariables(); ++i )
3218 {
3219 String variableName = _milpEncoder->getVariableNameFromVariable( i );
3220 _gurobi->setLowerBound( variableName, _tableau->getLowerBound( i ) );
3221 _gurobi->setUpperBound( variableName, _tableau->getUpperBound( i ) );
3222 }
3223 _gurobi->updateModel();
3224 struct timespec end = TimeUtils::sampleMicro();
3225 _statistics.incLongAttribute( Statistics::TIME_ADDING_CONSTRAINTS_TO_MILP_SOLVER_MICRO,
3226 TimeUtils::timePassed( start, end ) );
3227 }
3228 else
3229 {
3230 // Bounds are already up-to-date in Tableau when using native Simplex.
3231 return;
3232 }
3233}
3234
3235bool Engine::minimizeCostWithGurobi( const LinearExpression &costFunction )
3236{

Callers

nothing calls this directly

Calls 8

updateModelMethod · 0.80
incLongAttributeMethod · 0.80
getNumberOfVariablesMethod · 0.45
setLowerBoundMethod · 0.45
getLowerBoundMethod · 0.45
setUpperBoundMethod · 0.45
getUpperBoundMethod · 0.45

Tested by

no test coverage detected