![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
This class loads a file in pbo file format into a LinearBooleanProblem. The format is described here: http://www.cril.univ-artois.fr/PB24/format.pdf
Definition at line 45 of file opb_reader.h.
#include <opb_reader.h>
Public Member Functions | |
OpbReader ()=default | |
OpbReader (const OpbReader &)=delete | |
This type is neither copyable nor movable. | |
OpbReader & | operator= (const OpbReader &)=delete |
int | num_variables () const |
Returns the number of variables in the problem. | |
bool | model_is_supported () const |
ABSL_MUST_USE_RESULT bool | LoadAndValidate (const std::string &filename, CpModelProto *model) |
|
default |
|
delete |
This type is neither copyable nor movable.
|
inline |
Loads the given opb filename into the given problem. Returns true on success.
Read constraints line by line (1 constraint per line). We process into a temporary structure to support non linear constraints and weighted constraints.
Check if the model is supported. It is not supported if one constant contains an integer that does not fit in an int64_t.
Definition at line 61 of file opb_reader.h.
|
inline |
Returns true if the model is supported. A model is not supported if it contains an integer that does not fit in int64_t.
Definition at line 57 of file opb_reader.h.
|
inline |
Returns the number of variables in the problem.
Definition at line 53 of file opb_reader.h.