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

#include <model.h>

Public Member Functions

 Model (absl::string_view name)
 
 ~Model ()
 --— Model --—
 
VariableAddVariable (absl::string_view name, const Domain &domain, bool defined)
 --— Builder methods --—
 
VariableAddConstant (int64_t value)
 
VariableAddFloatConstant (double value)
 
void AddConstraint (absl::string_view id, std::vector< Argument > arguments, bool is_domain)
 Creates and add a constraint to the model.
 
void AddConstraint (absl::string_view id, std::vector< Argument > arguments)
 
void AddOutput (SolutionOutputSpecs output)
 
void Satisfy (std::vector< Annotation > search_annotations)
 
void Minimize (Variable *obj, std::vector< Annotation > search_annotations)
 
void Maximize (Variable *obj, std::vector< Annotation > search_annotations)
 
bool IsInconsistent () const
 
const std::vector< Variable * > & variables () const
 --— Accessors and mutators --—
 
const std::vector< Constraint * > & constraints () const
 
const std::vector< Annotation > & search_annotations () const
 
util::MutableVectorIteration< Annotationmutable_search_annotations ()
 
const std::vector< SolutionOutputSpecs > & output () const
 
util::MutableVectorIteration< SolutionOutputSpecsmutable_output ()
 
bool maximize () const
 
Variableobjective () const
 
const std::vector< Variable * > & float_objective_variables () const
 
const std::vector< double > & float_objective_coefficients () const
 
double float_objective_offset () const
 
void SetObjective (Variable *obj)
 
void ClearObjective ()
 
void AddFloatingPointObjectiveTerm (Variable *var, double coeff)
 
void SetFloatingPointObjectiveOffset (double offset)
 
std::string DebugString () const
 Services.
 
const std::string & name () const
 

Detailed Description

Definition at line 341 of file model.h.

Constructor & Destructor Documentation

◆ Model()

operations_research::fz::Model::Model ( absl::string_view name)
inlineexplicit

Definition at line 343 of file model.h.

◆ ~Model()

operations_research::fz::Model::~Model ( )

--— Model --—

Definition at line 1020 of file model.cc.

Member Function Documentation

◆ AddConstant()

Variable * operations_research::fz::Model::AddConstant ( int64_t value)
Todo
(user): Create only once constant per value.

Definition at line 1033 of file model.cc.

◆ AddConstraint() [1/2]

void operations_research::fz::Model::AddConstraint ( absl::string_view id,
std::vector< Argument > arguments )

Definition at line 1054 of file model.cc.

◆ AddConstraint() [2/2]

void operations_research::fz::Model::AddConstraint ( absl::string_view id,
std::vector< Argument > arguments,
bool is_domain )

Creates and add a constraint to the model.

Definition at line 1047 of file model.cc.

◆ AddFloatConstant()

Variable * operations_research::fz::Model::AddFloatConstant ( double value)

Definition at line 1040 of file model.cc.

◆ AddFloatingPointObjectiveTerm()

void operations_research::fz::Model::AddFloatingPointObjectiveTerm ( Variable * var,
double coeff )
inline

Definition at line 399 of file model.h.

◆ AddOutput()

void operations_research::fz::Model::AddOutput ( SolutionOutputSpecs output)

Definition at line 1059 of file model.cc.

◆ AddVariable()

Variable * operations_research::fz::Model::AddVariable ( absl::string_view name,
const Domain & domain,
bool defined )

--— Builder methods --—

The objects returned by AddVariable(), AddConstant(), and AddConstraint() are owned by the model and will remain live for its lifetime.

Definition at line 1025 of file model.cc.

◆ ClearObjective()

void operations_research::fz::Model::ClearObjective ( )
inline

Definition at line 398 of file model.h.

◆ constraints()

const std::vector< Constraint * > & operations_research::fz::Model::constraints ( ) const
inline

Definition at line 373 of file model.h.

◆ DebugString()

std::string operations_research::fz::Model::DebugString ( ) const

Services.

Definition at line 1082 of file model.cc.

◆ float_objective_coefficients()

const std::vector< double > & operations_research::fz::Model::float_objective_coefficients ( ) const
inline

Definition at line 393 of file model.h.

◆ float_objective_offset()

double operations_research::fz::Model::float_objective_offset ( ) const
inline

Definition at line 396 of file model.h.

◆ float_objective_variables()

const std::vector< Variable * > & operations_research::fz::Model::float_objective_variables ( ) const
inline

Definition at line 390 of file model.h.

◆ IsInconsistent()

bool operations_research::fz::Model::IsInconsistent ( ) const

Definition at line 1117 of file model.cc.

◆ Maximize()

void operations_research::fz::Model::Maximize ( Variable * obj,
std::vector< Annotation > search_annotations )

Definition at line 1075 of file model.cc.

◆ maximize()

bool operations_research::fz::Model::maximize ( ) const
inline

Definition at line 388 of file model.h.

◆ Minimize()

void operations_research::fz::Model::Minimize ( Variable * obj,
std::vector< Annotation > search_annotations )

Definition at line 1068 of file model.cc.

◆ mutable_output()

util::MutableVectorIteration< SolutionOutputSpecs > operations_research::fz::Model::mutable_output ( )
inline

Definition at line 384 of file model.h.

◆ mutable_search_annotations()

util::MutableVectorIteration< Annotation > operations_research::fz::Model::mutable_search_annotations ( )
inline

Definition at line 378 of file model.h.

◆ name()

const std::string & operations_research::fz::Model::name ( ) const
inline

Definition at line 410 of file model.h.

◆ objective()

Variable * operations_research::fz::Model::objective ( ) const
inline

Definition at line 389 of file model.h.

◆ output()

const std::vector< SolutionOutputSpecs > & operations_research::fz::Model::output ( ) const
inline

Definition at line 382 of file model.h.

◆ Satisfy()

void operations_research::fz::Model::Satisfy ( std::vector< Annotation > search_annotations)

Set the search annotations and the objective: either simply satisfy the problem, or minimize or maximize the given variable (which must have been added with AddVariable() already).

Definition at line 1063 of file model.cc.

◆ search_annotations()

const std::vector< Annotation > & operations_research::fz::Model::search_annotations ( ) const
inline

Definition at line 374 of file model.h.

◆ SetFloatingPointObjectiveOffset()

void operations_research::fz::Model::SetFloatingPointObjectiveOffset ( double offset)
inline

Definition at line 403 of file model.h.

◆ SetObjective()

void operations_research::fz::Model::SetObjective ( Variable * obj)
inline

Definition at line 397 of file model.h.

◆ variables()

const std::vector< Variable * > & operations_research::fz::Model::variables ( ) const
inline

--— Accessors and mutators --—

Definition at line 372 of file model.h.


The documentation for this class was generated from the following files: