Skip to content

Commit 14c5731

Browse files
committed
fix
1 parent 4852f71 commit 14c5731

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

ortools/linear_solver/proto_solver/xpress_proto_solver.cc

+3-6
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,9 @@ namespace operations_research {
271271

272272
// if (error_messages.empty()) return "";
273273
// return absl::StrJoin(error_messages, "\n");
274-
}
274+
// }
275275

276-
MPSolutionResponse XPressSolveProto(const MPModelRequest& request,
277-
XPRSprob xpress_env) {
276+
MPSolutionResponse XPressSolveProto(const MPModelRequest& request) {
278277
MPSolutionResponse response;
279278
response.set_status(MPSolverResponseStatus::MPSOLVER_SOLVER_TYPE_UNAVAILABLE);
280279

@@ -355,9 +354,7 @@ MPSolutionResponse XPressSolveProto(const MPModelRequest& request,
355354
// lb[v] = variable.lower_bound();
356355
// ub[v] = variable.upper_bound();
357356
// ctype[v] = variable.is_integer() &&
358-
// request.solver_type() ==
359-
// MPModelRequest::XPRESS_MIXED_INTEGER_PROGRAMMING
360-
// ? XPRS_INTEGER
357+
// request.solver_type() ==SolutionRes
361358
// : XPRS_CONTINUOUS;
362359
// if (variable.is_integer()) has_integer_variables = true;
363360
// if (!variable.name().empty()) varnames[v] = variable.name().c_str();

ortools/linear_solver/proto_solver/xpress_proto_solver.h

+2-5
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,13 @@
1616

1717
#include <string>
1818

19-
#include "absl/status/status.h"
20-
#include "absl/status/statusor.h"
21-
#include "absl/strings/string_view.h"
22-
#include "ortools/xpress/environment.h"
2319
#include "ortools/linear_solver/linear_solver.pb.h"
2420

2521
namespace operations_research {
2622

2723
// Solves the input request.
28-
MPSolutionResponse XpressSolveProto(const MPModelRequest& request);
24+
MPSolutionResponse XPressSolveProto(const MPModelRequest& request);
2925

3026
} // namespace operations_research
27+
3128
#endif // OR_TOOLS_LINEAR_SOLVER_PROTO_SOLVER_XPRESS_PROTO_SOLVER_H_

ortools/linear_solver/wrappers/model_builder_helper.cc

+2-4
Original file line numberDiff line numberDiff line change
@@ -606,10 +606,8 @@ void ModelSolverHelper::Solve(const ModelBuilderHelper& model) {
606606
case MPModelRequest::
607607
XPRESS_LINEAR_PROGRAMMING: // ABSL_FALLTHROUGH_INTENDED
608608
case MPModelRequest::XPRESS_MIXED_INTEGER_PROGRAMMING: {
609-
const auto temp = XpressSolveProto(request);
610-
if (temp.ok()) {
611-
response_ = std::move(temp.value());
612-
}
609+
response_ = XPressSolveProto(request);
610+
break;
613611
}
614612

615613
default: {

0 commit comments

Comments
 (0)