DotNet Reference

.Net Reference

Detailed Description

Optimization objective.

This is in a message because decision problems don't have any objective.

Definition at line 6235 of file CpModel.pb.cs.

Public Member Functions

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

Static Public Attributes

const int VarsFieldNumber = 1
 Field number for the "vars" field. More...
 
const int CoeffsFieldNumber = 4
 Field number for the "coeffs" field. More...
 
const int OffsetFieldNumber = 2
 Field number for the "offset" field. More...
 
const int ScalingFactorFieldNumber = 3
 Field number for the "scaling_factor" field. More...
 
const int DomainFieldNumber = 5
 Field number for the "domain" field. More...
 

Properties

static pb::MessageParser< CpObjectiveProtoParser [get]
 
static pbr::MessageDescriptor Descriptor [get]
 
pbc::RepeatedField< int > Vars [get]
 The linear terms of the objective to minimize. More...
 
pbc::RepeatedField< long > Coeffs [get]
 
double Offset [get, set]
 The displayed objective is always: scaling_factor * (sum(coefficients[i] * objective_vars[i]) + offset). More...
 
double ScalingFactor [get, set]
 
pbc::RepeatedField< long > Domain [get]
 If non-empty, only look for an objective value in the given domain. More...
 

Constructor & Destructor Documentation

◆ CpObjectiveProto() [1/2]

CpObjectiveProto ( )
inline

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

◆ CpObjectiveProto() [2/2]

Definition at line 6263 of file CpModel.pb.cs.

Member Function Documentation

◆ CalculateSize()

int CalculateSize ( )
inline

Definition at line 6431 of file CpModel.pb.cs.

◆ Clone()

CpObjectiveProto Clone ( )
inline

Definition at line 6273 of file CpModel.pb.cs.

◆ Equals() [1/2]

bool Equals ( CpObjectiveProto  other)
inline

Definition at line 6354 of file CpModel.pb.cs.

◆ Equals() [2/2]

override bool Equals ( object  other)
inline

Definition at line 6349 of file CpModel.pb.cs.

◆ GetHashCode()

override int GetHashCode ( )
inline

Definition at line 6370 of file CpModel.pb.cs.

◆ MergeFrom() [1/2]

void MergeFrom ( CpObjectiveProto  other)
inline

Definition at line 6449 of file CpModel.pb.cs.

◆ MergeFrom() [2/2]

void MergeFrom ( pb::CodedInputStream  input)
inline

Definition at line 6466 of file CpModel.pb.cs.

◆ ToString()

override string ToString ( )
inline

Definition at line 6384 of file CpModel.pb.cs.

◆ WriteTo()

void WriteTo ( pb::CodedOutputStream  output)
inline

Definition at line 6389 of file CpModel.pb.cs.

Member Data Documentation

◆ CoeffsFieldNumber

const int CoeffsFieldNumber = 4
static

Field number for the "coeffs" field.

Definition at line 6293 of file CpModel.pb.cs.

◆ DomainFieldNumber

const int DomainFieldNumber = 5
static

Field number for the "domain" field.

Definition at line 6334 of file CpModel.pb.cs.

◆ OffsetFieldNumber

const int OffsetFieldNumber = 2
static

Field number for the "offset" field.

Definition at line 6303 of file CpModel.pb.cs.

◆ ScalingFactorFieldNumber

const int ScalingFactorFieldNumber = 3
static

Field number for the "scaling_factor" field.

Definition at line 6323 of file CpModel.pb.cs.

◆ VarsFieldNumber

const int VarsFieldNumber = 1
static

Field number for the "vars" field.

Definition at line 6278 of file CpModel.pb.cs.

Property Documentation

◆ Coeffs

pbc.RepeatedField<long> Coeffs
get

Definition at line 6298 of file CpModel.pb.cs.

◆ Descriptor

pbr.MessageDescriptor Descriptor
staticget

Definition at line 6246 of file CpModel.pb.cs.

◆ Domain

pbc.RepeatedField<long> Domain
get

If non-empty, only look for an objective value in the given domain.

Note that this does not depend on the offset or scaling factor, it is a domain on the sum of the objective terms only.

Definition at line 6344 of file CpModel.pb.cs.

◆ Offset

double Offset
getset

The displayed objective is always: scaling_factor * (sum(coefficients[i] * objective_vars[i]) + offset).

This is needed to have a consistent objective after presolve or when scaling a double problem to express it with integers.

Note that if scaling_factor is zero, then it is assumed to be 1, so that by default these fields have no effect.

Definition at line 6315 of file CpModel.pb.cs.

◆ Parser

pb.MessageParser<CpObjectiveProto> Parser
staticget

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

◆ ScalingFactor

double ScalingFactor
getset

Definition at line 6326 of file CpModel.pb.cs.

◆ Vars

pbc.RepeatedField<int> Vars
get

The linear terms of the objective to minimize.

For a maximization problem, one can negate all coefficients in the objective and set a scaling_factor to -1.

Definition at line 6288 of file CpModel.pb.cs.


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