Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <binpacking_2d_parser.h>
Public Member Functions | |
BinPacking2dParser () | |
bool | Load2BPFile (absl::string_view file_name, int instance) |
MultipleDimensionsBinPackingProblem | problem () const |
A BinPacking parser. It supports the following file format:
The generated problems have the following characteristics:
You have one box with n dimensions. The size of the box is stored in the field box_shape(). You need to fit items into this box. Each item has the same number of dimensions and one or more possible shapes (this usually means that you can rotate the item). Each item has a value, and a possible list of conflicts (items you cannot put alongside this item). The objective of the problem is to fit as many items as possible in the box while maximizing the sum of values of selected items. For each item, you need to select the shape and the position of the item in the box. Each item must not overlap (in n dimensions) with any other item.
Definition at line 46 of file binpacking_2d_parser.h.
operations_research::packing::BinPacking2dParser::BinPacking2dParser | ( | ) |
Definition at line 28 of file binpacking_2d_parser.cc.
bool operations_research::packing::BinPacking2dParser::Load2BPFile | ( | absl::string_view | file_name, |
int | instance ) |
Loads the 'instance'th instance of the bin packing problem if the given file. The instance are 1 based (first is 1). Only one call to a Load*() function is supported. All the subsequent calls will do nothing and return false.
Definition at line 34 of file binpacking_2d_parser.cc.
|
inline |
Definition at line 55 of file binpacking_2d_parser.h.