| 3210 | } |
| 3211 | |
| 3212 | void 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 | |
| 3235 | bool Engine::minimizeCostWithGurobi( const LinearExpression &costFunction ) |
| 3236 | { |
nothing calls this directly
no test coverage detected