Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::VariableRelationships Struct Reference

Detailed Description

This structs defines a way of splitting the variables of the model in two groups: primary variables and secondary variables. Those are specified so that the value of secondary_variables[i] is uniquely fixed by applying the constraint dependency_resolution_constraint_index[i] to the values of the primary variables and the values of the variables in the set {secondary_variables[0], ..., secondary_variables[i-1]}.

The set of primary variables is implicitly defined by the set of variables that are not in secondary_variables.

A useful property of this structure is that given an assignment of primary variables that corresponds to a feasible solution, we can deduce all the values of the secondary variables. Note that if the values of the primary variables are unfeasible, then it might not be possible to deduce the values of the secondary variables.

Definition at line 41 of file primary_variables.h.

#include <primary_variables.h>

Public Attributes

std::vector< int > secondary_variables
std::vector< ConstraintProtodependency_resolution_constraint
std::vector< std::pair< int, int > > variable_dependencies
std::vector< int > redundant_constraint_indices

Member Data Documentation

◆ dependency_resolution_constraint

std::vector<ConstraintProto> operations_research::sat::VariableRelationships::dependency_resolution_constraint

Definition at line 43 of file primary_variables.h.

◆ redundant_constraint_indices

std::vector<int> operations_research::sat::VariableRelationships::redundant_constraint_indices

The list of model constraints that are redundant (ie., satisfied by construction) when the secondary variables are computed from the primary ones. In other words, a model has a solution for a set of primary variables {x_i} if and only if all the variable bounds and non-redundant constraints are satisfied after the secondary variables have been computed from the primary ones.

Definition at line 56 of file primary_variables.h.

◆ secondary_variables

std::vector<int> operations_research::sat::VariableRelationships::secondary_variables

Definition at line 42 of file primary_variables.h.

◆ variable_dependencies

std::vector<std::pair<int, int> > operations_research::sat::VariableRelationships::variable_dependencies

A pair of(x, y) means that one needs to compute the value of y before computing the value of x. This defines an implicit dependency DAG for computing the secondary variables from the primary.

Definition at line 48 of file primary_variables.h.


The documentation for this struct was generated from the following file: