LP interface for Glop.
Definition in file lpi_glop.cpp.
#include "ortools/base/version.h"#include "ortools/glop/lp_solver.h"#include "ortools/glop/revised_simplex.h"#include "ortools/lp_data/lp_print_utils.h"#include "ortools/lp_data/lp_data_utils.h"#include "ortools/lp_data/proto_utils.h"#include "ortools/util/file_util.h"#include "ortools/util/stats.h"#include "ortools/util/time_limit.h"#include "ortools/base/logging.h"#include "ortools/base/vlog_is_on.h"#include "lpi/lpi.h"#include "scip/pub_message.h"#include <assert.h>Go to the source code of this file.
Data Structures | |
| struct | SCIP_LPi |
| struct | SCIP_LPiState |
| struct | SCIP_LPiNorms |
Macros | |
| #define | UNSCALEDFEAS_CHECK 2 |
Variables | |
| static char * | glopname = initGlopName( ) |
| #define UNSCALEDFEAS_CHECK 2 |
uncomment to turn off scaling define feasibility check to possibly reoptimize: 0: no check, 1: completely new check, 2: check unscaled variable and activity values
Definition at line 135 of file lpi_glop.cpp.
| char * initGlopName | ( | ) |
Definition at line 147 of file lpi_glop.cpp.
References glopname.
|
static |
update scaled linear program
| lpi | LP interface structure |
Definition at line 1324 of file lpi_glop.cpp.
References SCIP_LPi::linear_program, SCIP_LPi::lp_modified_since_last_solve, SCIP_LPi::parameters, SCIP_LPi::scaled_lp, and SCIP_LPi::scaler.
Referenced by SCIPlpiStartStrongbranch(), and SolveInternal().
|
static |
check primal feasibility
| lpi | LP interface structure |
Definition at line 1344 of file lpi_glop.cpp.
References assert(), SCIP_LPi::linear_program, NULL, SCIP_LPi::parameters, SCIP_LPi::scaler, and SCIP_LPi::solver.
Referenced by SolveInternal().
|
static |
common function between the two LPI Solve() functions
| lpi | LP interface structure |
| recursive | Is this a recursive call? |
| time_limit | time limit |
Definition at line 1398 of file lpi_glop.cpp.
References assert(), checkUnscaledPrimalFeasibility(), SCIP_LPi::from_scratch, SCIP_LPi::lp_modified_since_last_solve, SCIP_LPi::lp_time_limit_was_reached, SCIP_LPi::niterations, NULL, SCIP_LPi::parameters, SCIP_LPi::scaled_lp, SCIP_Longint, SCIP_LPERROR, SCIP_OKAY, SCIPdebugMessage, SolveInternal(), SCIP_LPi::solver, and updateScaledLP().
Referenced by SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), and SolveInternal().
|
static |
determine whether the dual bound is valid
| status | status to be checked |
Definition at line 1537 of file lpi_glop.cpp.
Referenced by strongbranch().
|
static |
performs strong branching iterations
| lpi | LP interface structure |
| col_index | column to apply strong branching on |
| psol | fractional current primal solution value of column |
| itlim | iteration limit for strong branchings |
| down | stores dual bound after branching column down |
| up | stores dual bound after branching column up |
| downvalid | stores whether the returned down value is a valid dual bound; otherwise, it can only be used as an estimate value |
| upvalid | stores whether the returned up value is a valid dual bound; otherwise, it can only be used as an estimate value |
| iter | stores total number of strong branching iterations, or -1; may be NULL |
Definition at line 1546 of file lpi_glop.cpp.
References assert(), eps, EPSCEIL, EPSFLOOR, FALSE, IsDualBoundValid(), SCIP_LPi::linear_program, NULL, SCIP_LPi::parameters, SCIP_LPi::scaled_lp, SCIP_LPi::scaler, SCIP_Bool, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPerrorMessage, SCIP_LPi::solver, and TRUE.
Referenced by SCIPcollectLPStatistics(), SCIPlpiStrongbranchFrac(), and SCIPlpiStrongbranchInt().
|
static |
convert Glop variable basis status to SCIP status
| status | variable status |
| rc | reduced cost of variable |
Definition at line 2239 of file lpi_glop.cpp.
References SCIP_BASESTAT_BASIC, SCIP_BASESTAT_LOWER, SCIP_BASESTAT_UPPER, SCIP_BASESTAT_ZERO, and SCIPerrorMessage.
Referenced by SCIPlpiGetBase().
|
static |
convert Glop constraint basis status to SCIP status
| status | constraint status |
| dual | dual variable value |
Definition at line 2264 of file lpi_glop.cpp.
References SCIP_BASESTAT_BASIC, SCIP_BASESTAT_LOWER, SCIP_BASESTAT_UPPER, SCIP_BASESTAT_ZERO, and SCIPerrorMessage.
Referenced by SCIPlpiGetBase().
|
static |
Convert SCIP variable status to Glop status
| status | SCIP variable status |
Definition at line 2289 of file lpi_glop.cpp.
References SCIP_BASESTAT_BASIC, SCIP_BASESTAT_LOWER, SCIP_BASESTAT_UPPER, SCIP_BASESTAT_ZERO, and SCIPerrorMessage.
Referenced by SCIPlpiSetBase().
|
static |
Convert a SCIP constraint status to its corresponding Glop slack VariableStatus.
Note that we swap the upper/lower bounds.
| status | SCIP constraint status |
Definition at line 2314 of file lpi_glop.cpp.
References SCIP_BASESTAT_BASIC, SCIP_BASESTAT_LOWER, SCIP_BASESTAT_UPPER, SCIP_BASESTAT_ZERO, and SCIPerrorMessage.
Referenced by SCIPlpiSetBase().
|
static |
Definition at line 145 of file lpi_glop.cpp.
Referenced by initGlopName(), and SCIPlpiGetSolverName().