Java Reference

Java Reference

MPSolutionResponseOrBuilder

Detailed Description

Definition at line 6 of file MPSolutionResponseOrBuilder.java.

Public Member Functions

boolean hasStatus ()
 
com.google.ortools.linearsolver.MPSolverResponseStatus getStatus ()
 
boolean hasStatusStr ()
 
java.lang.String getStatusStr ()
 
com.google.protobuf.ByteString getStatusStrBytes ()
 
boolean hasObjectiveValue ()
 
double getObjectiveValue ()
 
boolean hasBestObjectiveBound ()
 
double getBestObjectiveBound ()
 
java.util.List< java.lang.Double > getVariableValueList ()
 
int getVariableValueCount ()
 
double getVariableValue (int index)
 
java.util.List< java.lang.Double > getDualValueList ()
 
int getDualValueCount ()
 
double getDualValue (int index)
 
java.util.List< java.lang.Double > getReducedCostList ()
 
int getReducedCostCount ()
 
double getReducedCost (int index)
 

Member Function Documentation

◆ getBestObjectiveBound()

double getBestObjectiveBound ( )
This field is only filled for MIP problems. For a minimization problem,
this is a lower bound on the optimal objective value. For a maximization
problem, it is an upper bound. It is only filled if the status is OPTIMAL
or FEASIBLE. In the former case, best_objective_bound should be equal to
objective_value (modulo numerical errors).

optional double best_objective_bound = 5;

Returns
The bestObjectiveBound.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getDualValue()

double getDualValue ( int  index)
[Advanced usage.]
Values of the dual variables values in the same order as the
MPModelProto::constraint field. This is a dense representation.
These are not set if the problem was solved with a MIP solver (even if
it is actually a linear program).
These are set iff 'status' is OPTIMAL or FEASIBLE.

repeated double dual_value = 4 [packed = true];

Parameters
indexThe index of the element to return.
Returns
The dualValue at the given index.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getDualValueCount()

int getDualValueCount ( )
[Advanced usage.]
Values of the dual variables values in the same order as the
MPModelProto::constraint field. This is a dense representation.
These are not set if the problem was solved with a MIP solver (even if
it is actually a linear program).
These are set iff 'status' is OPTIMAL or FEASIBLE.

repeated double dual_value = 4 [packed = true];

Returns
The count of dualValue.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getDualValueList()

java.util.List<java.lang.Double> getDualValueList ( )
[Advanced usage.]
Values of the dual variables values in the same order as the
MPModelProto::constraint field. This is a dense representation.
These are not set if the problem was solved with a MIP solver (even if
it is actually a linear program).
These are set iff 'status' is OPTIMAL or FEASIBLE.

repeated double dual_value = 4 [packed = true];

Returns
A list containing the dualValue.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getObjectiveValue()

double getObjectiveValue ( )
Objective value corresponding to the "variable_value" below, taking into
account the source "objective_offset" and "objective_coefficient".
This is set iff 'status' is OPTIMAL or FEASIBLE.

optional double objective_value = 2;

Returns
The objectiveValue.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getReducedCost()

double getReducedCost ( int  index)
[Advanced usage.]
Values of the reduced cost of the variables in the same order as the
MPModelProto::variable. This is a dense representation.
These are not set if the problem was solved with a MIP solver (even if it
is actually a linear program).
These are set iff 'status' is OPTIMAL or FEASIBLE.

repeated double reduced_cost = 6 [packed = true];

Parameters
indexThe index of the element to return.
Returns
The reducedCost at the given index.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getReducedCostCount()

int getReducedCostCount ( )
[Advanced usage.]
Values of the reduced cost of the variables in the same order as the
MPModelProto::variable. This is a dense representation.
These are not set if the problem was solved with a MIP solver (even if it
is actually a linear program).
These are set iff 'status' is OPTIMAL or FEASIBLE.

repeated double reduced_cost = 6 [packed = true];

Returns
The count of reducedCost.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getReducedCostList()

java.util.List<java.lang.Double> getReducedCostList ( )
[Advanced usage.]
Values of the reduced cost of the variables in the same order as the
MPModelProto::variable. This is a dense representation.
These are not set if the problem was solved with a MIP solver (even if it
is actually a linear program).
These are set iff 'status' is OPTIMAL or FEASIBLE.

repeated double reduced_cost = 6 [packed = true];

Returns
A list containing the reducedCost.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getStatus()

Result of the optimization.

optional .operations_research.MPSolverResponseStatus status = 1 [default = MPSOLVER_UNKNOWN_STATUS];

Returns
The status.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getStatusStr()

java.lang.String getStatusStr ( )
Human-readable string giving more details about the status. For example,
when the status is MPSOLVER_INVALID_MODE, this can hold a description of
why the model is invalid.
This isn't always filled: don't depend on its value or even its presence.

optional string status_str = 7;

Returns
The statusStr.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getStatusStrBytes()

com.google.protobuf.ByteString getStatusStrBytes ( )
Human-readable string giving more details about the status. For example,
when the status is MPSOLVER_INVALID_MODE, this can hold a description of
why the model is invalid.
This isn't always filled: don't depend on its value or even its presence.

optional string status_str = 7;

Returns
The bytes for statusStr.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getVariableValue()

double getVariableValue ( int  index)
Variable values in the same order as the MPModelProto::variable field.
This is a dense representation. These are set iff 'status' is OPTIMAL or
FEASIBLE.

repeated double variable_value = 3 [packed = true];

Parameters
indexThe index of the element to return.
Returns
The variableValue at the given index.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getVariableValueCount()

int getVariableValueCount ( )
Variable values in the same order as the MPModelProto::variable field.
This is a dense representation. These are set iff 'status' is OPTIMAL or
FEASIBLE.

repeated double variable_value = 3 [packed = true];

Returns
The count of variableValue.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ getVariableValueList()

java.util.List<java.lang.Double> getVariableValueList ( )
Variable values in the same order as the MPModelProto::variable field.
This is a dense representation. These are set iff 'status' is OPTIMAL or
FEASIBLE.

repeated double variable_value = 3 [packed = true];

Returns
A list containing the variableValue.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ hasBestObjectiveBound()

boolean hasBestObjectiveBound ( )
This field is only filled for MIP problems. For a minimization problem,
this is a lower bound on the optimal objective value. For a maximization
problem, it is an upper bound. It is only filled if the status is OPTIMAL
or FEASIBLE. In the former case, best_objective_bound should be equal to
objective_value (modulo numerical errors).

optional double best_objective_bound = 5;

Returns
Whether the bestObjectiveBound field is set.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ hasObjectiveValue()

boolean hasObjectiveValue ( )
Objective value corresponding to the "variable_value" below, taking into
account the source "objective_offset" and "objective_coefficient".
This is set iff 'status' is OPTIMAL or FEASIBLE.

optional double objective_value = 2;

Returns
Whether the objectiveValue field is set.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ hasStatus()

boolean hasStatus ( )
Result of the optimization.

optional .operations_research.MPSolverResponseStatus status = 1 [default = MPSOLVER_UNKNOWN_STATUS];

Returns
Whether the status field is set.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.

◆ hasStatusStr()

boolean hasStatusStr ( )
Human-readable string giving more details about the status. For example,
when the status is MPSOLVER_INVALID_MODE, this can hold a description of
why the model is invalid.
This isn't always filled: don't depend on its value or even its presence.

optional string status_str = 7;

Returns
Whether the statusStr field is set.

Implemented in MPSolutionResponse.Builder, and MPSolutionResponse.


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