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

MPModelProto contains all the information for a Linear Programming model. More...

Inheritance diagram for OperationsResearch.MPModelProto:

Classes

class  Types
 Container for nested types declared in the MPModelProto message type. More...
 

Public Member Functions

 MPModelProto ()
 
 MPModelProto (MPModelProto other)
 
MPModelProto Clone ()
 
void ClearMaximize ()
 Clears the value of the "maximize" field.
 
void ClearObjectiveOffset ()
 Clears the value of the "objective_offset" field.
 
void ClearName ()
 Clears the value of the "name" field.
 
override bool Equals (object other)
 
bool Equals (MPModelProto other)
 
override int GetHashCode ()
 
override string ToString ()
 
void WriteTo (pb::CodedOutputStream output)
 
int CalculateSize ()
 
void MergeFrom (MPModelProto other)
 
void MergeFrom (pb::CodedInputStream input)
 

Static Public Attributes

const int VariableFieldNumber = 3
 Field number for the "variable" field.
 
const int ConstraintFieldNumber = 4
 Field number for the "constraint" field.
 
const int GeneralConstraintFieldNumber = 7
 Field number for the "general_constraint" field.
 
const int MaximizeFieldNumber = 1
 Field number for the "maximize" field.
 
const int ObjectiveOffsetFieldNumber = 2
 Field number for the "objective_offset" field.
 
const int QuadraticObjectiveFieldNumber = 8
 Field number for the "quadratic_objective" field.
 
const int NameFieldNumber = 5
 Field number for the "name" field.
 
const int SolutionHintFieldNumber = 6
 Field number for the "solution_hint" field.
 
const int AnnotationFieldNumber = 9
 Field number for the "annotation" field.
 

Properties

static pb::MessageParser< MPModelProtoParser [get]
 
static pbr::MessageDescriptor Descriptor [get]
 
pbc::RepeatedField< global::OperationsResearch.MPVariableProto > Variable [get]
 All the variables appearing in the model.
 
pbc::RepeatedField< global::OperationsResearch.MPConstraintProto > Constraint [get]
 All the constraints appearing in the model.
 
pbc::RepeatedField< global::OperationsResearch.MPGeneralConstraintProto > GeneralConstraint [get]
 All the general constraints appearing in the model. Note that not all solvers support all types of general constraints.
 
bool Maximize [get, set]
 True if the problem is a maximization problem. Minimize by default.
 
bool HasMaximize [get]
 Gets whether the "maximize" field is set.
 
double ObjectiveOffset [get, set]
 Offset for the objective function. Must be finite.
 
bool HasObjectiveOffset [get]
 Gets whether the "objective_offset" field is set.
 
global::OperationsResearch.MPQuadraticObjective QuadraticObjective [get, set]
 Optionally, a quadratic objective. As of 2019/06, only SCIP and Gurobi support quadratic objectives.
 
string Name [get, set]
 Name of the model.
 
bool HasName [get]
 Gets whether the "name" field is set.
 
global::OperationsResearch.PartialVariableAssignment SolutionHint [get, set]
 Solution hint.
 
pbc::RepeatedField< global::OperationsResearch.MPModelProto.Types.Annotation > Annotation [get]
 

Detailed Description

MPModelProto contains all the information for a Linear Programming model.

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

Constructor & Destructor Documentation

◆ MPModelProto() [1/2]

OperationsResearch.MPModelProto.MPModelProto ( )
inline

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

◆ MPModelProto() [2/2]

OperationsResearch.MPModelProto.MPModelProto ( MPModelProto other)
inline

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

Member Function Documentation

◆ CalculateSize()

int OperationsResearch.MPModelProto.CalculateSize ( )
inline

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

◆ ClearMaximize()

void OperationsResearch.MPModelProto.ClearMaximize ( )
inline

Clears the value of the "maximize" field.

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

◆ ClearName()

void OperationsResearch.MPModelProto.ClearName ( )
inline

Clears the value of the "name" field.

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

◆ ClearObjectiveOffset()

void OperationsResearch.MPModelProto.ClearObjectiveOffset ( )
inline

Clears the value of the "objective_offset" field.

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

◆ Clone()

MPModelProto OperationsResearch.MPModelProto.Clone ( )
inline

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

◆ Equals() [1/2]

bool OperationsResearch.MPModelProto.Equals ( MPModelProto other)
inline

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

◆ Equals() [2/2]

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

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

◆ GetHashCode()

override int OperationsResearch.MPModelProto.GetHashCode ( )
inline

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

◆ MergeFrom() [1/2]

void OperationsResearch.MPModelProto.MergeFrom ( MPModelProto other)
inline

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

◆ MergeFrom() [2/2]

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

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

◆ ToString()

override string OperationsResearch.MPModelProto.ToString ( )
inline

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

◆ WriteTo()

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

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

Member Data Documentation

◆ AnnotationFieldNumber

const int OperationsResearch.MPModelProto.AnnotationFieldNumber = 9
static

Field number for the "annotation" field.

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

◆ ConstraintFieldNumber

const int OperationsResearch.MPModelProto.ConstraintFieldNumber = 4
static

Field number for the "constraint" field.

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

◆ GeneralConstraintFieldNumber

const int OperationsResearch.MPModelProto.GeneralConstraintFieldNumber = 7
static

Field number for the "general_constraint" field.

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

◆ MaximizeFieldNumber

const int OperationsResearch.MPModelProto.MaximizeFieldNumber = 1
static

Field number for the "maximize" field.

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

◆ NameFieldNumber

const int OperationsResearch.MPModelProto.NameFieldNumber = 5
static

Field number for the "name" field.

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

◆ ObjectiveOffsetFieldNumber

const int OperationsResearch.MPModelProto.ObjectiveOffsetFieldNumber = 2
static

Field number for the "objective_offset" field.

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

◆ QuadraticObjectiveFieldNumber

const int OperationsResearch.MPModelProto.QuadraticObjectiveFieldNumber = 8
static

Field number for the "quadratic_objective" field.

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

◆ SolutionHintFieldNumber

const int OperationsResearch.MPModelProto.SolutionHintFieldNumber = 6
static

Field number for the "solution_hint" field.

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

◆ VariableFieldNumber

const int OperationsResearch.MPModelProto.VariableFieldNumber = 3
static

Field number for the "variable" field.

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

Property Documentation

◆ Annotation

pbc.RepeatedField<global.OperationsResearch.MPModelProto.Types.Annotation> OperationsResearch.MPModelProto.Annotation
get

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

◆ Constraint

pbc.RepeatedField<global.OperationsResearch.MPConstraintProto> OperationsResearch.MPModelProto.Constraint
get

All the constraints appearing in the model.

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

◆ Descriptor

pbr.MessageDescriptor OperationsResearch.MPModelProto.Descriptor
staticget

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

◆ GeneralConstraint

pbc.RepeatedField<global.OperationsResearch.MPGeneralConstraintProto> OperationsResearch.MPModelProto.GeneralConstraint
get

All the general constraints appearing in the model. Note that not all solvers support all types of general constraints.

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

◆ HasMaximize

bool OperationsResearch.MPModelProto.HasMaximize
get

Gets whether the "maximize" field is set.

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

◆ HasName

bool OperationsResearch.MPModelProto.HasName
get

Gets whether the "name" field is set.

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

◆ HasObjectiveOffset

bool OperationsResearch.MPModelProto.HasObjectiveOffset
get

Gets whether the "objective_offset" field is set.

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

◆ Maximize

bool OperationsResearch.MPModelProto.Maximize
getset

True if the problem is a maximization problem. Minimize by default.

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

◆ Name

string OperationsResearch.MPModelProto.Name
getset

Name of the model.

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

◆ ObjectiveOffset

double OperationsResearch.MPModelProto.ObjectiveOffset
getset

Offset for the objective function. Must be finite.

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

◆ Parser

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

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

◆ QuadraticObjective

global.OperationsResearch.MPQuadraticObjective OperationsResearch.MPModelProto.QuadraticObjective
getset

Optionally, a quadratic objective. As of 2019/06, only SCIP and Gurobi support quadratic objectives.

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

◆ SolutionHint

global.OperationsResearch.PartialVariableAssignment OperationsResearch.MPModelProto.SolutionHint
getset

Solution hint.

If a feasible or almost-feasible solution to the problem is already known, it may be helpful to pass it to the solver so that it can be used. A solver that supports this feature will try to use this information to create its initial feasible solution.

Note
it may not always be faster to give a hint like this to the solver. There is also no guarantee that the solver will use this hint or try to return a solution "close" to this assignment in case of multiple optimal solutions.

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

◆ Variable

pbc.RepeatedField<global.OperationsResearch.MPVariableProto> OperationsResearch.MPModelProto.Variable
get

All the variables appearing in the model.

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


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