com.google.ortools.linearsolver.MPModelRequest Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ortools/linear_solver/linear_solver.proto
package com.google.ortools.linearsolver;
/**
*
* Next id: 9.
*
*
* Protobuf type {@code operations_research.MPModelRequest}
*/
public final class MPModelRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:operations_research.MPModelRequest)
MPModelRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use MPModelRequest.newBuilder() to construct.
private MPModelRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MPModelRequest() {
solverType_ = 2;
solverSpecificParameters_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MPModelRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MPModelRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.ortools.linearsolver.MPModelProto.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) != 0)) {
subBuilder = model_.toBuilder();
}
model_ = input.readMessage(com.google.ortools.linearsolver.MPModelProto.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(model_);
model_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 16: {
int rawValue = input.readEnum();
@SuppressWarnings("deprecation")
com.google.ortools.linearsolver.MPModelRequest.SolverType value = com.google.ortools.linearsolver.MPModelRequest.SolverType.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(2, rawValue);
} else {
bitField0_ |= 0x00000002;
solverType_ = rawValue;
}
break;
}
case 25: {
bitField0_ |= 0x00000004;
solverTimeLimitSeconds_ = input.readDouble();
break;
}
case 32: {
bitField0_ |= 0x00000008;
enableInternalSolverOutput_ = input.readBool();
break;
}
case 42: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000010;
solverSpecificParameters_ = bs;
break;
}
case 66: {
com.google.ortools.linearsolver.MPModelDeltaProto.Builder subBuilder = null;
if (((bitField0_ & 0x00000020) != 0)) {
subBuilder = modelDelta_.toBuilder();
}
modelDelta_ = input.readMessage(com.google.ortools.linearsolver.MPModelDeltaProto.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(modelDelta_);
modelDelta_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000020;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ortools.linearsolver.MPModelRequest.class, com.google.ortools.linearsolver.MPModelRequest.Builder.class);
}
/**
*
* The solver type, which will select a specific implementation, and will also
* impact the interpretation of the model (i.e. are we solving the problem
* as a mixed integer program or are we relaxing it as a continuous linear
* program?).
* This must remain consistent with MPSolver::OptimizationProblemType.
*
*
* Protobuf enum {@code operations_research.MPModelRequest.SolverType}
*/
public enum SolverType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Recommended default for LP models.
*
*
* GLOP_LINEAR_PROGRAMMING = 2;
*/
GLOP_LINEAR_PROGRAMMING(2),
/**
* CLP_LINEAR_PROGRAMMING = 0;
*/
CLP_LINEAR_PROGRAMMING(0),
/**
* GLPK_LINEAR_PROGRAMMING = 1;
*/
GLPK_LINEAR_PROGRAMMING(1),
/**
*
* Commercial, needs a valid license.
*
*
* GUROBI_LINEAR_PROGRAMMING = 6;
*/
GUROBI_LINEAR_PROGRAMMING(6),
/**
*
* Commercial, needs a valid license. NOLINT
*
*
* XPRESS_LINEAR_PROGRAMMING = 101;
*/
XPRESS_LINEAR_PROGRAMMING(101),
/**
*
* Commercial, needs a valid license. NOLINT
*
*
* CPLEX_LINEAR_PROGRAMMING = 10;
*/
CPLEX_LINEAR_PROGRAMMING(10),
/**
*
* Recommended default for MIP models.
*
*
* SCIP_MIXED_INTEGER_PROGRAMMING = 3;
*/
SCIP_MIXED_INTEGER_PROGRAMMING(3),
/**
* GLPK_MIXED_INTEGER_PROGRAMMING = 4;
*/
GLPK_MIXED_INTEGER_PROGRAMMING(4),
/**
* CBC_MIXED_INTEGER_PROGRAMMING = 5;
*/
CBC_MIXED_INTEGER_PROGRAMMING(5),
/**
*
* Commercial, needs a valid license.
*
*
* GUROBI_MIXED_INTEGER_PROGRAMMING = 7;
*/
GUROBI_MIXED_INTEGER_PROGRAMMING(7),
/**
*
* Commercial, needs a valid license. NOLINT
*
*
* XPRESS_MIXED_INTEGER_PROGRAMMING = 102;
*/
XPRESS_MIXED_INTEGER_PROGRAMMING(102),
/**
*
* Commercial, needs a valid license. NOLINT
*
*
* CPLEX_MIXED_INTEGER_PROGRAMMING = 11;
*/
CPLEX_MIXED_INTEGER_PROGRAMMING(11),
/**
* BOP_INTEGER_PROGRAMMING = 12;
*/
BOP_INTEGER_PROGRAMMING(12),
/**
*
* WARNING: This solver will currently interpret all variables as integer,
* so any solution you get will be valid, but the optimal might be far away
* for the real one (when you authorise non-integer value for continuous
* variables).
*
*
* SAT_INTEGER_PROGRAMMING = 14;
*/
SAT_INTEGER_PROGRAMMING(14),
/**
* KNAPSACK_MIXED_INTEGER_PROGRAMMING = 13;
*/
KNAPSACK_MIXED_INTEGER_PROGRAMMING(13),
;
/**
*
* Recommended default for LP models.
*
*
* GLOP_LINEAR_PROGRAMMING = 2;
*/
public static final int GLOP_LINEAR_PROGRAMMING_VALUE = 2;
/**
* CLP_LINEAR_PROGRAMMING = 0;
*/
public static final int CLP_LINEAR_PROGRAMMING_VALUE = 0;
/**
* GLPK_LINEAR_PROGRAMMING = 1;
*/
public static final int GLPK_LINEAR_PROGRAMMING_VALUE = 1;
/**
*
* Commercial, needs a valid license.
*
*
* GUROBI_LINEAR_PROGRAMMING = 6;
*/
public static final int GUROBI_LINEAR_PROGRAMMING_VALUE = 6;
/**
*
* Commercial, needs a valid license. NOLINT
*
*
* XPRESS_LINEAR_PROGRAMMING = 101;
*/
public static final int XPRESS_LINEAR_PROGRAMMING_VALUE = 101;
/**
*
* Commercial, needs a valid license. NOLINT
*
*
* CPLEX_LINEAR_PROGRAMMING = 10;
*/
public static final int CPLEX_LINEAR_PROGRAMMING_VALUE = 10;
/**
*
* Recommended default for MIP models.
*
*
* SCIP_MIXED_INTEGER_PROGRAMMING = 3;
*/
public static final int SCIP_MIXED_INTEGER_PROGRAMMING_VALUE = 3;
/**
* GLPK_MIXED_INTEGER_PROGRAMMING = 4;
*/
public static final int GLPK_MIXED_INTEGER_PROGRAMMING_VALUE = 4;
/**
* CBC_MIXED_INTEGER_PROGRAMMING = 5;
*/
public static final int CBC_MIXED_INTEGER_PROGRAMMING_VALUE = 5;
/**
*
* Commercial, needs a valid license.
*
*
* GUROBI_MIXED_INTEGER_PROGRAMMING = 7;
*/
public static final int GUROBI_MIXED_INTEGER_PROGRAMMING_VALUE = 7;
/**
*
* Commercial, needs a valid license. NOLINT
*
*
* XPRESS_MIXED_INTEGER_PROGRAMMING = 102;
*/
public static final int XPRESS_MIXED_INTEGER_PROGRAMMING_VALUE = 102;
/**
*
* Commercial, needs a valid license. NOLINT
*
*
* CPLEX_MIXED_INTEGER_PROGRAMMING = 11;
*/
public static final int CPLEX_MIXED_INTEGER_PROGRAMMING_VALUE = 11;
/**
* BOP_INTEGER_PROGRAMMING = 12;
*/
public static final int BOP_INTEGER_PROGRAMMING_VALUE = 12;
/**
*
* WARNING: This solver will currently interpret all variables as integer,
* so any solution you get will be valid, but the optimal might be far away
* for the real one (when you authorise non-integer value for continuous
* variables).
*
*
* SAT_INTEGER_PROGRAMMING = 14;
*/
public static final int SAT_INTEGER_PROGRAMMING_VALUE = 14;
/**
* KNAPSACK_MIXED_INTEGER_PROGRAMMING = 13;
*/
public static final int KNAPSACK_MIXED_INTEGER_PROGRAMMING_VALUE = 13;
public final int getNumber() {
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SolverType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static SolverType forNumber(int value) {
switch (value) {
case 2: return GLOP_LINEAR_PROGRAMMING;
case 0: return CLP_LINEAR_PROGRAMMING;
case 1: return GLPK_LINEAR_PROGRAMMING;
case 6: return GUROBI_LINEAR_PROGRAMMING;
case 101: return XPRESS_LINEAR_PROGRAMMING;
case 10: return CPLEX_LINEAR_PROGRAMMING;
case 3: return SCIP_MIXED_INTEGER_PROGRAMMING;
case 4: return GLPK_MIXED_INTEGER_PROGRAMMING;
case 5: return CBC_MIXED_INTEGER_PROGRAMMING;
case 7: return GUROBI_MIXED_INTEGER_PROGRAMMING;
case 102: return XPRESS_MIXED_INTEGER_PROGRAMMING;
case 11: return CPLEX_MIXED_INTEGER_PROGRAMMING;
case 12: return BOP_INTEGER_PROGRAMMING;
case 14: return SAT_INTEGER_PROGRAMMING;
case 13: return KNAPSACK_MIXED_INTEGER_PROGRAMMING;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
SolverType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public SolverType findValueByNumber(int number) {
return SolverType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.ortools.linearsolver.MPModelRequest.getDescriptor().getEnumTypes().get(0);
}
private static final SolverType[] VALUES = values();
public static SolverType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private SolverType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:operations_research.MPModelRequest.SolverType)
}
private int bitField0_;
public static final int MODEL_FIELD_NUMBER = 1;
private com.google.ortools.linearsolver.MPModelProto model_;
/**
*
* The model to be optimized by the server.
*
*
* optional .operations_research.MPModelProto model = 1;
* @return Whether the model field is set.
*/
@java.lang.Override
public boolean hasModel() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The model to be optimized by the server.
*
*
* optional .operations_research.MPModelProto model = 1;
* @return The model.
*/
@java.lang.Override
public com.google.ortools.linearsolver.MPModelProto getModel() {
return model_ == null ? com.google.ortools.linearsolver.MPModelProto.getDefaultInstance() : model_;
}
/**
*
* The model to be optimized by the server.
*
*
* optional .operations_research.MPModelProto model = 1;
*/
@java.lang.Override
public com.google.ortools.linearsolver.MPModelProtoOrBuilder getModelOrBuilder() {
return model_ == null ? com.google.ortools.linearsolver.MPModelProto.getDefaultInstance() : model_;
}
public static final int SOLVER_TYPE_FIELD_NUMBER = 2;
private int solverType_;
/**
* optional .operations_research.MPModelRequest.SolverType solver_type = 2;
* @return Whether the solverType field is set.
*/
@java.lang.Override public boolean hasSolverType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional .operations_research.MPModelRequest.SolverType solver_type = 2;
* @return The solverType.
*/
@java.lang.Override public com.google.ortools.linearsolver.MPModelRequest.SolverType getSolverType() {
@SuppressWarnings("deprecation")
com.google.ortools.linearsolver.MPModelRequest.SolverType result = com.google.ortools.linearsolver.MPModelRequest.SolverType.valueOf(solverType_);
return result == null ? com.google.ortools.linearsolver.MPModelRequest.SolverType.GLOP_LINEAR_PROGRAMMING : result;
}
public static final int SOLVER_TIME_LIMIT_SECONDS_FIELD_NUMBER = 3;
private double solverTimeLimitSeconds_;
/**
*
* Maximum time to be spent by the solver to solve 'model'. If the server is
* busy and the RPC's deadline_left is less than this, it will immediately
* give up and return an error, without even trying to solve.
* The client can use this to have a guarantee on how much time the
* solver will spend on the problem (unless it finds and proves
* an optimal solution more quickly).
* If not specified, the time limit on the solver is the RPC's deadline_left.
*
*
* optional double solver_time_limit_seconds = 3;
* @return Whether the solverTimeLimitSeconds field is set.
*/
@java.lang.Override
public boolean hasSolverTimeLimitSeconds() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Maximum time to be spent by the solver to solve 'model'. If the server is
* busy and the RPC's deadline_left is less than this, it will immediately
* give up and return an error, without even trying to solve.
* The client can use this to have a guarantee on how much time the
* solver will spend on the problem (unless it finds and proves
* an optimal solution more quickly).
* If not specified, the time limit on the solver is the RPC's deadline_left.
*
*
* optional double solver_time_limit_seconds = 3;
* @return The solverTimeLimitSeconds.
*/
@java.lang.Override
public double getSolverTimeLimitSeconds() {
return solverTimeLimitSeconds_;
}
public static final int ENABLE_INTERNAL_SOLVER_OUTPUT_FIELD_NUMBER = 4;
private boolean enableInternalSolverOutput_;
/**
*
* If this is set, then EnableOutput() will be set on the internal MPSolver
* that solves the model.
* WARNING: if you set this on a request to prod servers, it will be rejected
* and yield the RPC Application Error code MPSOLVER_SOLVER_TYPE_UNAVAILABLE.
*
*
* optional bool enable_internal_solver_output = 4 [default = false];
* @return Whether the enableInternalSolverOutput field is set.
*/
@java.lang.Override
public boolean hasEnableInternalSolverOutput() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* If this is set, then EnableOutput() will be set on the internal MPSolver
* that solves the model.
* WARNING: if you set this on a request to prod servers, it will be rejected
* and yield the RPC Application Error code MPSOLVER_SOLVER_TYPE_UNAVAILABLE.
*
*
* optional bool enable_internal_solver_output = 4 [default = false];
* @return The enableInternalSolverOutput.
*/
@java.lang.Override
public boolean getEnableInternalSolverOutput() {
return enableInternalSolverOutput_;
}
public static final int SOLVER_SPECIFIC_PARAMETERS_FIELD_NUMBER = 5;
private volatile java.lang.Object solverSpecificParameters_;
/**
*
* Advanced usage. Solver-specific parameters in the solver's own format,
* different for each solver. For example, if you use SCIP and you want to
* stop the solve earlier than the time limit if it reached a solution that is
* at most 1% away from the optimal, you can set this to "limits/gap=0.01".
* Note however that there is no "security" mechanism in place so it is up to
* the client to make sure that the given options don't make the solve
* non thread safe or use up too much memory for instance.
* If the option format is not understood by the solver, the request will be
* rejected and yield an RPC Application error with code
* MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS.
*
*
* optional string solver_specific_parameters = 5;
* @return Whether the solverSpecificParameters field is set.
*/
@java.lang.Override
public boolean hasSolverSpecificParameters() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Advanced usage. Solver-specific parameters in the solver's own format,
* different for each solver. For example, if you use SCIP and you want to
* stop the solve earlier than the time limit if it reached a solution that is
* at most 1% away from the optimal, you can set this to "limits/gap=0.01".
* Note however that there is no "security" mechanism in place so it is up to
* the client to make sure that the given options don't make the solve
* non thread safe or use up too much memory for instance.
* If the option format is not understood by the solver, the request will be
* rejected and yield an RPC Application error with code
* MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS.
*
*
* optional string solver_specific_parameters = 5;
* @return The solverSpecificParameters.
*/
@java.lang.Override
public java.lang.String getSolverSpecificParameters() {
java.lang.Object ref = solverSpecificParameters_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
solverSpecificParameters_ = s;
}
return s;
}
}
/**
*
* Advanced usage. Solver-specific parameters in the solver's own format,
* different for each solver. For example, if you use SCIP and you want to
* stop the solve earlier than the time limit if it reached a solution that is
* at most 1% away from the optimal, you can set this to "limits/gap=0.01".
* Note however that there is no "security" mechanism in place so it is up to
* the client to make sure that the given options don't make the solve
* non thread safe or use up too much memory for instance.
* If the option format is not understood by the solver, the request will be
* rejected and yield an RPC Application error with code
* MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS.
*
*
* optional string solver_specific_parameters = 5;
* @return The bytes for solverSpecificParameters.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSolverSpecificParametersBytes() {
java.lang.Object ref = solverSpecificParameters_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
solverSpecificParameters_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MODEL_DELTA_FIELD_NUMBER = 8;
private com.google.ortools.linearsolver.MPModelDeltaProto modelDelta_;
/**
*
* Advanced usage: model "delta". If used, "model" must be unset. See the
* definition of MPModelDeltaProto.
*
*
* optional .operations_research.MPModelDeltaProto model_delta = 8;
* @return Whether the modelDelta field is set.
*/
@java.lang.Override
public boolean hasModelDelta() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Advanced usage: model "delta". If used, "model" must be unset. See the
* definition of MPModelDeltaProto.
*
*
* optional .operations_research.MPModelDeltaProto model_delta = 8;
* @return The modelDelta.
*/
@java.lang.Override
public com.google.ortools.linearsolver.MPModelDeltaProto getModelDelta() {
return modelDelta_ == null ? com.google.ortools.linearsolver.MPModelDeltaProto.getDefaultInstance() : modelDelta_;
}
/**
*
* Advanced usage: model "delta". If used, "model" must be unset. See the
* definition of MPModelDeltaProto.
*
*
* optional .operations_research.MPModelDeltaProto model_delta = 8;
*/
@java.lang.Override
public com.google.ortools.linearsolver.MPModelDeltaProtoOrBuilder getModelDeltaOrBuilder() {
return modelDelta_ == null ? com.google.ortools.linearsolver.MPModelDeltaProto.getDefaultInstance() : modelDelta_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getModel());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeEnum(2, solverType_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeDouble(3, solverTimeLimitSeconds_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeBool(4, enableInternalSolverOutput_);
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, solverSpecificParameters_);
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeMessage(8, getModelDelta());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getModel());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, solverType_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, solverTimeLimitSeconds_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, enableInternalSolverOutput_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, solverSpecificParameters_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getModelDelta());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.ortools.linearsolver.MPModelRequest)) {
return super.equals(obj);
}
com.google.ortools.linearsolver.MPModelRequest other = (com.google.ortools.linearsolver.MPModelRequest) obj;
if (hasModel() != other.hasModel()) return false;
if (hasModel()) {
if (!getModel()
.equals(other.getModel())) return false;
}
if (hasSolverType() != other.hasSolverType()) return false;
if (hasSolverType()) {
if (solverType_ != other.solverType_) return false;
}
if (hasSolverTimeLimitSeconds() != other.hasSolverTimeLimitSeconds()) return false;
if (hasSolverTimeLimitSeconds()) {
if (java.lang.Double.doubleToLongBits(getSolverTimeLimitSeconds())
!= java.lang.Double.doubleToLongBits(
other.getSolverTimeLimitSeconds())) return false;
}
if (hasEnableInternalSolverOutput() != other.hasEnableInternalSolverOutput()) return false;
if (hasEnableInternalSolverOutput()) {
if (getEnableInternalSolverOutput()
!= other.getEnableInternalSolverOutput()) return false;
}
if (hasSolverSpecificParameters() != other.hasSolverSpecificParameters()) return false;
if (hasSolverSpecificParameters()) {
if (!getSolverSpecificParameters()
.equals(other.getSolverSpecificParameters())) return false;
}
if (hasModelDelta() != other.hasModelDelta()) return false;
if (hasModelDelta()) {
if (!getModelDelta()
.equals(other.getModelDelta())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasModel()) {
hash = (37 * hash) + MODEL_FIELD_NUMBER;
hash = (53 * hash) + getModel().hashCode();
}
if (hasSolverType()) {
hash = (37 * hash) + SOLVER_TYPE_FIELD_NUMBER;
hash = (53 * hash) + solverType_;
}
if (hasSolverTimeLimitSeconds()) {
hash = (37 * hash) + SOLVER_TIME_LIMIT_SECONDS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getSolverTimeLimitSeconds()));
}
if (hasEnableInternalSolverOutput()) {
hash = (37 * hash) + ENABLE_INTERNAL_SOLVER_OUTPUT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getEnableInternalSolverOutput());
}
if (hasSolverSpecificParameters()) {
hash = (37 * hash) + SOLVER_SPECIFIC_PARAMETERS_FIELD_NUMBER;
hash = (53 * hash) + getSolverSpecificParameters().hashCode();
}
if (hasModelDelta()) {
hash = (37 * hash) + MODEL_DELTA_FIELD_NUMBER;
hash = (53 * hash) + getModelDelta().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ortools.linearsolver.MPModelRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ortools.linearsolver.MPModelRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ortools.linearsolver.MPModelRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ortools.linearsolver.MPModelRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ortools.linearsolver.MPModelRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ortools.linearsolver.MPModelRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ortools.linearsolver.MPModelRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ortools.linearsolver.MPModelRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ortools.linearsolver.MPModelRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ortools.linearsolver.MPModelRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ortools.linearsolver.MPModelRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ortools.linearsolver.MPModelRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.ortools.linearsolver.MPModelRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Next id: 9.
*
*
* Protobuf type {@code operations_research.MPModelRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:operations_research.MPModelRequest)
com.google.ortools.linearsolver.MPModelRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ortools.linearsolver.MPModelRequest.class, com.google.ortools.linearsolver.MPModelRequest.Builder.class);
}
// Construct using com.google.ortools.linearsolver.MPModelRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getModelFieldBuilder();
getModelDeltaFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (modelBuilder_ == null) {
model_ = null;
} else {
modelBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
solverType_ = 2;
bitField0_ = (bitField0_ & ~0x00000002);
solverTimeLimitSeconds_ = 0D;
bitField0_ = (bitField0_ & ~0x00000004);
enableInternalSolverOutput_ = false;
bitField0_ = (bitField0_ & ~0x00000008);
solverSpecificParameters_ = "";
bitField0_ = (bitField0_ & ~0x00000010);
if (modelDeltaBuilder_ == null) {
modelDelta_ = null;
} else {
modelDeltaBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelRequest_descriptor;
}
@java.lang.Override
public com.google.ortools.linearsolver.MPModelRequest getDefaultInstanceForType() {
return com.google.ortools.linearsolver.MPModelRequest.getDefaultInstance();
}
@java.lang.Override
public com.google.ortools.linearsolver.MPModelRequest build() {
com.google.ortools.linearsolver.MPModelRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ortools.linearsolver.MPModelRequest buildPartial() {
com.google.ortools.linearsolver.MPModelRequest result = new com.google.ortools.linearsolver.MPModelRequest(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
if (modelBuilder_ == null) {
result.model_ = model_;
} else {
result.model_ = modelBuilder_.build();
}
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
to_bitField0_ |= 0x00000002;
}
result.solverType_ = solverType_;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.solverTimeLimitSeconds_ = solverTimeLimitSeconds_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.enableInternalSolverOutput_ = enableInternalSolverOutput_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
to_bitField0_ |= 0x00000010;
}
result.solverSpecificParameters_ = solverSpecificParameters_;
if (((from_bitField0_ & 0x00000020) != 0)) {
if (modelDeltaBuilder_ == null) {
result.modelDelta_ = modelDelta_;
} else {
result.modelDelta_ = modelDeltaBuilder_.build();
}
to_bitField0_ |= 0x00000020;
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.ortools.linearsolver.MPModelRequest) {
return mergeFrom((com.google.ortools.linearsolver.MPModelRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ortools.linearsolver.MPModelRequest other) {
if (other == com.google.ortools.linearsolver.MPModelRequest.getDefaultInstance()) return this;
if (other.hasModel()) {
mergeModel(other.getModel());
}
if (other.hasSolverType()) {
setSolverType(other.getSolverType());
}
if (other.hasSolverTimeLimitSeconds()) {
setSolverTimeLimitSeconds(other.getSolverTimeLimitSeconds());
}
if (other.hasEnableInternalSolverOutput()) {
setEnableInternalSolverOutput(other.getEnableInternalSolverOutput());
}
if (other.hasSolverSpecificParameters()) {
bitField0_ |= 0x00000010;
solverSpecificParameters_ = other.solverSpecificParameters_;
onChanged();
}
if (other.hasModelDelta()) {
mergeModelDelta(other.getModelDelta());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.ortools.linearsolver.MPModelRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.ortools.linearsolver.MPModelRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.ortools.linearsolver.MPModelProto model_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.linearsolver.MPModelProto, com.google.ortools.linearsolver.MPModelProto.Builder, com.google.ortools.linearsolver.MPModelProtoOrBuilder> modelBuilder_;
/**
*
* The model to be optimized by the server.
*
*
* optional .operations_research.MPModelProto model = 1;
* @return Whether the model field is set.
*/
public boolean hasModel() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The model to be optimized by the server.
*
*
* optional .operations_research.MPModelProto model = 1;
* @return The model.
*/
public com.google.ortools.linearsolver.MPModelProto getModel() {
if (modelBuilder_ == null) {
return model_ == null ? com.google.ortools.linearsolver.MPModelProto.getDefaultInstance() : model_;
} else {
return modelBuilder_.getMessage();
}
}
/**
*
* The model to be optimized by the server.
*
*
* optional .operations_research.MPModelProto model = 1;
*/
public Builder setModel(com.google.ortools.linearsolver.MPModelProto value) {
if (modelBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
model_ = value;
onChanged();
} else {
modelBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
* The model to be optimized by the server.
*
*
* optional .operations_research.MPModelProto model = 1;
*/
public Builder setModel(
com.google.ortools.linearsolver.MPModelProto.Builder builderForValue) {
if (modelBuilder_ == null) {
model_ = builderForValue.build();
onChanged();
} else {
modelBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
* The model to be optimized by the server.
*
*
* optional .operations_research.MPModelProto model = 1;
*/
public Builder mergeModel(com.google.ortools.linearsolver.MPModelProto value) {
if (modelBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
model_ != null &&
model_ != com.google.ortools.linearsolver.MPModelProto.getDefaultInstance()) {
model_ =
com.google.ortools.linearsolver.MPModelProto.newBuilder(model_).mergeFrom(value).buildPartial();
} else {
model_ = value;
}
onChanged();
} else {
modelBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
* The model to be optimized by the server.
*
*
* optional .operations_research.MPModelProto model = 1;
*/
public Builder clearModel() {
if (modelBuilder_ == null) {
model_ = null;
onChanged();
} else {
modelBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
*
* The model to be optimized by the server.
*
*
* optional .operations_research.MPModelProto model = 1;
*/
public com.google.ortools.linearsolver.MPModelProto.Builder getModelBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getModelFieldBuilder().getBuilder();
}
/**
*
* The model to be optimized by the server.
*
*
* optional .operations_research.MPModelProto model = 1;
*/
public com.google.ortools.linearsolver.MPModelProtoOrBuilder getModelOrBuilder() {
if (modelBuilder_ != null) {
return modelBuilder_.getMessageOrBuilder();
} else {
return model_ == null ?
com.google.ortools.linearsolver.MPModelProto.getDefaultInstance() : model_;
}
}
/**
*
* The model to be optimized by the server.
*
*
* optional .operations_research.MPModelProto model = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.linearsolver.MPModelProto, com.google.ortools.linearsolver.MPModelProto.Builder, com.google.ortools.linearsolver.MPModelProtoOrBuilder>
getModelFieldBuilder() {
if (modelBuilder_ == null) {
modelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.linearsolver.MPModelProto, com.google.ortools.linearsolver.MPModelProto.Builder, com.google.ortools.linearsolver.MPModelProtoOrBuilder>(
getModel(),
getParentForChildren(),
isClean());
model_ = null;
}
return modelBuilder_;
}
private int solverType_ = 2;
/**
* optional .operations_research.MPModelRequest.SolverType solver_type = 2;
* @return Whether the solverType field is set.
*/
@java.lang.Override public boolean hasSolverType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional .operations_research.MPModelRequest.SolverType solver_type = 2;
* @return The solverType.
*/
@java.lang.Override
public com.google.ortools.linearsolver.MPModelRequest.SolverType getSolverType() {
@SuppressWarnings("deprecation")
com.google.ortools.linearsolver.MPModelRequest.SolverType result = com.google.ortools.linearsolver.MPModelRequest.SolverType.valueOf(solverType_);
return result == null ? com.google.ortools.linearsolver.MPModelRequest.SolverType.GLOP_LINEAR_PROGRAMMING : result;
}
/**
* optional .operations_research.MPModelRequest.SolverType solver_type = 2;
* @param value The solverType to set.
* @return This builder for chaining.
*/
public Builder setSolverType(com.google.ortools.linearsolver.MPModelRequest.SolverType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
solverType_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .operations_research.MPModelRequest.SolverType solver_type = 2;
* @return This builder for chaining.
*/
public Builder clearSolverType() {
bitField0_ = (bitField0_ & ~0x00000002);
solverType_ = 2;
onChanged();
return this;
}
private double solverTimeLimitSeconds_ ;
/**
*
* Maximum time to be spent by the solver to solve 'model'. If the server is
* busy and the RPC's deadline_left is less than this, it will immediately
* give up and return an error, without even trying to solve.
* The client can use this to have a guarantee on how much time the
* solver will spend on the problem (unless it finds and proves
* an optimal solution more quickly).
* If not specified, the time limit on the solver is the RPC's deadline_left.
*
*
* optional double solver_time_limit_seconds = 3;
* @return Whether the solverTimeLimitSeconds field is set.
*/
@java.lang.Override
public boolean hasSolverTimeLimitSeconds() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Maximum time to be spent by the solver to solve 'model'. If the server is
* busy and the RPC's deadline_left is less than this, it will immediately
* give up and return an error, without even trying to solve.
* The client can use this to have a guarantee on how much time the
* solver will spend on the problem (unless it finds and proves
* an optimal solution more quickly).
* If not specified, the time limit on the solver is the RPC's deadline_left.
*
*
* optional double solver_time_limit_seconds = 3;
* @return The solverTimeLimitSeconds.
*/
@java.lang.Override
public double getSolverTimeLimitSeconds() {
return solverTimeLimitSeconds_;
}
/**
*
* Maximum time to be spent by the solver to solve 'model'. If the server is
* busy and the RPC's deadline_left is less than this, it will immediately
* give up and return an error, without even trying to solve.
* The client can use this to have a guarantee on how much time the
* solver will spend on the problem (unless it finds and proves
* an optimal solution more quickly).
* If not specified, the time limit on the solver is the RPC's deadline_left.
*
*
* optional double solver_time_limit_seconds = 3;
* @param value The solverTimeLimitSeconds to set.
* @return This builder for chaining.
*/
public Builder setSolverTimeLimitSeconds(double value) {
bitField0_ |= 0x00000004;
solverTimeLimitSeconds_ = value;
onChanged();
return this;
}
/**
*
* Maximum time to be spent by the solver to solve 'model'. If the server is
* busy and the RPC's deadline_left is less than this, it will immediately
* give up and return an error, without even trying to solve.
* The client can use this to have a guarantee on how much time the
* solver will spend on the problem (unless it finds and proves
* an optimal solution more quickly).
* If not specified, the time limit on the solver is the RPC's deadline_left.
*
*
* optional double solver_time_limit_seconds = 3;
* @return This builder for chaining.
*/
public Builder clearSolverTimeLimitSeconds() {
bitField0_ = (bitField0_ & ~0x00000004);
solverTimeLimitSeconds_ = 0D;
onChanged();
return this;
}
private boolean enableInternalSolverOutput_ ;
/**
*
* If this is set, then EnableOutput() will be set on the internal MPSolver
* that solves the model.
* WARNING: if you set this on a request to prod servers, it will be rejected
* and yield the RPC Application Error code MPSOLVER_SOLVER_TYPE_UNAVAILABLE.
*
*
* optional bool enable_internal_solver_output = 4 [default = false];
* @return Whether the enableInternalSolverOutput field is set.
*/
@java.lang.Override
public boolean hasEnableInternalSolverOutput() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* If this is set, then EnableOutput() will be set on the internal MPSolver
* that solves the model.
* WARNING: if you set this on a request to prod servers, it will be rejected
* and yield the RPC Application Error code MPSOLVER_SOLVER_TYPE_UNAVAILABLE.
*
*
* optional bool enable_internal_solver_output = 4 [default = false];
* @return The enableInternalSolverOutput.
*/
@java.lang.Override
public boolean getEnableInternalSolverOutput() {
return enableInternalSolverOutput_;
}
/**
*
* If this is set, then EnableOutput() will be set on the internal MPSolver
* that solves the model.
* WARNING: if you set this on a request to prod servers, it will be rejected
* and yield the RPC Application Error code MPSOLVER_SOLVER_TYPE_UNAVAILABLE.
*
*
* optional bool enable_internal_solver_output = 4 [default = false];
* @param value The enableInternalSolverOutput to set.
* @return This builder for chaining.
*/
public Builder setEnableInternalSolverOutput(boolean value) {
bitField0_ |= 0x00000008;
enableInternalSolverOutput_ = value;
onChanged();
return this;
}
/**
*
* If this is set, then EnableOutput() will be set on the internal MPSolver
* that solves the model.
* WARNING: if you set this on a request to prod servers, it will be rejected
* and yield the RPC Application Error code MPSOLVER_SOLVER_TYPE_UNAVAILABLE.
*
*
* optional bool enable_internal_solver_output = 4 [default = false];
* @return This builder for chaining.
*/
public Builder clearEnableInternalSolverOutput() {
bitField0_ = (bitField0_ & ~0x00000008);
enableInternalSolverOutput_ = false;
onChanged();
return this;
}
private java.lang.Object solverSpecificParameters_ = "";
/**
*
* Advanced usage. Solver-specific parameters in the solver's own format,
* different for each solver. For example, if you use SCIP and you want to
* stop the solve earlier than the time limit if it reached a solution that is
* at most 1% away from the optimal, you can set this to "limits/gap=0.01".
* Note however that there is no "security" mechanism in place so it is up to
* the client to make sure that the given options don't make the solve
* non thread safe or use up too much memory for instance.
* If the option format is not understood by the solver, the request will be
* rejected and yield an RPC Application error with code
* MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS.
*
*
* optional string solver_specific_parameters = 5;
* @return Whether the solverSpecificParameters field is set.
*/
public boolean hasSolverSpecificParameters() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Advanced usage. Solver-specific parameters in the solver's own format,
* different for each solver. For example, if you use SCIP and you want to
* stop the solve earlier than the time limit if it reached a solution that is
* at most 1% away from the optimal, you can set this to "limits/gap=0.01".
* Note however that there is no "security" mechanism in place so it is up to
* the client to make sure that the given options don't make the solve
* non thread safe or use up too much memory for instance.
* If the option format is not understood by the solver, the request will be
* rejected and yield an RPC Application error with code
* MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS.
*
*
* optional string solver_specific_parameters = 5;
* @return The solverSpecificParameters.
*/
public java.lang.String getSolverSpecificParameters() {
java.lang.Object ref = solverSpecificParameters_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
solverSpecificParameters_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Advanced usage. Solver-specific parameters in the solver's own format,
* different for each solver. For example, if you use SCIP and you want to
* stop the solve earlier than the time limit if it reached a solution that is
* at most 1% away from the optimal, you can set this to "limits/gap=0.01".
* Note however that there is no "security" mechanism in place so it is up to
* the client to make sure that the given options don't make the solve
* non thread safe or use up too much memory for instance.
* If the option format is not understood by the solver, the request will be
* rejected and yield an RPC Application error with code
* MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS.
*
*
* optional string solver_specific_parameters = 5;
* @return The bytes for solverSpecificParameters.
*/
public com.google.protobuf.ByteString
getSolverSpecificParametersBytes() {
java.lang.Object ref = solverSpecificParameters_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
solverSpecificParameters_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Advanced usage. Solver-specific parameters in the solver's own format,
* different for each solver. For example, if you use SCIP and you want to
* stop the solve earlier than the time limit if it reached a solution that is
* at most 1% away from the optimal, you can set this to "limits/gap=0.01".
* Note however that there is no "security" mechanism in place so it is up to
* the client to make sure that the given options don't make the solve
* non thread safe or use up too much memory for instance.
* If the option format is not understood by the solver, the request will be
* rejected and yield an RPC Application error with code
* MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS.
*
*
* optional string solver_specific_parameters = 5;
* @param value The solverSpecificParameters to set.
* @return This builder for chaining.
*/
public Builder setSolverSpecificParameters(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
solverSpecificParameters_ = value;
onChanged();
return this;
}
/**
*
* Advanced usage. Solver-specific parameters in the solver's own format,
* different for each solver. For example, if you use SCIP and you want to
* stop the solve earlier than the time limit if it reached a solution that is
* at most 1% away from the optimal, you can set this to "limits/gap=0.01".
* Note however that there is no "security" mechanism in place so it is up to
* the client to make sure that the given options don't make the solve
* non thread safe or use up too much memory for instance.
* If the option format is not understood by the solver, the request will be
* rejected and yield an RPC Application error with code
* MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS.
*
*
* optional string solver_specific_parameters = 5;
* @return This builder for chaining.
*/
public Builder clearSolverSpecificParameters() {
bitField0_ = (bitField0_ & ~0x00000010);
solverSpecificParameters_ = getDefaultInstance().getSolverSpecificParameters();
onChanged();
return this;
}
/**
*
* Advanced usage. Solver-specific parameters in the solver's own format,
* different for each solver. For example, if you use SCIP and you want to
* stop the solve earlier than the time limit if it reached a solution that is
* at most 1% away from the optimal, you can set this to "limits/gap=0.01".
* Note however that there is no "security" mechanism in place so it is up to
* the client to make sure that the given options don't make the solve
* non thread safe or use up too much memory for instance.
* If the option format is not understood by the solver, the request will be
* rejected and yield an RPC Application error with code
* MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS.
*
*
* optional string solver_specific_parameters = 5;
* @param value The bytes for solverSpecificParameters to set.
* @return This builder for chaining.
*/
public Builder setSolverSpecificParametersBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
solverSpecificParameters_ = value;
onChanged();
return this;
}
private com.google.ortools.linearsolver.MPModelDeltaProto modelDelta_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.linearsolver.MPModelDeltaProto, com.google.ortools.linearsolver.MPModelDeltaProto.Builder, com.google.ortools.linearsolver.MPModelDeltaProtoOrBuilder> modelDeltaBuilder_;
/**
*
* Advanced usage: model "delta". If used, "model" must be unset. See the
* definition of MPModelDeltaProto.
*
*
* optional .operations_research.MPModelDeltaProto model_delta = 8;
* @return Whether the modelDelta field is set.
*/
public boolean hasModelDelta() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Advanced usage: model "delta". If used, "model" must be unset. See the
* definition of MPModelDeltaProto.
*
*
* optional .operations_research.MPModelDeltaProto model_delta = 8;
* @return The modelDelta.
*/
public com.google.ortools.linearsolver.MPModelDeltaProto getModelDelta() {
if (modelDeltaBuilder_ == null) {
return modelDelta_ == null ? com.google.ortools.linearsolver.MPModelDeltaProto.getDefaultInstance() : modelDelta_;
} else {
return modelDeltaBuilder_.getMessage();
}
}
/**
*
* Advanced usage: model "delta". If used, "model" must be unset. See the
* definition of MPModelDeltaProto.
*
*
* optional .operations_research.MPModelDeltaProto model_delta = 8;
*/
public Builder setModelDelta(com.google.ortools.linearsolver.MPModelDeltaProto value) {
if (modelDeltaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
modelDelta_ = value;
onChanged();
} else {
modelDeltaBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
*
* Advanced usage: model "delta". If used, "model" must be unset. See the
* definition of MPModelDeltaProto.
*
*
* optional .operations_research.MPModelDeltaProto model_delta = 8;
*/
public Builder setModelDelta(
com.google.ortools.linearsolver.MPModelDeltaProto.Builder builderForValue) {
if (modelDeltaBuilder_ == null) {
modelDelta_ = builderForValue.build();
onChanged();
} else {
modelDeltaBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
return this;
}
/**
*
* Advanced usage: model "delta". If used, "model" must be unset. See the
* definition of MPModelDeltaProto.
*
*
* optional .operations_research.MPModelDeltaProto model_delta = 8;
*/
public Builder mergeModelDelta(com.google.ortools.linearsolver.MPModelDeltaProto value) {
if (modelDeltaBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
modelDelta_ != null &&
modelDelta_ != com.google.ortools.linearsolver.MPModelDeltaProto.getDefaultInstance()) {
modelDelta_ =
com.google.ortools.linearsolver.MPModelDeltaProto.newBuilder(modelDelta_).mergeFrom(value).buildPartial();
} else {
modelDelta_ = value;
}
onChanged();
} else {
modelDeltaBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
*
* Advanced usage: model "delta". If used, "model" must be unset. See the
* definition of MPModelDeltaProto.
*
*
* optional .operations_research.MPModelDeltaProto model_delta = 8;
*/
public Builder clearModelDelta() {
if (modelDeltaBuilder_ == null) {
modelDelta_ = null;
onChanged();
} else {
modelDeltaBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
/**
*
* Advanced usage: model "delta". If used, "model" must be unset. See the
* definition of MPModelDeltaProto.
*
*
* optional .operations_research.MPModelDeltaProto model_delta = 8;
*/
public com.google.ortools.linearsolver.MPModelDeltaProto.Builder getModelDeltaBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getModelDeltaFieldBuilder().getBuilder();
}
/**
*
* Advanced usage: model "delta". If used, "model" must be unset. See the
* definition of MPModelDeltaProto.
*
*
* optional .operations_research.MPModelDeltaProto model_delta = 8;
*/
public com.google.ortools.linearsolver.MPModelDeltaProtoOrBuilder getModelDeltaOrBuilder() {
if (modelDeltaBuilder_ != null) {
return modelDeltaBuilder_.getMessageOrBuilder();
} else {
return modelDelta_ == null ?
com.google.ortools.linearsolver.MPModelDeltaProto.getDefaultInstance() : modelDelta_;
}
}
/**
*
* Advanced usage: model "delta". If used, "model" must be unset. See the
* definition of MPModelDeltaProto.
*
*
* optional .operations_research.MPModelDeltaProto model_delta = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.linearsolver.MPModelDeltaProto, com.google.ortools.linearsolver.MPModelDeltaProto.Builder, com.google.ortools.linearsolver.MPModelDeltaProtoOrBuilder>
getModelDeltaFieldBuilder() {
if (modelDeltaBuilder_ == null) {
modelDeltaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.linearsolver.MPModelDeltaProto, com.google.ortools.linearsolver.MPModelDeltaProto.Builder, com.google.ortools.linearsolver.MPModelDeltaProtoOrBuilder>(
getModelDelta(),
getParentForChildren(),
isClean());
modelDelta_ = null;
}
return modelDeltaBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:operations_research.MPModelRequest)
}
// @@protoc_insertion_point(class_scope:operations_research.MPModelRequest)
private static final com.google.ortools.linearsolver.MPModelRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPModelRequest();
}
public static com.google.ortools.linearsolver.MPModelRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MPModelRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MPModelRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.ortools.linearsolver.MPModelRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy