Uses of Class
com.google.ortools.linearsolver.MPSolutionResponse
Packages that use MPSolutionResponse
-
Uses of MPSolutionResponse in com.google.ortools.linearsolver
Methods in com.google.ortools.linearsolver that return MPSolutionResponseModifier and TypeMethodDescriptionMPSolutionResponse.Builder.build()
MPSolutionResponse.Builder.buildPartial()
MPSolver.createSolutionResponseProto()
Fills the solution found to a response proto and returns it.static MPSolutionResponse
MPSolutionResponse.getDefaultInstance()
MPSolutionResponse.Builder.getDefaultInstanceForType()
MPSolutionResponse.getDefaultInstanceForType()
static MPSolutionResponse
MPSolutionResponse.parseDelimitedFrom
(InputStream input) static MPSolutionResponse
MPSolutionResponse.parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MPSolutionResponse
MPSolutionResponse.parseFrom
(byte[] data) static MPSolutionResponse
MPSolutionResponse.parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MPSolutionResponse
MPSolutionResponse.parseFrom
(com.google.protobuf.ByteString data) static MPSolutionResponse
MPSolutionResponse.parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MPSolutionResponse
MPSolutionResponse.parseFrom
(com.google.protobuf.CodedInputStream input) static MPSolutionResponse
MPSolutionResponse.parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MPSolutionResponse
MPSolutionResponse.parseFrom
(InputStream input) static MPSolutionResponse
MPSolutionResponse.parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MPSolutionResponse
MPSolutionResponse.parseFrom
(ByteBuffer data) static MPSolutionResponse
MPSolutionResponse.parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MPSolutionResponse
MPSolver.solveWithProto
(MPModelRequest model_request) Solves the given model proto and returns a response proto.Methods in com.google.ortools.linearsolver that return types with arguments of type MPSolutionResponseModifier and TypeMethodDescriptioncom.google.protobuf.Parser
<MPSolutionResponse> MPSolutionResponse.getParserForType()
static com.google.protobuf.Parser
<MPSolutionResponse> MPSolutionResponse.parser()
Methods in com.google.ortools.linearsolver with parameters of type MPSolutionResponseModifier and TypeMethodDescriptionboolean
MPSolver.loadSolutionFromProto
(MPSolutionResponse response) Load a solution encoded in a protocol buffer onto this solver for easy
access via the MPSolver interface.
IMPORTANT: This may only be used in conjunction with ExportModel(),
following this example:
MPSolver my_solver; ... add variables and constraints ... MPModelProto model_proto; my_solver.ExportModelToProto(&model_proto); MPSolutionResponse solver_response; MPSolver::SolveWithProto(model_proto, &solver_response); if (solver_response.result_status() == MPSolutionResponse::OPTIMAL) { CHECK_OK(my_solver.LoadSolutionFromProto(solver_response)); ... inspect the solution using the usual API: solution_value(), etc... }
The response must be in OPTIMAL or FEASIBLE status.
Returns a false if a problem arised (typically, if it wasn't used
like it should be):
- loading a solution whose variables don't correspond to the solver's
current variables
- loading a solution with a status other than OPTIMAL / FEASIBLE.
Note: the objective value isn't checked.MPSolutionResponse.Builder.mergeFrom
(MPSolutionResponse other) static MPSolutionResponse.Builder
MPSolutionResponse.newBuilder
(MPSolutionResponse prototype)