Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Google.OrTools.Sat.LinearBooleanProblem Class Referencesealed

A linear Boolean problem. More...

Inheritance diagram for Google.OrTools.Sat.LinearBooleanProblem:

Public Member Functions

 LinearBooleanProblem ()
 
 LinearBooleanProblem (LinearBooleanProblem other)
 
LinearBooleanProblem Clone ()
 
void ClearName ()
 Clears the value of the "name" field.
 
void ClearNumVariables ()
 Clears the value of the "num_variables" field.
 
void ClearOriginalNumVariables ()
 Clears the value of the "original_num_variables" field.
 
override bool Equals (object other)
 
bool Equals (LinearBooleanProblem other)
 
override int GetHashCode ()
 
override string ToString ()
 
void WriteTo (pb::CodedOutputStream output)
 
int CalculateSize ()
 
void MergeFrom (LinearBooleanProblem other)
 
void MergeFrom (pb::CodedInputStream input)
 

Static Public Attributes

const int NameFieldNumber = 1
 Field number for the "name" field.
 
const int NumVariablesFieldNumber = 3
 Field number for the "num_variables" field.
 
const int ConstraintsFieldNumber = 4
 Field number for the "constraints" field.
 
const int ObjectiveFieldNumber = 5
 Field number for the "objective" field.
 
const int VarNamesFieldNumber = 6
 Field number for the "var_names" field.
 
const int AssignmentFieldNumber = 7
 Field number for the "assignment" field.
 
const int OriginalNumVariablesFieldNumber = 8
 Field number for the "original_num_variables" field.
 

Properties

static pb::MessageParser< LinearBooleanProblemParser [get]
 
static pbr::MessageDescriptor Descriptor [get]
 
string Name [get, set]
 The name of the problem.
 
bool HasName [get]
 Gets whether the "name" field is set.
 
int NumVariables [get, set]
 The number of variables in the problem. All the signed representation of the problem literals must be in [-num_variables, num_variables], excluding 0.
 
bool HasNumVariables [get]
 Gets whether the "num_variables" field is set.
 
pbc::RepeatedField< global::Google.OrTools.Sat.LinearBooleanConstraint > Constraints [get]
 The constraints of the problem.
 
global::Google.OrTools.Sat.LinearObjective Objective [get, set]
 The objective of the problem. If left empty, we just have a satisfiability problem.
 
pbc::RepeatedField< string > VarNames [get]
 The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
 
global::Google.OrTools.Sat.BooleanAssignment Assignment [get, set]
 Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.
 
int OriginalNumVariables [get, set]
 Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created. This stores the number of variables in the original problem (which are in one to one correspondence with the first variables of this problem).
 
bool HasOriginalNumVariables [get]
 Gets whether the "original_num_variables" field is set.
 

Detailed Description

A linear Boolean problem.

Definition at line 978 of file BooleanProblem.pb.cs.

Constructor & Destructor Documentation

◆ LinearBooleanProblem() [1/2]

Google.OrTools.Sat.LinearBooleanProblem.LinearBooleanProblem ( )
inline

Definition at line 1004 of file BooleanProblem.pb.cs.

◆ LinearBooleanProblem() [2/2]

Google.OrTools.Sat.LinearBooleanProblem.LinearBooleanProblem ( LinearBooleanProblem other)
inline

Definition at line 1012 of file BooleanProblem.pb.cs.

Member Function Documentation

◆ CalculateSize()

int Google.OrTools.Sat.LinearBooleanProblem.CalculateSize ( )
inline

Definition at line 1302 of file BooleanProblem.pb.cs.

◆ ClearName()

void Google.OrTools.Sat.LinearBooleanProblem.ClearName ( )
inline

Clears the value of the "name" field.

Definition at line 1055 of file BooleanProblem.pb.cs.

◆ ClearNumVariables()

void Google.OrTools.Sat.LinearBooleanProblem.ClearNumVariables ( )
inline

Clears the value of the "num_variables" field.

Definition at line 1087 of file BooleanProblem.pb.cs.

◆ ClearOriginalNumVariables()

void Google.OrTools.Sat.LinearBooleanProblem.ClearOriginalNumVariables ( )
inline

Clears the value of the "original_num_variables" field.

Definition at line 1182 of file BooleanProblem.pb.cs.

◆ Clone()

LinearBooleanProblem Google.OrTools.Sat.LinearBooleanProblem.Clone ( )
inline

Definition at line 1026 of file BooleanProblem.pb.cs.

◆ Equals() [1/2]

bool Google.OrTools.Sat.LinearBooleanProblem.Equals ( LinearBooleanProblem other)
inline

Definition at line 1194 of file BooleanProblem.pb.cs.

◆ Equals() [2/2]

override bool Google.OrTools.Sat.LinearBooleanProblem.Equals ( object other)
inline

Definition at line 1188 of file BooleanProblem.pb.cs.

◆ GetHashCode()

override int Google.OrTools.Sat.LinearBooleanProblem.GetHashCode ( )
inline

Definition at line 1213 of file BooleanProblem.pb.cs.

◆ MergeFrom() [1/2]

void Google.OrTools.Sat.LinearBooleanProblem.MergeFrom ( LinearBooleanProblem other)
inline

Definition at line 1329 of file BooleanProblem.pb.cs.

◆ MergeFrom() [2/2]

void Google.OrTools.Sat.LinearBooleanProblem.MergeFrom ( pb::CodedInputStream input)
inline

Definition at line 1361 of file BooleanProblem.pb.cs.

◆ ToString()

override string Google.OrTools.Sat.LinearBooleanProblem.ToString ( )
inline

Definition at line 1230 of file BooleanProblem.pb.cs.

◆ WriteTo()

void Google.OrTools.Sat.LinearBooleanProblem.WriteTo ( pb::CodedOutputStream output)
inline

Definition at line 1236 of file BooleanProblem.pb.cs.

Member Data Documentation

◆ AssignmentFieldNumber

const int Google.OrTools.Sat.LinearBooleanProblem.AssignmentFieldNumber = 7
static

Field number for the "assignment" field.

Definition at line 1138 of file BooleanProblem.pb.cs.

◆ ConstraintsFieldNumber

const int Google.OrTools.Sat.LinearBooleanProblem.ConstraintsFieldNumber = 4
static

Field number for the "constraints" field.

Definition at line 1092 of file BooleanProblem.pb.cs.

◆ NameFieldNumber

const int Google.OrTools.Sat.LinearBooleanProblem.NameFieldNumber = 1
static

Field number for the "name" field.

Definition at line 1031 of file BooleanProblem.pb.cs.

◆ NumVariablesFieldNumber

const int Google.OrTools.Sat.LinearBooleanProblem.NumVariablesFieldNumber = 3
static

Field number for the "num_variables" field.

Definition at line 1060 of file BooleanProblem.pb.cs.

◆ ObjectiveFieldNumber

const int Google.OrTools.Sat.LinearBooleanProblem.ObjectiveFieldNumber = 5
static

Field number for the "objective" field.

Definition at line 1106 of file BooleanProblem.pb.cs.

◆ OriginalNumVariablesFieldNumber

const int Google.OrTools.Sat.LinearBooleanProblem.OriginalNumVariablesFieldNumber = 8
static

Field number for the "original_num_variables" field.

Definition at line 1154 of file BooleanProblem.pb.cs.

◆ VarNamesFieldNumber

const int Google.OrTools.Sat.LinearBooleanProblem.VarNamesFieldNumber = 6
static

Field number for the "var_names" field.

Definition at line 1122 of file BooleanProblem.pb.cs.

Property Documentation

◆ Assignment

global.Google.OrTools.Sat.BooleanAssignment Google.OrTools.Sat.LinearBooleanProblem.Assignment
getset

Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.

Definition at line 1146 of file BooleanProblem.pb.cs.

◆ Constraints

pbc.RepeatedField<global.Google.OrTools.Sat.LinearBooleanConstraint> Google.OrTools.Sat.LinearBooleanProblem.Constraints
get

The constraints of the problem.

Definition at line 1101 of file BooleanProblem.pb.cs.

◆ Descriptor

pbr.MessageDescriptor Google.OrTools.Sat.LinearBooleanProblem.Descriptor
staticget

Definition at line 992 of file BooleanProblem.pb.cs.

◆ HasName

bool Google.OrTools.Sat.LinearBooleanProblem.HasName
get

Gets whether the "name" field is set.

Definition at line 1049 of file BooleanProblem.pb.cs.

◆ HasNumVariables

bool Google.OrTools.Sat.LinearBooleanProblem.HasNumVariables
get

Gets whether the "num_variables" field is set.

Definition at line 1081 of file BooleanProblem.pb.cs.

◆ HasOriginalNumVariables

bool Google.OrTools.Sat.LinearBooleanProblem.HasOriginalNumVariables
get

Gets whether the "original_num_variables" field is set.

Definition at line 1176 of file BooleanProblem.pb.cs.

◆ Name

string Google.OrTools.Sat.LinearBooleanProblem.Name
getset

The name of the problem.

Definition at line 1040 of file BooleanProblem.pb.cs.

◆ NumVariables

int Google.OrTools.Sat.LinearBooleanProblem.NumVariables
getset

The number of variables in the problem. All the signed representation of the problem literals must be in [-num_variables, num_variables], excluding 0.

Definition at line 1071 of file BooleanProblem.pb.cs.

◆ Objective

global.Google.OrTools.Sat.LinearObjective Google.OrTools.Sat.LinearBooleanProblem.Objective
getset

The objective of the problem. If left empty, we just have a satisfiability problem.

Definition at line 1114 of file BooleanProblem.pb.cs.

◆ OriginalNumVariables

int Google.OrTools.Sat.LinearBooleanProblem.OriginalNumVariables
getset

Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created. This stores the number of variables in the original problem (which are in one to one correspondence with the first variables of this problem).

Definition at line 1166 of file BooleanProblem.pb.cs.

◆ Parser

pb.MessageParser<LinearBooleanProblem> Google.OrTools.Sat.LinearBooleanProblem.Parser
staticget

Definition at line 988 of file BooleanProblem.pb.cs.

◆ VarNames

pbc.RepeatedField<string> Google.OrTools.Sat.LinearBooleanProblem.VarNames
get

The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.

Definition at line 1133 of file BooleanProblem.pb.cs.


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