Uses of Class
com.google.ortools.linearsolver.MPSolutionResponse
-
Packages that use MPSolutionResponse Package Description com.google.ortools.linearsolver -
-
Uses of MPSolutionResponse in com.google.ortools.linearsolver
Fields in com.google.ortools.linearsolver with type parameters of type MPSolutionResponse Modifier and Type Field Description static com.google.protobuf.Parser<MPSolutionResponse>MPSolutionResponse. PARSERDeprecated.Methods in com.google.ortools.linearsolver that return MPSolutionResponse Modifier and Type Method Description MPSolutionResponseMPSolutionResponse.Builder. build()MPSolutionResponseMPSolutionResponse.Builder. buildPartial()MPSolutionResponseMPSolver. createSolutionResponseProto()Fills the solution found to a response proto and returns it.static MPSolutionResponseMPSolutionResponse. getDefaultInstance()MPSolutionResponseMPSolutionResponse.Builder. getDefaultInstanceForType()MPSolutionResponseMPSolutionResponse. getDefaultInstanceForType()static MPSolutionResponseMPSolutionResponse. parseDelimitedFrom(java.io.InputStream input)static MPSolutionResponseMPSolutionResponse. parseDelimitedFrom(java.io.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(java.io.InputStream input)static MPSolutionResponseMPSolutionResponse. parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MPSolutionResponseMPSolutionResponse. parseFrom(java.nio.ByteBuffer data)static MPSolutionResponseMPSolutionResponse. parseFrom(java.nio.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 MPSolutionResponse Modifier and Type Method Description com.google.protobuf.Parser<MPSolutionResponse>MPSolutionResponse. getParserForType()static com.google.protobuf.Parser<MPSolutionResponse>MPSolutionResponse. parser()Methods in com.google.ortools.linearsolver with parameters of type MPSolutionResponse Modifier and Type Method Description booleanMPSolver. 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.BuilderMPSolutionResponse.Builder. mergeFrom(MPSolutionResponse other)static MPSolutionResponse.BuilderMPSolutionResponse. newBuilder(MPSolutionResponse prototype)
-