fix
This commit is contained in:
28
ortools/linear_solver/sat_proto_solver.h
Normal file
28
ortools/linear_solver/sat_proto_solver.h
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright 2010-2018 Google LLC
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef OR_TOOLS_LINEAR_SOLVER_SAT_PROTO_SOLVER_H_
|
||||
#define OR_TOOLS_LINEAR_SOLVER_SAT_PROTO_SOLVER_H_
|
||||
|
||||
#include "ortools/base/statusor.h"
|
||||
#include "ortools/linear_solver/linear_solver.pb.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
// If possible, std::move the request into this function call to avoid a copy.
|
||||
util::StatusOr<MPSolutionResponse> SatSolveProto(
|
||||
MPModelRequest request, std::atomic<bool>* interrupt_solve = nullptr);
|
||||
|
||||
} // namespace operations_research
|
||||
|
||||
#endif // OR_TOOLS_LINEAR_SOLVER_SAT_PROTO_SOLVER_H_
|
||||
@@ -40,8 +40,8 @@ struct ImpliedBoundEntry {
|
||||
// An integer variable in [0, 1]. When at 1, then the IntegerVariable
|
||||
// corresponding to this entry must be greater or equal to the given lower
|
||||
// bound.
|
||||
IntegerVariable literal_view;
|
||||
IntegerValue lower_bound;
|
||||
IntegerVariable literal_view = kNoIntegerVariable;
|
||||
IntegerValue lower_bound = IntegerValue(0);
|
||||
|
||||
// If false, it is when the literal_view is zero that the lower bound is
|
||||
// valid.
|
||||
@@ -52,7 +52,7 @@ struct ImpliedBoundEntry {
|
||||
: literal_view(lit), lower_bound(lb), is_positive(pos) {}
|
||||
|
||||
ImpliedBoundEntry()
|
||||
: literal_view(kNoIntegerVariable), lower_bound(0), is_positive(false) {}
|
||||
: literal_view(kNoIntegerVariable), lower_bound(0), is_positive(true) {}
|
||||
};
|
||||
|
||||
// Maintains all the implications of the form Literal => IntegerLiteral. We
|
||||
|
||||
Reference in New Issue
Block a user