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

Quadratic part of a model's objective. Added with other objectives (such as linear), this creates the model's objective function to be optimized. More...

Inheritance diagram for OperationsResearch.MPQuadraticObjective:

Public Member Functions

 MPQuadraticObjective ()
 
 MPQuadraticObjective (MPQuadraticObjective other)
 
MPQuadraticObjective Clone ()
 
override bool Equals (object other)
 
bool Equals (MPQuadraticObjective other)
 
override int GetHashCode ()
 
override string ToString ()
 
void WriteTo (pb::CodedOutputStream output)
 
int CalculateSize ()
 
void MergeFrom (MPQuadraticObjective other)
 
void MergeFrom (pb::CodedInputStream input)
 

Static Public Attributes

const int Qvar1IndexFieldNumber = 1
 Field number for the "qvar1_index" field.
 
const int Qvar2IndexFieldNumber = 2
 Field number for the "qvar2_index" field.
 
const int CoefficientFieldNumber = 3
 Field number for the "coefficient" field.
 

Properties

static pb::MessageParser< MPQuadraticObjectiveParser [get]
 
static pbr::MessageDescriptor Descriptor [get]
 
pbc::RepeatedField< int > Qvar1Index [get]
 Sparse representation of quadratic terms in the objective function, where term i is qvar1_index[i] * qvar2_index[i] * coefficient[i]. qvar1_index and qvar2_index are variable indices w.r.t the "variable" field in MPModelProto. qvar1_index, qvar2_index and coefficients must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
 
pbc::RepeatedField< int > Qvar2Index [get]
 
pbc::RepeatedField< double > Coefficient [get]
 Must be finite.
 

Detailed Description

Quadratic part of a model's objective. Added with other objectives (such as linear), this creates the model's objective function to be optimized.

Note
the linear part of the objective currently needs to be specified in the MPVariableProto.objective_coefficient fields. If you'd rather have a dedicated linear array here, talk to or-core-team@

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

Constructor & Destructor Documentation

◆ MPQuadraticObjective() [1/2]

OperationsResearch.MPQuadraticObjective.MPQuadraticObjective ( )
inline

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

◆ MPQuadraticObjective() [2/2]

OperationsResearch.MPQuadraticObjective.MPQuadraticObjective ( MPQuadraticObjective other)
inline

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

Member Function Documentation

◆ CalculateSize()

int OperationsResearch.MPQuadraticObjective.CalculateSize ( )
inline

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

◆ Clone()

MPQuadraticObjective OperationsResearch.MPQuadraticObjective.Clone ( )
inline

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

◆ Equals() [1/2]

bool OperationsResearch.MPQuadraticObjective.Equals ( MPQuadraticObjective other)
inline

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

◆ Equals() [2/2]

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

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

◆ GetHashCode()

override int OperationsResearch.MPQuadraticObjective.GetHashCode ( )
inline

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

◆ MergeFrom() [1/2]

void OperationsResearch.MPQuadraticObjective.MergeFrom ( MPQuadraticObjective other)
inline

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

◆ MergeFrom() [2/2]

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

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

◆ ToString()

override string OperationsResearch.MPQuadraticObjective.ToString ( )
inline

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

◆ WriteTo()

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

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

Member Data Documentation

◆ CoefficientFieldNumber

const int OperationsResearch.MPQuadraticObjective.CoefficientFieldNumber = 3
static

Field number for the "coefficient" field.

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

◆ Qvar1IndexFieldNumber

const int OperationsResearch.MPQuadraticObjective.Qvar1IndexFieldNumber = 1
static

Field number for the "qvar1_index" field.

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

◆ Qvar2IndexFieldNumber

const int OperationsResearch.MPQuadraticObjective.Qvar2IndexFieldNumber = 2
static

Field number for the "qvar2_index" field.

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

Property Documentation

◆ Coefficient

pbc.RepeatedField<double> OperationsResearch.MPQuadraticObjective.Coefficient
get

Must be finite.

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

◆ Descriptor

pbr.MessageDescriptor OperationsResearch.MPQuadraticObjective.Descriptor
staticget

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

◆ Parser

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

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

◆ Qvar1Index

pbc.RepeatedField<int> OperationsResearch.MPQuadraticObjective.Qvar1Index
get

Sparse representation of quadratic terms in the objective function, where term i is qvar1_index[i] * qvar2_index[i] * coefficient[i]. qvar1_index and qvar2_index are variable indices w.r.t the "variable" field in MPModelProto. qvar1_index, qvar2_index and coefficients must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.

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

◆ Qvar2Index

pbc.RepeatedField<int> OperationsResearch.MPQuadraticObjective.Qvar2Index
get

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


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