Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <routing_lp_scheduling.h>
Public Member Functions | |
RoutingGlopWrapper (bool is_relaxation, const glop::GlopParameters ¶meters) | |
void | Clear () override |
int | CreateNewPositiveVariable () override |
void | SetVariableName (int index, absl::string_view name) override |
bool | SetVariableBounds (int index, int64_t lower_bound, int64_t upper_bound) override |
void | SetVariableDisjointBounds (int index, const std::vector< int64_t > &starts, const std::vector< int64_t > &ends) override |
int64_t | GetVariableLowerBound (int index) const override |
int64_t | GetVariableUpperBound (int index) const override |
void | SetObjectiveCoefficient (int index, double coefficient) override |
double | GetObjectiveCoefficient (int index) const override |
void | ClearObjective () override |
int | NumVariables () const override |
int | CreateNewConstraint (int64_t lower_bound, int64_t upper_bound) override |
void | SetCoefficient (int ct, int index, double coefficient) override |
bool | IsCPSATSolver () override |
void | AddObjectiveConstraint () override |
void | AddMaximumConstraint (int, std::vector< int >) override |
void | AddProductConstraint (int, std::vector< int >) override |
void | SetEnforcementLiteral (int, int) override |
DimensionSchedulingStatus | Solve (absl::Duration duration_limit) override |
int64_t | GetObjectiveValue () const override |
double | GetValue (int index) const override |
bool | SolutionIsInteger () const override |
void | SetParameters (const std::string ¶meters) override |
This function is meant to override the parameters of the solver. | |
std::string | PrintModel () const override |
Public Member Functions inherited from operations_research::RoutingLinearSolverWrapper | |
virtual | ~RoutingLinearSolverWrapper () |
virtual bool | ModelIsEmpty () const |
Returns if the model is empty or not. | |
int | AddVariable (int64_t lower_bound, int64_t upper_bound) |
Adds a variable with bounds [lower_bound, upper_bound]. | |
int | AddLinearConstraint (int64_t lower_bound, int64_t upper_bound, absl::Span< const std::pair< int, double > > variable_coeffs) |
int | AddReifiedLinearConstraint (int64_t lower_bound, int64_t upper_bound, absl::Span< const std::pair< int, double > > weighted_variables) |
Definition at line 266 of file routing_lp_scheduling.h.
|
inline |
Definition at line 268 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 379 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
There are no terms in the objective.
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 353 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 381 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 273 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 327 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 335 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 278 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 324 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 418 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 421 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 311 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 314 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 352 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 332 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Prints an understandable view of the model
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 438 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Necessary to keep the model clean (cf. glop::LinearProgram::NotifyThatColumnsAreClean).
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 345 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 383 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 321 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
This function is meant to override the parameters of the solver.
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 429 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
When variable upper bounds are greater than this threshold, precision issues arise in GLOP. In this case we are just going to suppose that these high bound values are infinite and not set the upper bound.
The linear_program would not be feasible, and it cannot handle the lp_min > lp_max case, so we must detect infeasibility here.
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 284 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 302 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 281 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 424 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Because we construct the lp one constraint at a time and we never call SetCoefficient() on the same variable twice for a constraint, we know that the columns do not contain duplicates and are already ordered by constraint so we do not need to call linear_program->CleanUp() which can be costly. Note that the assumptions are DCHECKed() in the call below.
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 384 of file routing_lp_scheduling.h.