Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
OperationsResearch.MPVariableProto Class Referencesealed

A variable is always constrained in the form: lower_bound <= x <= upper_bound where lower_bound and upper_bound: More...

Inheritance diagram for OperationsResearch.MPVariableProto:

Public Member Functions

 MPVariableProto ()
 
 MPVariableProto (MPVariableProto other)
 
MPVariableProto Clone ()
 
void ClearLowerBound ()
 Clears the value of the "lower_bound" field.
 
void ClearUpperBound ()
 Clears the value of the "upper_bound" field.
 
void ClearObjectiveCoefficient ()
 Clears the value of the "objective_coefficient" field.
 
void ClearIsInteger ()
 Clears the value of the "is_integer" field.
 
void ClearName ()
 Clears the value of the "name" field.
 
void ClearBranchingPriority ()
 Clears the value of the "branching_priority" field.
 
override bool Equals (object other)
 
bool Equals (MPVariableProto other)
 
override int GetHashCode ()
 
override string ToString ()
 
void WriteTo (pb::CodedOutputStream output)
 
int CalculateSize ()
 
void MergeFrom (MPVariableProto other)
 
void MergeFrom (pb::CodedInputStream input)
 

Static Public Attributes

const int LowerBoundFieldNumber = 1
 Field number for the "lower_bound" field.
 
const int UpperBoundFieldNumber = 2
 Field number for the "upper_bound" field.
 
const int ObjectiveCoefficientFieldNumber = 3
 Field number for the "objective_coefficient" field.
 
const int IsIntegerFieldNumber = 4
 Field number for the "is_integer" field.
 
const int NameFieldNumber = 5
 Field number for the "name" field.
 
const int BranchingPriorityFieldNumber = 6
 Field number for the "branching_priority" field.
 

Properties

static pb::MessageParser< MPVariableProtoParser [get]
 
static pbr::MessageDescriptor Descriptor [get]
 
double LowerBound [get, set]
 lower_bound must be <= upper_bound.
 
bool HasLowerBound [get]
 Gets whether the "lower_bound" field is set.
 
double UpperBound [get, set]
 
bool HasUpperBound [get]
 Gets whether the "upper_bound" field is set.
 
double ObjectiveCoefficient [get, set]
 The coefficient of the variable in the objective. Must be finite.
 
bool HasObjectiveCoefficient [get]
 Gets whether the "objective_coefficient" field is set.
 
bool IsInteger [get, set]
 True if the variable is constrained to be integer. Ignored if MPModelProto::solver_type is LINEAR_PROGRAMMING.
 
bool HasIsInteger [get]
 Gets whether the "is_integer" field is set.
 
string Name [get, set]
 The name of the variable.
 
bool HasName [get]
 Gets whether the "name" field is set.
 
int BranchingPriority [get, set]
 
bool HasBranchingPriority [get]
 Gets whether the "branching_priority" field is set.
 

Detailed Description

A variable is always constrained in the form: lower_bound <= x <= upper_bound where lower_bound and upper_bound:

  • Can form a singleton: x = constant = lower_bound = upper_bound.
  • Can form a finite interval: lower_bound <= x <= upper_bound. (x is boxed.)
  • Can form a semi-infinite interval.
    • lower_bound = -infinity: x <= upper_bound.
    • upper_bound = +infinity: x >= lower_bound.
  • Can form the infinite interval: lower_bound = -infinity and upper_bound = +infinity, x is free. MPVariableProto furthermore stores:
    • The coefficient of the variable in the objective.
    • Whether the variable is integer.

Definition at line 308 of file LinearSolver.pb.cs.

Constructor & Destructor Documentation

◆ MPVariableProto() [1/2]

OperationsResearch.MPVariableProto.MPVariableProto ( )
inline

Definition at line 334 of file LinearSolver.pb.cs.

◆ MPVariableProto() [2/2]

OperationsResearch.MPVariableProto.MPVariableProto ( MPVariableProto other)
inline

Definition at line 342 of file LinearSolver.pb.cs.

Member Function Documentation

◆ CalculateSize()

int OperationsResearch.MPVariableProto.CalculateSize ( )
inline

Definition at line 651 of file LinearSolver.pb.cs.

◆ ClearBranchingPriority()

void OperationsResearch.MPVariableProto.ClearBranchingPriority ( )
inline

Clears the value of the "branching_priority" field.

Definition at line 529 of file LinearSolver.pb.cs.

◆ ClearIsInteger()

void OperationsResearch.MPVariableProto.ClearIsInteger ( )
inline

Clears the value of the "is_integer" field.

Definition at line 473 of file LinearSolver.pb.cs.

◆ ClearLowerBound()

void OperationsResearch.MPVariableProto.ClearLowerBound ( )
inline

Clears the value of the "lower_bound" field.

Definition at line 385 of file LinearSolver.pb.cs.

◆ ClearName()

void OperationsResearch.MPVariableProto.ClearName ( )
inline

Clears the value of the "name" field.

Definition at line 502 of file LinearSolver.pb.cs.

◆ ClearObjectiveCoefficient()

void OperationsResearch.MPVariableProto.ClearObjectiveCoefficient ( )
inline

Clears the value of the "objective_coefficient" field.

Definition at line 442 of file LinearSolver.pb.cs.

◆ ClearUpperBound()

void OperationsResearch.MPVariableProto.ClearUpperBound ( )
inline

Clears the value of the "upper_bound" field.

Definition at line 412 of file LinearSolver.pb.cs.

◆ Clone()

MPVariableProto OperationsResearch.MPVariableProto.Clone ( )
inline

Definition at line 355 of file LinearSolver.pb.cs.

◆ Equals() [1/2]

bool OperationsResearch.MPVariableProto.Equals ( MPVariableProto other)
inline

Definition at line 541 of file LinearSolver.pb.cs.

◆ Equals() [2/2]

override bool OperationsResearch.MPVariableProto.Equals ( object other)
inline

Definition at line 535 of file LinearSolver.pb.cs.

◆ GetHashCode()

override int OperationsResearch.MPVariableProto.GetHashCode ( )
inline

Definition at line 559 of file LinearSolver.pb.cs.

◆ MergeFrom() [1/2]

void OperationsResearch.MPVariableProto.MergeFrom ( MPVariableProto other)
inline

Definition at line 679 of file LinearSolver.pb.cs.

◆ MergeFrom() [2/2]

void OperationsResearch.MPVariableProto.MergeFrom ( pb.CodedInputStream input)
inline

Definition at line 706 of file LinearSolver.pb.cs.

◆ ToString()

override string OperationsResearch.MPVariableProto.ToString ( )
inline

Definition at line 575 of file LinearSolver.pb.cs.

◆ WriteTo()

void OperationsResearch.MPVariableProto.WriteTo ( pb.CodedOutputStream output)
inline

Definition at line 581 of file LinearSolver.pb.cs.

Member Data Documentation

◆ BranchingPriorityFieldNumber

const int OperationsResearch.MPVariableProto.BranchingPriorityFieldNumber = 6
static

Field number for the "branching_priority" field.

Definition at line 507 of file LinearSolver.pb.cs.

◆ IsIntegerFieldNumber

const int OperationsResearch.MPVariableProto.IsIntegerFieldNumber = 4
static

Field number for the "is_integer" field.

Definition at line 447 of file LinearSolver.pb.cs.

◆ LowerBoundFieldNumber

const int OperationsResearch.MPVariableProto.LowerBoundFieldNumber = 1
static

Field number for the "lower_bound" field.

Definition at line 360 of file LinearSolver.pb.cs.

◆ NameFieldNumber

const int OperationsResearch.MPVariableProto.NameFieldNumber = 5
static

Field number for the "name" field.

Definition at line 478 of file LinearSolver.pb.cs.

◆ ObjectiveCoefficientFieldNumber

const int OperationsResearch.MPVariableProto.ObjectiveCoefficientFieldNumber = 3
static

Field number for the "objective_coefficient" field.

Definition at line 417 of file LinearSolver.pb.cs.

◆ UpperBoundFieldNumber

const int OperationsResearch.MPVariableProto.UpperBoundFieldNumber = 2
static

Field number for the "upper_bound" field.

Definition at line 390 of file LinearSolver.pb.cs.

Property Documentation

◆ BranchingPriority

int OperationsResearch.MPVariableProto.BranchingPriority
getset

Definition at line 513 of file LinearSolver.pb.cs.

◆ Descriptor

pbr.MessageDescriptor OperationsResearch.MPVariableProto.Descriptor
staticget

Definition at line 322 of file LinearSolver.pb.cs.

◆ HasBranchingPriority

bool OperationsResearch.MPVariableProto.HasBranchingPriority
get

Gets whether the "branching_priority" field is set.

Definition at line 523 of file LinearSolver.pb.cs.

◆ HasIsInteger

bool OperationsResearch.MPVariableProto.HasIsInteger
get

Gets whether the "is_integer" field is set.

Definition at line 467 of file LinearSolver.pb.cs.

◆ HasLowerBound

bool OperationsResearch.MPVariableProto.HasLowerBound
get

Gets whether the "lower_bound" field is set.

Definition at line 379 of file LinearSolver.pb.cs.

◆ HasName

bool OperationsResearch.MPVariableProto.HasName
get

Gets whether the "name" field is set.

Definition at line 496 of file LinearSolver.pb.cs.

◆ HasObjectiveCoefficient

bool OperationsResearch.MPVariableProto.HasObjectiveCoefficient
get

Gets whether the "objective_coefficient" field is set.

Definition at line 436 of file LinearSolver.pb.cs.

◆ HasUpperBound

bool OperationsResearch.MPVariableProto.HasUpperBound
get

Gets whether the "upper_bound" field is set.

Definition at line 406 of file LinearSolver.pb.cs.

◆ IsInteger

bool OperationsResearch.MPVariableProto.IsInteger
getset

True if the variable is constrained to be integer. Ignored if MPModelProto::solver_type is LINEAR_PROGRAMMING.

Definition at line 457 of file LinearSolver.pb.cs.

◆ LowerBound

double OperationsResearch.MPVariableProto.LowerBound
getset

lower_bound must be <= upper_bound.

Definition at line 369 of file LinearSolver.pb.cs.

◆ Name

string OperationsResearch.MPVariableProto.Name
getset

The name of the variable.

Definition at line 487 of file LinearSolver.pb.cs.

◆ ObjectiveCoefficient

double OperationsResearch.MPVariableProto.ObjectiveCoefficient
getset

The coefficient of the variable in the objective. Must be finite.

Definition at line 426 of file LinearSolver.pb.cs.

◆ Parser

pb.MessageParser<MPVariableProto> OperationsResearch.MPVariableProto.Parser
staticget

Definition at line 318 of file LinearSolver.pb.cs.

◆ UpperBound

double OperationsResearch.MPVariableProto.UpperBound
getset

Definition at line 396 of file LinearSolver.pb.cs.


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