Class MPModelRequest.Builder

  • All Implemented Interfaces:
    MPModelRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    MPModelRequest

    public static final class MPModelRequest.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>
    implements MPModelRequestOrBuilder
     Next id: 18.
     
    Protobuf type operations_research.MPModelRequest
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>
      • clear

        public MPModelRequest.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>
      • getDefaultInstanceForType

        public MPModelRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public MPModelRequest build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public MPModelRequest buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public MPModelRequest.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>
      • setField

        public MPModelRequest.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>
      • clearField

        public MPModelRequest.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>
      • clearOneof

        public MPModelRequest.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>
      • setRepeatedField

        public MPModelRequest.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       int index,
                                                       java.lang.Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>
      • addRepeatedField

        public MPModelRequest.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>
      • mergeFrom

        public MPModelRequest.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MPModelRequest.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>
      • mergeFrom

        public MPModelRequest.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MPModelRequest.Builder>
        Throws:
        java.io.IOException
      • hasModel

        public boolean hasModel()
         The model to be optimized by the server.
         
        optional .operations_research.MPModelProto model = 1;
        Specified by:
        hasModel in interface MPModelRequestOrBuilder
        Returns:
        Whether the model field is set.
      • getModel

        public MPModelProto getModel()
         The model to be optimized by the server.
         
        optional .operations_research.MPModelProto model = 1;
        Specified by:
        getModel in interface MPModelRequestOrBuilder
        Returns:
        The model.
      • setModel

        public MPModelRequest.Builder setModel​(MPModelProto value)
         The model to be optimized by the server.
         
        optional .operations_research.MPModelProto model = 1;
      • mergeModel

        public MPModelRequest.Builder mergeModel​(MPModelProto value)
         The model to be optimized by the server.
         
        optional .operations_research.MPModelProto model = 1;
      • clearModel

        public MPModelRequest.Builder clearModel()
         The model to be optimized by the server.
         
        optional .operations_research.MPModelProto model = 1;
      • getModelBuilder

        public MPModelProto.Builder getModelBuilder()
         The model to be optimized by the server.
         
        optional .operations_research.MPModelProto model = 1;
      • hasSolverType

        public boolean hasSolverType()
        optional .operations_research.MPModelRequest.SolverType solver_type = 2 [default = GLOP_LINEAR_PROGRAMMING];
        Specified by:
        hasSolverType in interface MPModelRequestOrBuilder
        Returns:
        Whether the solverType field is set.
      • setSolverType

        public MPModelRequest.Builder setSolverType​(MPModelRequest.SolverType value)
        optional .operations_research.MPModelRequest.SolverType solver_type = 2 [default = GLOP_LINEAR_PROGRAMMING];
        Parameters:
        value - The solverType to set.
        Returns:
        This builder for chaining.
      • clearSolverType

        public MPModelRequest.Builder clearSolverType()
        optional .operations_research.MPModelRequest.SolverType solver_type = 2 [default = GLOP_LINEAR_PROGRAMMING];
        Returns:
        This builder for chaining.
      • hasSolverTimeLimitSeconds

        public boolean hasSolverTimeLimitSeconds()
         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;
        Specified by:
        hasSolverTimeLimitSeconds in interface MPModelRequestOrBuilder
        Returns:
        Whether the solverTimeLimitSeconds field is set.
      • getSolverTimeLimitSeconds

        public double getSolverTimeLimitSeconds()
         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;
        Specified by:
        getSolverTimeLimitSeconds in interface MPModelRequestOrBuilder
        Returns:
        The solverTimeLimitSeconds.
      • setSolverTimeLimitSeconds

        public MPModelRequest.Builder setSolverTimeLimitSeconds​(double value)
         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;
        Parameters:
        value - The solverTimeLimitSeconds to set.
        Returns:
        This builder for chaining.
      • clearSolverTimeLimitSeconds

        public MPModelRequest.Builder clearSolverTimeLimitSeconds()
         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;
        Returns:
        This builder for chaining.
      • hasEnableInternalSolverOutput

        public boolean hasEnableInternalSolverOutput()
         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];
        Specified by:
        hasEnableInternalSolverOutput in interface MPModelRequestOrBuilder
        Returns:
        Whether the enableInternalSolverOutput field is set.
      • getEnableInternalSolverOutput

        public boolean getEnableInternalSolverOutput()
         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];
        Specified by:
        getEnableInternalSolverOutput in interface MPModelRequestOrBuilder
        Returns:
        The enableInternalSolverOutput.
      • setEnableInternalSolverOutput

        public MPModelRequest.Builder setEnableInternalSolverOutput​(boolean value)
         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];
        Parameters:
        value - The enableInternalSolverOutput to set.
        Returns:
        This builder for chaining.
      • clearEnableInternalSolverOutput

        public MPModelRequest.Builder clearEnableInternalSolverOutput()
         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];
        Returns:
        This builder for chaining.
      • hasSolverSpecificParameters

        public boolean hasSolverSpecificParameters()
         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, unless you have set
         ignore_solver_specific_parameters_failure=true (in which case they are
         simply ignored).
         
        optional string solver_specific_parameters = 5;
        Specified by:
        hasSolverSpecificParameters in interface MPModelRequestOrBuilder
        Returns:
        Whether the solverSpecificParameters field is set.
      • getSolverSpecificParameters

        public java.lang.String getSolverSpecificParameters()
         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, unless you have set
         ignore_solver_specific_parameters_failure=true (in which case they are
         simply ignored).
         
        optional string solver_specific_parameters = 5;
        Specified by:
        getSolverSpecificParameters in interface MPModelRequestOrBuilder
        Returns:
        The solverSpecificParameters.
      • getSolverSpecificParametersBytes

        public com.google.protobuf.ByteString getSolverSpecificParametersBytes()
         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, unless you have set
         ignore_solver_specific_parameters_failure=true (in which case they are
         simply ignored).
         
        optional string solver_specific_parameters = 5;
        Specified by:
        getSolverSpecificParametersBytes in interface MPModelRequestOrBuilder
        Returns:
        The bytes for solverSpecificParameters.
      • setSolverSpecificParameters

        public MPModelRequest.Builder setSolverSpecificParameters​(java.lang.String value)
         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, unless you have set
         ignore_solver_specific_parameters_failure=true (in which case they are
         simply ignored).
         
        optional string solver_specific_parameters = 5;
        Parameters:
        value - The solverSpecificParameters to set.
        Returns:
        This builder for chaining.
      • clearSolverSpecificParameters

        public MPModelRequest.Builder clearSolverSpecificParameters()
         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, unless you have set
         ignore_solver_specific_parameters_failure=true (in which case they are
         simply ignored).
         
        optional string solver_specific_parameters = 5;
        Returns:
        This builder for chaining.
      • setSolverSpecificParametersBytes

        public MPModelRequest.Builder setSolverSpecificParametersBytes​(com.google.protobuf.ByteString value)
         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, unless you have set
         ignore_solver_specific_parameters_failure=true (in which case they are
         simply ignored).
         
        optional string solver_specific_parameters = 5;
        Parameters:
        value - The bytes for solverSpecificParameters to set.
        Returns:
        This builder for chaining.
      • hasIgnoreSolverSpecificParametersFailure

        public boolean hasIgnoreSolverSpecificParametersFailure()
        optional bool ignore_solver_specific_parameters_failure = 9 [default = false];
        Specified by:
        hasIgnoreSolverSpecificParametersFailure in interface MPModelRequestOrBuilder
        Returns:
        Whether the ignoreSolverSpecificParametersFailure field is set.
      • getIgnoreSolverSpecificParametersFailure

        public boolean getIgnoreSolverSpecificParametersFailure()
        optional bool ignore_solver_specific_parameters_failure = 9 [default = false];
        Specified by:
        getIgnoreSolverSpecificParametersFailure in interface MPModelRequestOrBuilder
        Returns:
        The ignoreSolverSpecificParametersFailure.
      • setIgnoreSolverSpecificParametersFailure

        public MPModelRequest.Builder setIgnoreSolverSpecificParametersFailure​(boolean value)
        optional bool ignore_solver_specific_parameters_failure = 9 [default = false];
        Parameters:
        value - The ignoreSolverSpecificParametersFailure to set.
        Returns:
        This builder for chaining.
      • clearIgnoreSolverSpecificParametersFailure

        public MPModelRequest.Builder clearIgnoreSolverSpecificParametersFailure()
        optional bool ignore_solver_specific_parameters_failure = 9 [default = false];
        Returns:
        This builder for chaining.
      • hasModelDelta

        public boolean hasModelDelta()
         Advanced usage: model "delta". If used, "model" must be unset. See the
         definition of MPModelDeltaProto.
         
        optional .operations_research.MPModelDeltaProto model_delta = 8;
        Specified by:
        hasModelDelta in interface MPModelRequestOrBuilder
        Returns:
        Whether the modelDelta field is set.
      • getModelDelta

        public MPModelDeltaProto getModelDelta()
         Advanced usage: model "delta". If used, "model" must be unset. See the
         definition of MPModelDeltaProto.
         
        optional .operations_research.MPModelDeltaProto model_delta = 8;
        Specified by:
        getModelDelta in interface MPModelRequestOrBuilder
        Returns:
        The modelDelta.
      • setModelDelta

        public MPModelRequest.Builder setModelDelta​(MPModelDeltaProto value)
         Advanced usage: model "delta". If used, "model" must be unset. See the
         definition of MPModelDeltaProto.
         
        optional .operations_research.MPModelDeltaProto model_delta = 8;
      • setModelDelta

        public MPModelRequest.Builder setModelDelta​(MPModelDeltaProto.Builder builderForValue)
         Advanced usage: model "delta". If used, "model" must be unset. See the
         definition of MPModelDeltaProto.
         
        optional .operations_research.MPModelDeltaProto model_delta = 8;
      • mergeModelDelta

        public MPModelRequest.Builder mergeModelDelta​(MPModelDeltaProto value)
         Advanced usage: model "delta". If used, "model" must be unset. See the
         definition of MPModelDeltaProto.
         
        optional .operations_research.MPModelDeltaProto model_delta = 8;
      • clearModelDelta

        public MPModelRequest.Builder clearModelDelta()
         Advanced usage: model "delta". If used, "model" must be unset. See the
         definition of MPModelDeltaProto.
         
        optional .operations_research.MPModelDeltaProto model_delta = 8;
      • getModelDeltaBuilder

        public MPModelDeltaProto.Builder getModelDeltaBuilder()
         Advanced usage: model "delta". If used, "model" must be unset. See the
         definition of MPModelDeltaProto.
         
        optional .operations_research.MPModelDeltaProto model_delta = 8;
      • hasPopulateAdditionalSolutionsUpTo

        public boolean hasPopulateAdditionalSolutionsUpTo()
         Controls the recovery of additional solutions, if any, saved by the
         underlying solver back in the MPSolutionResponse.additional_solutions.
         The repeated field will be length
            min(populate_addition_solutions_up_to,
                #additional_solutions_available_in_underlying_solver)
         These additional solutions may have a worse objective than the main
         solution returned in the response.
         
        optional int32 populate_additional_solutions_up_to = 11 [default = 0];
        Specified by:
        hasPopulateAdditionalSolutionsUpTo in interface MPModelRequestOrBuilder
        Returns:
        Whether the populateAdditionalSolutionsUpTo field is set.
      • getPopulateAdditionalSolutionsUpTo

        public int getPopulateAdditionalSolutionsUpTo()
         Controls the recovery of additional solutions, if any, saved by the
         underlying solver back in the MPSolutionResponse.additional_solutions.
         The repeated field will be length
            min(populate_addition_solutions_up_to,
                #additional_solutions_available_in_underlying_solver)
         These additional solutions may have a worse objective than the main
         solution returned in the response.
         
        optional int32 populate_additional_solutions_up_to = 11 [default = 0];
        Specified by:
        getPopulateAdditionalSolutionsUpTo in interface MPModelRequestOrBuilder
        Returns:
        The populateAdditionalSolutionsUpTo.
      • setPopulateAdditionalSolutionsUpTo

        public MPModelRequest.Builder setPopulateAdditionalSolutionsUpTo​(int value)
         Controls the recovery of additional solutions, if any, saved by the
         underlying solver back in the MPSolutionResponse.additional_solutions.
         The repeated field will be length
            min(populate_addition_solutions_up_to,
                #additional_solutions_available_in_underlying_solver)
         These additional solutions may have a worse objective than the main
         solution returned in the response.
         
        optional int32 populate_additional_solutions_up_to = 11 [default = 0];
        Parameters:
        value - The populateAdditionalSolutionsUpTo to set.
        Returns:
        This builder for chaining.
      • clearPopulateAdditionalSolutionsUpTo

        public MPModelRequest.Builder clearPopulateAdditionalSolutionsUpTo()
         Controls the recovery of additional solutions, if any, saved by the
         underlying solver back in the MPSolutionResponse.additional_solutions.
         The repeated field will be length
            min(populate_addition_solutions_up_to,
                #additional_solutions_available_in_underlying_solver)
         These additional solutions may have a worse objective than the main
         solution returned in the response.
         
        optional int32 populate_additional_solutions_up_to = 11 [default = 0];
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final MPModelRequest.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>
      • mergeUnknownFields

        public final MPModelRequest.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MPModelRequest.Builder>