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

Encodes a full MPModelProto by way of referencing to a "baseline" MPModelProto stored in a file, and a "delta" to apply to this model. More...

Inheritance diagram for OperationsResearch.MPModelDeltaProto:

Public Member Functions

 MPModelDeltaProto ()
 
 MPModelDeltaProto (MPModelDeltaProto other)
 
MPModelDeltaProto Clone ()
 
void ClearBaselineModelFilePath ()
 Clears the value of the "baseline_model_file_path" field.
 
override bool Equals (object other)
 
bool Equals (MPModelDeltaProto other)
 
override int GetHashCode ()
 
override string ToString ()
 
void WriteTo (pb::CodedOutputStream output)
 
int CalculateSize ()
 
void MergeFrom (MPModelDeltaProto other)
 
void MergeFrom (pb::CodedInputStream input)
 

Static Public Attributes

const int BaselineModelFilePathFieldNumber = 1
 Field number for the "baseline_model_file_path" field.
 
const int VariableOverridesFieldNumber = 2
 Field number for the "variable_overrides" field.
 
const int ConstraintOverridesFieldNumber = 3
 Field number for the "constraint_overrides" field.
 

Properties

static pb::MessageParser< MPModelDeltaProtoParser [get]
 
static pbr::MessageDescriptor Descriptor [get]
 
string BaselineModelFilePath [get, set]
 
bool HasBaselineModelFilePath [get]
 Gets whether the "baseline_model_file_path" field is set.
 
pbc::MapField< int, global::OperationsResearch.MPVariableProto > VariableOverrides [get]
 The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change. To add a new variable, add it with a new variable index (variable indices still need to span a dense integer interval). You can't "delete" a variable but you can "neutralize" it by fixing its value, setting its objective coefficient to zero, and by nullifying all the terms involving it in the constraints.
 
pbc::MapField< int, global::OperationsResearch.MPConstraintProto > ConstraintOverrides [get]
 Constraints can be changed (or added) in the same way as variables, see above. It's mostly like applying MergeFrom(), except that:
 

Detailed Description

Encodes a full MPModelProto by way of referencing to a "baseline" MPModelProto stored in a file, and a "delta" to apply to this model.

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

Constructor & Destructor Documentation

◆ MPModelDeltaProto() [1/2]

OperationsResearch.MPModelDeltaProto.MPModelDeltaProto ( )
inline

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

◆ MPModelDeltaProto() [2/2]

OperationsResearch.MPModelDeltaProto.MPModelDeltaProto ( MPModelDeltaProto other)
inline

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

Member Function Documentation

◆ CalculateSize()

int OperationsResearch.MPModelDeltaProto.CalculateSize ( )
inline

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

◆ ClearBaselineModelFilePath()

void OperationsResearch.MPModelDeltaProto.ClearBaselineModelFilePath ( )
inline

Clears the value of the "baseline_model_file_path" field.

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

◆ Clone()

MPModelDeltaProto OperationsResearch.MPModelDeltaProto.Clone ( )
inline

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

◆ Equals() [1/2]

bool OperationsResearch.MPModelDeltaProto.Equals ( MPModelDeltaProto other)
inline

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

◆ Equals() [2/2]

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

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

◆ GetHashCode()

override int OperationsResearch.MPModelDeltaProto.GetHashCode ( )
inline

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

◆ MergeFrom() [1/2]

void OperationsResearch.MPModelDeltaProto.MergeFrom ( MPModelDeltaProto other)
inline

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

◆ MergeFrom() [2/2]

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

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

◆ ToString()

override string OperationsResearch.MPModelDeltaProto.ToString ( )
inline

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

◆ WriteTo()

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

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

Member Data Documentation

◆ BaselineModelFilePathFieldNumber

const int OperationsResearch.MPModelDeltaProto.BaselineModelFilePathFieldNumber = 1
static

Field number for the "baseline_model_file_path" field.

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

◆ ConstraintOverridesFieldNumber

const int OperationsResearch.MPModelDeltaProto.ConstraintOverridesFieldNumber = 3
static

Field number for the "constraint_overrides" field.

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

◆ VariableOverridesFieldNumber

const int OperationsResearch.MPModelDeltaProto.VariableOverridesFieldNumber = 2
static

Field number for the "variable_overrides" field.

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

Property Documentation

◆ BaselineModelFilePath

string OperationsResearch.MPModelDeltaProto.BaselineModelFilePath
getset

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

◆ ConstraintOverrides

pbc.MapField<int, global.OperationsResearch.MPConstraintProto> OperationsResearch.MPModelDeltaProto.ConstraintOverrides
get

Constraints can be changed (or added) in the same way as variables, see above. It's mostly like applying MergeFrom(), except that:

  • the "var_index" and "coefficient" fields will be overridden like a map: if a key pre-exists, we overwrite its value, otherwise we add it.
  • if you set the lower bound to -inf and the upper bound to +inf, thus effectively neutralizing the constraint, the solver will implicitly remove all of the constraint's terms.

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

◆ Descriptor

pbr.MessageDescriptor OperationsResearch.MPModelDeltaProto.Descriptor
staticget

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

◆ HasBaselineModelFilePath

bool OperationsResearch.MPModelDeltaProto.HasBaselineModelFilePath
get

Gets whether the "baseline_model_file_path" field is set.

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

◆ Parser

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

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

◆ VariableOverrides

pbc.MapField<int, global.OperationsResearch.MPVariableProto> OperationsResearch.MPModelDeltaProto.VariableOverrides
get

The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change. To add a new variable, add it with a new variable index (variable indices still need to span a dense integer interval). You can't "delete" a variable but you can "neutralize" it by fixing its value, setting its objective coefficient to zero, and by nullifying all the terms involving it in the constraints.

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


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