2018-11-10 18:00:53 +01:00
|
|
|
// Copyright 2010-2018 Google LLC
|
2017-10-01 16:25:50 +02:00
|
|
|
// 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.
|
|
|
|
|
|
|
|
|
|
// This .i file exposes the sat cp_model API.
|
|
|
|
|
|
2018-12-11 17:03:03 +01:00
|
|
|
%include "stdint.i"
|
2018-12-10 13:35:41 +01:00
|
|
|
|
2017-10-01 16:25:50 +02:00
|
|
|
%include "ortools/base/base.i"
|
|
|
|
|
%include "ortools/util/python/proto.i"
|
|
|
|
|
|
2017-11-07 15:45:52 +01:00
|
|
|
// std::function utilities.
|
|
|
|
|
%include "ortools/util/python/functions.i"
|
|
|
|
|
|
2019-05-08 15:23:57 +02:00
|
|
|
// import the domain class.
|
2019-05-08 11:05:33 +02:00
|
|
|
%import "ortools/util/python/sorted_interval_list.i"
|
|
|
|
|
|
2017-10-01 16:25:50 +02:00
|
|
|
%{
|
|
|
|
|
#include "ortools/sat/cp_model.pb.h"
|
|
|
|
|
#include "ortools/sat/sat_parameters.pb.h"
|
|
|
|
|
#include "ortools/sat/swig_helper.h"
|
|
|
|
|
%}
|
|
|
|
|
|
2019-05-03 22:41:25 +02:00
|
|
|
%pythoncode {
|
|
|
|
|
import numbers
|
|
|
|
|
}
|
|
|
|
|
|
2019-06-14 10:57:39 +02:00
|
|
|
%module(directors="1", threads="1") operations_research_sat
|
2017-10-25 14:20:21 +02:00
|
|
|
|
2017-10-01 16:25:50 +02:00
|
|
|
PY_PROTO_TYPEMAP(ortools.sat.cp_model_pb2,
|
|
|
|
|
CpModelProto,
|
|
|
|
|
operations_research::sat::CpModelProto);
|
|
|
|
|
|
|
|
|
|
PY_PROTO_TYPEMAP(ortools.sat.cp_model_pb2,
|
|
|
|
|
CpSolverResponse,
|
|
|
|
|
operations_research::sat::CpSolverResponse);
|
|
|
|
|
|
|
|
|
|
PY_PROTO_TYPEMAP(ortools.sat.sat_parameters_pb2,
|
|
|
|
|
SatParameters,
|
|
|
|
|
operations_research::sat::SatParameters);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%ignoreall
|
|
|
|
|
|
|
|
|
|
%unignore operations_research;
|
|
|
|
|
%unignore operations_research::sat;
|
|
|
|
|
%unignore operations_research::sat::SatHelper;
|
|
|
|
|
%unignore operations_research::sat::SatHelper::Solve;
|
|
|
|
|
%unignore operations_research::sat::SatHelper::SolveWithParameters;
|
2018-08-30 16:27:58 +02:00
|
|
|
%unignore operations_research::sat::SatHelper::SolveWithParametersAndSolutionCallback;
|
2018-09-12 15:07:23 +02:00
|
|
|
%unignore operations_research::sat::SatHelper::ModelStats;
|
|
|
|
|
%unignore operations_research::sat::SatHelper::SolverResponseStats;
|
2018-11-21 08:43:50 -08:00
|
|
|
%unignore operations_research::sat::SatHelper::ValidateModel;
|
2020-01-24 12:20:08 -08:00
|
|
|
%unignore operations_research::sat::SatHelper::VariableDomain;
|
2018-08-30 16:27:58 +02:00
|
|
|
|
|
|
|
|
%feature("director") operations_research::sat::SolutionCallback;
|
|
|
|
|
%unignore operations_research::sat::SolutionCallback;
|
|
|
|
|
%unignore operations_research::sat::SolutionCallback::~SolutionCallback;
|
2018-09-20 11:30:19 +02:00
|
|
|
%unignore operations_research::sat::SolutionCallback::BestObjectiveBound;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::BestObjectiveBound;
|
2019-03-21 15:15:16 +01:00
|
|
|
%unignore operations_research::sat::SolutionCallback::HasResponse;
|
2019-03-22 11:10:14 +01:00
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::HasResponse;
|
2018-08-30 16:27:58 +02:00
|
|
|
%unignore operations_research::sat::SolutionCallback::NumBinaryPropagations;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::NumBinaryPropagations;
|
|
|
|
|
%unignore operations_research::sat::SolutionCallback::NumBooleans;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::NumBooleans;
|
|
|
|
|
%unignore operations_research::sat::SolutionCallback::NumBranches;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::NumBooleans;
|
|
|
|
|
%unignore operations_research::sat::SolutionCallback::NumConflicts;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::NumConflicts;
|
|
|
|
|
%unignore operations_research::sat::SolutionCallback::NumIntegerPropagations;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::NumIntegerPropagations;
|
|
|
|
|
%unignore operations_research::sat::SolutionCallback::ObjectiveValue;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::ObjectiveValue;
|
|
|
|
|
%unignore operations_research::sat::SolutionCallback::OnSolutionCallback;
|
2018-09-04 18:47:10 +02:00
|
|
|
%unignore operations_research::sat::SolutionCallback::Response;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::Response;
|
2018-08-30 16:27:58 +02:00
|
|
|
%unignore operations_research::sat::SolutionCallback::SolutionBooleanValue;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::SolutionBooleanValue;
|
|
|
|
|
%unignore operations_research::sat::SolutionCallback::SolutionIntegerValue;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::SolutionIntegerValue;
|
|
|
|
|
%unignore operations_research::sat::SolutionCallback::StopSearch;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::StopSearch;
|
|
|
|
|
%unignore operations_research::sat::SolutionCallback::UserTime;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::UserTime;
|
|
|
|
|
%unignore operations_research::sat::SolutionCallback::WallTime;
|
|
|
|
|
%feature("nodirector") operations_research::sat::SolutionCallback::WallTime;
|
2017-10-01 16:25:50 +02:00
|
|
|
|
|
|
|
|
%include "ortools/sat/swig_helper.h"
|
|
|
|
|
|
|
|
|
|
%unignoreall
|
2019-06-28 10:58:35 +02:00
|
|
|
|