Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <constraint_solver.h>
Public Attributes | |
std::vector< IntVar * > | nexts |
std::vector< IntVar * > | paths |
std::vector< IntVar * > | forces |
std::vector< IntVar * > | distances |
std::vector< int64_t > | path_unit_costs |
std::vector< bool > | path_used_when_empty |
std::vector< int64_t > | path_starts |
std::vector< int64_t > | path_ends |
std::vector< IntVar * > | costs |
A constraint that maintains the energy cost of paths. Energy is the integral of force applied over distance. More formally, the energy used on a path is: energy[path] = sum(node | paths[node] == path /\ node not end) forces[next[node]] * distances[node] where forces[n] is the force needed to move loads accumulated until, but excluding weight and distances[n] is the distance from n to its successor. For instance, if a path has a route with two pickup/delivery pairs where the first shipment weighs 1 unit, the second weighs 2 units, and the distance between nodes is one, the {force/distance} of nodes would be: start{0/1} P1{0/1} P2{1/1} D1{3/1} D2{2/1} end{0/0}. The energy would be 0*1 + 1*1 + 3*1 + 2*1 + 0*1. The cost of each path is costs[path] = energy[path] * path_unit_costs[path].
Definition at line 1804 of file constraint_solver.h.
std::vector<IntVar*> operations_research::Solver::PathEnergyCostConstraintSpecification::costs |
Definition at line 1813 of file constraint_solver.h.
std::vector<IntVar*> operations_research::Solver::PathEnergyCostConstraintSpecification::distances |
Definition at line 1808 of file constraint_solver.h.
std::vector<IntVar*> operations_research::Solver::PathEnergyCostConstraintSpecification::forces |
Definition at line 1807 of file constraint_solver.h.
std::vector<IntVar*> operations_research::Solver::PathEnergyCostConstraintSpecification::nexts |
Definition at line 1805 of file constraint_solver.h.
std::vector<int64_t> operations_research::Solver::PathEnergyCostConstraintSpecification::path_ends |
Definition at line 1812 of file constraint_solver.h.
std::vector<int64_t> operations_research::Solver::PathEnergyCostConstraintSpecification::path_starts |
Definition at line 1811 of file constraint_solver.h.
std::vector<int64_t> operations_research::Solver::PathEnergyCostConstraintSpecification::path_unit_costs |
Definition at line 1809 of file constraint_solver.h.
std::vector<bool> operations_research::Solver::PathEnergyCostConstraintSpecification::path_used_when_empty |
Definition at line 1810 of file constraint_solver.h.
std::vector<IntVar*> operations_research::Solver::PathEnergyCostConstraintSpecification::paths |
Definition at line 1806 of file constraint_solver.h.