Java Reference
Java Reference
Detailed Description
Definition at line 6 of file MPModelProtoOrBuilder.java.
Member Function Documentation
◆ getConstraint()
| com.google.ortools.linearsolver.MPConstraintProto getConstraint | ( | int | index | ) |
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getConstraintCount()
| int getConstraintCount | ( | ) |
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getConstraintList()
| java.util.List<com.google.ortools.linearsolver.MPConstraintProto> getConstraintList | ( | ) |
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getConstraintOrBuilder()
| com.google.ortools.linearsolver.MPConstraintProtoOrBuilder getConstraintOrBuilder | ( | int | index | ) |
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getConstraintOrBuilderList()
| java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder> getConstraintOrBuilderList | ( | ) |
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getGeneralConstraint()
| com.google.ortools.linearsolver.MPGeneralConstraintProto getGeneralConstraint | ( | int | index | ) |
All the general constraints appearing in the model. Note that not all solvers support all types of general constraints.
repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getGeneralConstraintCount()
| int getGeneralConstraintCount | ( | ) |
All the general constraints appearing in the model. Note that not all solvers support all types of general constraints.
repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getGeneralConstraintList()
| java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> getGeneralConstraintList | ( | ) |
All the general constraints appearing in the model. Note that not all solvers support all types of general constraints.
repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getGeneralConstraintOrBuilder()
| com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder | ( | int | index | ) |
All the general constraints appearing in the model. Note that not all solvers support all types of general constraints.
repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getGeneralConstraintOrBuilderList()
| java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder> getGeneralConstraintOrBuilderList | ( | ) |
All the general constraints appearing in the model. Note that not all solvers support all types of general constraints.
repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getMaximize()
| boolean getMaximize | ( | ) |
True if the problem is a maximization problem. Minimize by default.
optional bool maximize = 1 [default = false];
- Returns
- The maximize.
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getName()
| java.lang.String getName | ( | ) |
Name of the model.
optional string name = 5 [default = ""];
- Returns
- The name.
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getNameBytes()
| com.google.protobuf.ByteString getNameBytes | ( | ) |
Name of the model.
optional string name = 5 [default = ""];
- Returns
- The bytes for name.
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getObjectiveOffset()
| double getObjectiveOffset | ( | ) |
Offset for the objective function. Must be finite.
optional double objective_offset = 2 [default = 0];
- Returns
- The objectiveOffset.
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getQuadraticObjective()
| com.google.ortools.linearsolver.MPQuadraticObjective getQuadraticObjective | ( | ) |
Optionally, a quadratic objective. As of 2019/06, only SCIP and Gurobi support quadratic objectives.
optional .operations_research.MPQuadraticObjective quadratic_objective = 8;
- Returns
- The quadraticObjective.
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getQuadraticObjectiveOrBuilder()
| com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder getQuadraticObjectiveOrBuilder | ( | ) |
Optionally, a quadratic objective. As of 2019/06, only SCIP and Gurobi support quadratic objectives.
optional .operations_research.MPQuadraticObjective quadratic_objective = 8;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getSolutionHint()
| com.google.ortools.linearsolver.PartialVariableAssignment getSolutionHint | ( | ) |
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 that 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.
optional .operations_research.PartialVariableAssignment solution_hint = 6;
- Returns
- The solutionHint.
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getSolutionHintOrBuilder()
| com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder | ( | ) |
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 that 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.
optional .operations_research.PartialVariableAssignment solution_hint = 6;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getVariable()
| com.google.ortools.linearsolver.MPVariableProto getVariable | ( | int | index | ) |
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getVariableCount()
| int getVariableCount | ( | ) |
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getVariableList()
| java.util.List<com.google.ortools.linearsolver.MPVariableProto> getVariableList | ( | ) |
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getVariableOrBuilder()
| com.google.ortools.linearsolver.MPVariableProtoOrBuilder getVariableOrBuilder | ( | int | index | ) |
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ getVariableOrBuilderList()
| java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder> getVariableOrBuilderList | ( | ) |
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;
Implemented in MPModelProto.Builder, and MPModelProto.
◆ hasMaximize()
| boolean hasMaximize | ( | ) |
True if the problem is a maximization problem. Minimize by default.
optional bool maximize = 1 [default = false];
- Returns
- Whether the maximize field is set.
Implemented in MPModelProto.Builder, and MPModelProto.
◆ hasName()
| boolean hasName | ( | ) |
Name of the model.
optional string name = 5 [default = ""];
- Returns
- Whether the name field is set.
Implemented in MPModelProto.Builder, and MPModelProto.
◆ hasObjectiveOffset()
| boolean hasObjectiveOffset | ( | ) |
Offset for the objective function. Must be finite.
optional double objective_offset = 2 [default = 0];
- Returns
- Whether the objectiveOffset field is set.
Implemented in MPModelProto.Builder, and MPModelProto.
◆ hasQuadraticObjective()
| boolean hasQuadraticObjective | ( | ) |
Optionally, a quadratic objective. As of 2019/06, only SCIP and Gurobi support quadratic objectives.
optional .operations_research.MPQuadraticObjective quadratic_objective = 8;
- Returns
- Whether the quadraticObjective field is set.
Implemented in MPModelProto.Builder, and MPModelProto.
◆ hasSolutionHint()
| boolean hasSolutionHint | ( | ) |
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 that 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.
optional .operations_research.PartialVariableAssignment solution_hint = 6;
- Returns
- Whether the solutionHint field is set.
Implemented in MPModelProto.Builder, and MPModelProto.
The documentation for this interface was generated from the following file: