![]() |
Google OR-Tools v9.12
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 |
void | AddRoute (absl::Span< const int64_t >, absl::Span< const 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 |
![]() | |
virtual | ~RoutingLinearSolverWrapper ()=default |
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) |
Additional Inherited Members | |
![]() | |
static const int | kNoConstraint = -1 |
Definition at line 278 of file routing_lp_scheduling.h.
|
inline |
Definition at line 280 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 391 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
There are no terms in the objective.
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 365 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 393 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
When solving a scheduling problem, this can be called to add hints that help the underlying solver:
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 396 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 285 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 339 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 347 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 290 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 336 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 435 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 438 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 323 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 326 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 364 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 344 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Prints an understandable view of the model
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 455 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Necessary to keep the model clean (cf. glop::LinearProgram::NotifyThatColumnsAreClean).
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 357 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 395 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 333 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 446 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 296 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 293 of file routing_lp_scheduling.h.
|
inlineoverridevirtual |
Implements operations_research::RoutingLinearSolverWrapper.
Definition at line 441 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 397 of file routing_lp_scheduling.h.