Commit Graph

74 Commits

Author SHA1 Message Date
Laurent Perron
87b9d55b21 update license headers 2018-11-10 18:00:53 +01:00
Corentin Le Molgat
b2ed452218 Add missing SimpleLpProgram.csproj 2018-11-09 16:02:25 +01:00
Corentin Le Molgat
2e5e79cdc7 Add linear_solver/samples/SimpleLPProgram 2018-11-09 12:53:46 +01:00
Laurent Perron
b176edfbea fix jobshop python samples; add first linear solver lp sample; fix makefile 2018-11-08 11:20:51 +01:00
Abhishek Kedia
02a788a603 re-add the CheckedGurobiCall function 2018-10-08 19:05:05 +05:30
Laurent Perron
4e893e5080 remove solow-halim glop preprocessor as the interface has changed a lot; add a proper domain class for CP-SAT integer variables, rewrite preprocessor and other parts of the solver to use it 2018-10-02 10:35:52 +02:00
Laurent Perron
428e272ccc add ModelStats and CpSolverResponseStats for SAT/{Python|Java|C#}; enable multiple enforcement literals for a few constraints; small fixes, typo corrections 2018-09-12 15:07:23 +02:00
Laurent Perron
26fe10d00a wrap InterruptSolve in Java/CSharp #423 2018-09-07 11:45:24 +02:00
Corentin Le Molgat
62cbe9a228 dotnet: Full Rework
- Create native project runtime.{rid}.Google.OrTools
  - follow the microsoft convention e.g.:
  https://www.nuget.org/packages/Microsoft.NETCore.App/
  https://www.nuget.org/packages/runtime.linux-x64.Microsoft.NETCore.App/
- Target `make_dotnet` targets local nupkg instead of dll.
- Use 4096 RSA key for or-tools.snk
- Clean nuget cache in `clean_dotnet` recipe

Refactor:
- Move cs files to ortools/*/csharp
- Move dotnet project to ortools/dotnet/Google.OrTools
- Move example generation to temp_dotnet
  - Avoid to mess the `BIN_DIR`
- Rework Google.OrTools.FSharp

Cleanup:
- Remove deps to netfx.props since we only support:
  netstandard2.0 TFM and netcoreapp2.1 Runtime TFM
- Remove OrTools.nuspec.in
  -> use newly added properties to .csproj format
- Remove of ortools/dotnet/OrTools project
  - replaced by ortools/dotnet/Google.OrTools
- Remove provided protobuf.dll.
  - Automatically retrieved from nuget.org

Misc:
- Add **/*.csproj to gitignore
- Add **/runtime.json to gitignore

- dotnet: Makefile windows fix
  - make.exe doesn't support `else ifeq`
2018-08-30 11:58:47 +02:00
Laurent Perron
4caaef3c23 deep sync with base library renaming; lint checking; Speedup sat; new crash procedure for glop 2018-08-28 11:19:49 +02:00
Laurent Perron
3e013bb5be access to coefficients-variables pairs in linear_solver 2018-08-01 10:17:08 -07:00
Laurent Perron
24fe402a89 fix cplex support 2018-07-31 10:31:56 -07:00
Laurent Perron
49b1bd617c fix crash in presolve; minor reorg of the code 2018-07-27 14:03:55 -07:00
Laurent Perron
1def601392 allow MUST_USE_RESULT in headers read by swig 2018-07-25 10:48:05 -07:00
Laurent Perron
76963f4166 add optional template; use it in linear solver; add const in gurobi interface 2018-07-25 10:22:07 -07:00
Laurent Perron
3689de94bb fix swig 2018-07-24 14:37:03 -07:00
Laurent Perron
54f54d31a9 fix 2018-07-24 13:59:59 -07:00
Laurent Perron
7a1889bb1f make name -> var or constraint optional in linear solver 2018-07-24 13:23:58 -07:00
Laurent Perron
8a4fab54e1 missing include 2018-07-24 10:33:06 -07:00
Laurent Perron
a9dd4aec9a Remove CoeffMap typedef in linear_solver 2018-07-24 09:32:14 -07:00
Laurent Perron
8e7db4fbda use std::atomic<bool> in external boolean for time limit 2018-07-04 13:31:00 +02:00
yingzong
05ec0d78ab Merge branch 'master' into gurobi_error 2018-06-11 15:17:56 -04:00
Laurent Perron
70e73d8754 clang-format 2018-06-08 16:40:43 +02:00
Ying-zong Huang
b400cf8c2f Add exception handling to the solver creation call
This is a very targeted addition, which can be generalized. It
makes the following changes:

1. In the solver creation call of the Gurobi interface, i.e.
the constructor `GurobiInterface::GurobiInterface`, the GLOG
severity level is reduced to `DFATAL`, which becomes `ERROR` in
production. This means errors in calls to `GRBloadenv` no longer
automatically kill the process as a side effect.

2. An `std::runtime_error` exception is raised with the return code
and the error message from GRBloadenv. This replaces the functionality
of exiting the process when this error is unhandled. Additionally,
it enables alternate handling by the caller.

3. In the linear solver SWIG wrapper, exception wrapping is turned
on specifically for the `MPSolver::MPSolver` constructor call and
the `std::runtime_error` that may now occur there. This exception
is re-raised as the corresponding RuntimeError in the target language.

Addresses issue #699.
2018-05-24 21:40:38 -04:00
Laurent Perron
df333efbcd rewrite drat checker for sat; make fz presolve deterministic; more optims on sat internals 2018-05-03 15:00:06 +02:00
Corentin Le Molgat
e452a83dc4 Add missing enum to Python MPSolverParameters (Fix #97) 2018-04-27 18:10:59 +02:00
Corentin Le Molgat
19aae6c5bd Add missing enum to java MPSolverParameters (Fix #97) 2018-04-27 17:55:45 +02:00
Corentin Le Molgat
bd0fbd5fa6 Revert "Merge pull request #638 from yingzong/cbc_solver_params_2" (Fix #672)
This reverts commit 8ae61b6feb, reversing
changes made to 86cdb3584a.
2018-04-26 17:53:28 +02:00
Pooya Rezaei
b576adaa24 Update model_exporter.cc
writing "free" in front of unbounded variables.
2018-04-23 23:56:28 -05:00
Mizux
8ae61b6feb Merge pull request #638 from yingzong/cbc_solver_params_2
Add parameter passing to the CBC interface
2018-04-23 10:48:36 +02:00
Ying-zong Huang
4792fb9995 Fix string issues for multithreading 2018-04-21 04:38:25 -04:00
Laurent Perron
8623fc3580 speed up sat cumulative; add namespaces to base library + fix code 2018-04-11 13:00:30 +02:00
Laurent Perron
a12d754e8f export CPLEX in python 2018-04-03 07:28:26 +02:00
Ying-zong Huang
32e1e9e737 Add parameter passing to the CBC interface
Previously, CBCInterface does not read from solver-specific
parameters because there is no ReadParameterFile implemented.

This patch implements a ReadParameterFile that takes these
parameters, saves them in the CBCInterface instance, and passes
them to callCbc during Solve as additional arguments.

Tested to work with e.g. the "-threads" argument.

Addresses issue #57.
2018-03-30 19:49:05 -04:00
Laurent Perron
9044de9355 new heuristics to minimize clauses in SAT; base library changes 2018-03-06 18:17:36 +01:00
Laurent Perron
6b8cd2cdc2 finish C$ Sat Integer API; Refactor Glop code; Add new option for Glop Scaling; speed improvements in the sat solver 2018-02-16 17:08:01 +01:00
Laurent Perron
07a1078e77 change API or LP writer to return util::status 2018-02-12 11:38:22 +01:00
Corentin Le Molgat
5759af1a97 Move CMake gflags target to its own namespace.
Use gflags::gflags as others deps to be more consistent and modern
2018-02-06 14:16:37 +01:00
Corentin Le Molgat
19ae1c121c Fix python loader_path 2018-01-22 14:33:20 +01:00
Corentin Le Molgat
6856567eda Rework CMakeLists.txt
Dependencies:
- Add dependencies as subprojects instead of prebuild (aka imported target)
- add zlib project
- Use Cbc as CMake subproject instead of prebuilt
- Add log between each subproject
- Force gflags namespace to gflags

Or-tools:
- Rework python.cmake support
- Fix missing ortool.util in python (#558)
- Try to use static library for ortools::proto
pros: can use target_link_libraries to get includes etc...
cons: lot of symbols undefined since libortools.so will strip everything -_-
- Use add_library(XXX OBJECT) for ortools/*
- fix get version from git when using small depth copy
- Create Install rule for ortools
- Don't create export rules
note: since we use subprojects instead of Imported Target,
ortools export complained against target deps "that is not in the export set."

Update windows support
- add swig project
- Protobuf force the use of /MD instead of /MT
- or-tools use /MD by default
- Add missing ws2_32
- Add missing psapi
- Update windows disable warnings list
- Build Static or-tools on Windows
- fix windows export symbols leak issue

Signed-off-by: Corentin Le Molgat <corentinl@google.com>
2018-01-19 15:03:25 +01:00
Laurent Perron
604587eec7 minor changes; change the search parameters in the cp_model.proto 2018-01-15 10:41:09 +01:00
Laurent Perron
88ef3d0302 remove std:: from std::min|max in comments; performance improvements on the SAT, bug fixes 2018-01-10 13:21:06 +01:00
Laurent Perron
bb605a1a8a more work on base libraries 2017-12-11 11:02:46 +01:00
Laurent Perron
8d7320b962 deep sync with base library; prepare for abseil.io integration 2017-12-08 14:52:49 +01:00
Laurent Perron
c363991e2b rearchitecture glop code 2017-12-05 16:45:10 +01:00
Laurent Perron
b06472bf44 small improvements in sat internals; add reservoir constraint to the cp_model {proto, python API) 2017-11-10 18:32:16 +01:00
Laurent Perron
e14ee86de3 move rcpsp parser to ortools/data; continue working on SAT 2017-11-07 15:45:52 +01:00
Laurent Perron
03fccb4032 improve incrementality of glop when used in the sat solver; change more copyright dates; more documentation on the gate scheduling problem 2017-10-18 11:09:13 +02:00
Laurent Perron
2c7a8bf8f6 change copyright date 2017-10-17 13:08:10 +02:00
Laurent Perron
e8540c1363 add vrp constraint to the sat solver; remove old no_cycle code 2017-10-16 11:20:54 +02:00