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 MPSolutionResponseMPSolutionResponse.getDefaultInstance()MPSolutionResponse.Builder.getDefaultInstanceForType()MPSolutionResponse.getDefaultInstanceForType()static MPSolutionResponseMPSolutionResponse.parseDelimitedFrom(InputStream input) static MPSolutionResponseMPSolutionResponse.parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MPSolutionResponseMPSolutionResponse.parseFrom(byte[] data) static MPSolutionResponseMPSolutionResponse.parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MPSolutionResponseMPSolutionResponse.parseFrom(com.google.protobuf.ByteString data) static MPSolutionResponseMPSolutionResponse.parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MPSolutionResponseMPSolutionResponse.parseFrom(com.google.protobuf.CodedInputStream input) static MPSolutionResponseMPSolutionResponse.parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MPSolutionResponseMPSolutionResponse.parseFrom(InputStream input) static MPSolutionResponseMPSolutionResponse.parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MPSolutionResponseMPSolutionResponse.parseFrom(ByteBuffer data) static MPSolutionResponseMPSolutionResponse.parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MPSolutionResponseMPSolver.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 TypeMethodDescriptionbooleanMPSolver.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.BuilderMPSolutionResponse.newBuilder(MPSolutionResponse prototype)