Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.linearsolver.MPSolutionResponseOrBuilder Interface Reference
Inheritance diagram for com.google.ortools.linearsolver.MPSolutionResponseOrBuilder:
com.google.ortools.linearsolver.MPSolutionResponse com.google.ortools.linearsolver.MPSolutionResponse.Builder

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)
 
boolean hasSolveInfo ()
 
com.google.ortools.linearsolver.MPSolveInfo getSolveInfo ()
 
com.google.ortools.linearsolver.MPSolveInfoOrBuilder getSolveInfoOrBuilder ()
 
boolean hasSolverSpecificInfo ()
 
com.google.protobuf.ByteString getSolverSpecificInfo ()
 
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)
 
java.util.List< com.google.ortools.linearsolver.MPSolutiongetAdditionalSolutionsList ()
 
com.google.ortools.linearsolver.MPSolution getAdditionalSolutions (int index)
 
int getAdditionalSolutionsCount ()
 
java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuildergetAdditionalSolutionsOrBuilderList ()
 
com.google.ortools.linearsolver.MPSolutionOrBuilder getAdditionalSolutionsOrBuilder (int index)
 

Detailed Description

Definition at line 7 of file MPSolutionResponseOrBuilder.java.

Member Function Documentation

◆ getAdditionalSolutions()

com.google.ortools.linearsolver.MPSolution com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.getAdditionalSolutions ( int index)
[Advanced usage.]
If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that
number of additional solutions may be populated here, if available. These
additional solutions are different than the main solution described by the
above fields `objective_value` and `variable_value`.

repeated .operations_research.MPSolution additional_solutions = 8;

Implemented in com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getAdditionalSolutionsCount()

int com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.getAdditionalSolutionsCount ( )
[Advanced usage.]
If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that
number of additional solutions may be populated here, if available. These
additional solutions are different than the main solution described by the
above fields `objective_value` and `variable_value`.

repeated .operations_research.MPSolution additional_solutions = 8;

Implemented in com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getAdditionalSolutionsList()

java.util.List< com.google.ortools.linearsolver.MPSolution > com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.getAdditionalSolutionsList ( )
[Advanced usage.]
If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that
number of additional solutions may be populated here, if available. These
additional solutions are different than the main solution described by the
above fields `objective_value` and `variable_value`.

repeated .operations_research.MPSolution additional_solutions = 8;

Implemented in com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getAdditionalSolutionsOrBuilder()

com.google.ortools.linearsolver.MPSolutionOrBuilder com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.getAdditionalSolutionsOrBuilder ( int index)
[Advanced usage.]
If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that
number of additional solutions may be populated here, if available. These
additional solutions are different than the main solution described by the
above fields `objective_value` and `variable_value`.

repeated .operations_research.MPSolution additional_solutions = 8;

Implemented in com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getAdditionalSolutionsOrBuilderList()

java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder > com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.getAdditionalSolutionsOrBuilderList ( )
[Advanced usage.]
If `MPModelRequest.populate_additional_solutions_up_to` > 0, up to that
number of additional solutions may be populated here, if available. These
additional solutions are different than the main solution described by the
above fields `objective_value` and `variable_value`.

repeated .operations_research.MPSolution additional_solutions = 8;

Implemented in com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getBestObjectiveBound()

double com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getDualValue()

double com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getDualValueCount()

int com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getDualValueList()

java.util.List< java.lang.Double > com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getObjectiveValue()

double com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getReducedCost()

double com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getReducedCostCount()

int com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getReducedCostList()

java.util.List< java.lang.Double > com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getSolveInfo()

com.google.ortools.linearsolver.MPSolveInfo com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.getSolveInfo ( )
Contains extra information about the solve, populated if the underlying
solver (and its interface) supports it. As of 2021/07/19 this is supported
by SCIP and Gurobi proto solves.

optional .operations_research.MPSolveInfo solve_info = 10;

Returns
The solveInfo.

Implemented in com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getSolveInfoOrBuilder()

com.google.ortools.linearsolver.MPSolveInfoOrBuilder com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.getSolveInfoOrBuilder ( )
Contains extra information about the solve, populated if the underlying
solver (and its interface) supports it. As of 2021/07/19 this is supported
by SCIP and Gurobi proto solves.

optional .operations_research.MPSolveInfo solve_info = 10;

Implemented in com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getSolverSpecificInfo()

com.google.protobuf.ByteString com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.getSolverSpecificInfo ( )
Opaque solver-specific information.
For the PDLP solver, this is a serialized pdlp.SolveLog proto.

optional bytes solver_specific_info = 11;

Returns
The solverSpecificInfo.

Implemented in com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getStatus()

com.google.ortools.linearsolver.MPSolverResponseStatus com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.getStatus ( )
Result of the optimization.

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

Returns
The status.

Implemented in com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getStatusStr()

java.lang.String com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getStatusStrBytes()

com.google.protobuf.ByteString com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getVariableValue()

double com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getVariableValueCount()

int com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ getVariableValueList()

java.util.List< java.lang.Double > com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ hasBestObjectiveBound()

boolean com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ hasObjectiveValue()

boolean com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ hasSolveInfo()

boolean com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.hasSolveInfo ( )
Contains extra information about the solve, populated if the underlying
solver (and its interface) supports it. As of 2021/07/19 this is supported
by SCIP and Gurobi proto solves.

optional .operations_research.MPSolveInfo solve_info = 10;

Returns
Whether the solveInfo field is set.

Implemented in com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ hasSolverSpecificInfo()

boolean com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.hasSolverSpecificInfo ( )
Opaque solver-specific information.
For the PDLP solver, this is a serialized pdlp.SolveLog proto.

optional bytes solver_specific_info = 11;

Returns
Whether the solverSpecificInfo field is set.

Implemented in com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ hasStatus()

boolean com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.hasStatus ( )
Result of the optimization.

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

Returns
Whether the status field is set.

Implemented in com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.

◆ hasStatusStr()

boolean com.google.ortools.linearsolver.MPSolutionResponseOrBuilder.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 com.google.ortools.linearsolver.MPSolutionResponse.Builder, and com.google.ortools.linearsolver.MPSolutionResponse.


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