Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::packing Namespace Reference

Namespaces

namespace  vbp
 

Classes

struct  ArcFlowGraph
 
class  BinPacking2dParser
 

Functions

ArcFlowGraph BuildArcFlowGraph (const std::vector< int > &bin_dimensions, absl::Span< const std::vector< int > > item_dimensions_by_type, absl::Span< const int > demand_by_type)
 Main method.
 
vbp::VectorBinPackingSolution SolveVectorBinPackingWithArcFlow (const vbp::VectorBinPackingProblem &problem, MPSolver::OptimizationProblemType solver_type, const std::string &mip_params, double time_limit, int num_threads, int max_bins)
 

Function Documentation

◆ BuildArcFlowGraph()

ArcFlowGraph operations_research::packing::BuildArcFlowGraph ( const std::vector< int > & bin_dimensions,
absl::Span< const std::vector< int > > item_dimensions_by_type,
absl::Span< const int > demand_by_type )

Main method.

Arc flow builder. The input must enforce the following constraints:

  • item_dimensions_by_type.size() == demand_by_type.size() == num types
  • for each type t: item_dimensions_by_type[t].size() == bin_dimensions.size() == num_dimensions

Definition at line 403 of file arc_flow_builder.cc.

◆ SolveVectorBinPackingWithArcFlow()

vbp::VectorBinPackingSolution operations_research::packing::SolveVectorBinPackingWithArcFlow ( const vbp::VectorBinPackingProblem & problem,
MPSolver::OptimizationProblemType solver_type,
const std::string & mip_params,
double time_limit,
int num_threads,
int max_bins )

Per item demand constraint.

Flow conservation.

Check that the problem has an optimal solution.

Create the arc flow graph with the flow quantity in each arc.

Unroll each possible path and rebuild bins.

Copy next and item before popping.

Definition at line 78 of file arc_flow_solver.cc.