Commit Graph

10096 Commits

Author SHA1 Message Date
Corentin Le Molgat
b7ed2f5355 cp: Update doc 2022-01-17 08:38:21 +01:00
Laurent Perron
a2ad6677e1 regenerate doc 2022-01-16 18:02:36 +01:00
Laurent Perron
ef0e93637d reformat c# code 2022-01-16 17:37:42 +01:00
Laurent Perron
92dbda65c6 polish C# doc 2022-01-16 17:36:07 +01:00
Laurent Perron
6f0ab6f38c more CP-SAT C# doc 2022-01-16 15:46:15 +01:00
Laurent Perron
de8f124635 Merge branch 'master' of github.com:google/or-tools 2022-01-16 11:18:11 +01:00
Laurent Perron
2b3be05a12 mode CP-SAT C# doc 2022-01-16 11:17:57 +01:00
Laurent Perron
c65fa02cd1 fix 2022-01-16 10:52:41 +01:00
Laurent Perron
130406df94 work on C# docs 2022-01-16 10:51:32 +01:00
Laurent Perron
dd28909258 polish c# doc 2022-01-16 10:12:53 +01:00
Laurent Perron
32e92e6aaf add cpp format 2022-01-16 09:31:40 +01:00
Laurent Perron
78eed86149 Merge pull request #3085 from bollhals/dotnet_preset_size
set capacity before adding if size is known
2022-01-16 09:23:07 +01:00
Laurent Perron
563aa74e8b Merge branch 'master' into dotnet_preset_size 2022-01-16 09:18:39 +01:00
Laurent Perron
cdcc46e2db reindent cs 2022-01-16 09:16:36 +01:00
Laurent Perron
7ccda44182 regenerate doxygen doc 2022-01-15 22:53:18 +01:00
Laurent Perron
ff47d38a5b [CP-SAT] reindent C# code; add documentation to CpModel.cs and Constraints.cs 2022-01-15 22:43:59 +01:00
bollhals
1eb93136dd set capacity before adding if size is known 2022-01-14 23:21:02 +01:00
Laurent Perron
79690dbb16 Merge pull request #3081 from bollhals/dotnet_tests
improve allocation on some tests
2022-01-14 19:00:27 +01:00
bollhals
e3c427a950 improve allocation on some tests 2022-01-14 17:56:54 +01:00
Geoffrey Gunter
68f4e80e2c Fix CMake package config file (#3068)
* Fix CMake package config file

There are currently a few issues with how the COIN-OR dependencies are
resolved when using `find_package(ortools CONFIG)` to add or-tools to
an external CMake project.

* With CMake >=3.9.6, we try to find the Clp and Cbc packages using the
  CONFIG mode of `find_package`. This always fails since neither
  library provides a CMake config file.

* If we address the above issue by instead using the MODULE mode of
  `find_package`, then we need to add `FindCbc.cmake` and
  `FindCpl.cmake` scripts to the CMAKE_MODULE_PATH in order to teach
  CMake how to find these dependencies. I propose that or-tools should
  install these scripts alongside its config file so that they're
  available to external CMake projects.

* Finally, the `FindCbc.cmake` script included with or-tools defines the
  variable `CBC_FOUND` when it's successful, rather than `Cbc_FOUND` as
  expected (CMake variables are case-sensitive). The `FindCpl.cmake`
  script has a similar issue. As a result, even when the above two
  points are addressed, `find_package(ortools CONFIG)` will still fail
  because CMake erroneously thinks that these two dependencies weren't
  succesfully found.

This commit attempts to address the above issues with the following
changes:

* The or-tools CMake config file is modified to allow searching for Cbc
  and Cpl using the MODULE mode of `find_package`.

* `FindCbc.cmake` and `FindCpl.cmake` are installed with the CMake
  package config files and are added to the CMAKE_MODULE_PATH if
  `USE_COINOR` was truthy.

* The `FindCbc.cmake` and `FindCpl.cmake` files are modified to change
  the case of variables they export.

* Only install FindXXX.cmake modules if COIN-OR support was enabled
2022-01-14 08:38:37 +01:00
Laurent Perron
481bfdf099 Merge pull request #3072 from bollhals/dotnet_add_or_increment
C#
2022-01-13 11:18:12 +01:00
bollhals
b1bfb2e641 C#
- use var in is type check
- seal classes that have no derived class
- simplify AddOrIncrement function
2022-01-13 01:22:02 +01:00
Laurent Perron
648e6e0ace Merge pull request #3069 from bollhals/domain_and_null_checks
Avoid Domain if not needed
2022-01-12 22:28:06 +01:00
bollhals
e2054b3cb5 - only use domain object if really needed
- upgrade to C# 9
- replace some null checks with "is (not) null"
2022-01-12 21:54:53 +01:00
Laurent Perron
23e3a7b989 [CP-SAT] relax model validation requirement on scheduling constraints 2022-01-12 12:05:12 +01:00
Laurent Perron
5d3ccd2881 [CP-SAT] Tweak C# linear API 2022-01-12 11:12:03 +01:00
Laurent Perron
22eab80fca fix 2022-01-12 11:02:42 +01:00
Laurent Perron
e25b39a3d1 [CP-SAT] optimize C# modeling layer 2022-01-12 10:32:17 +01:00
Laurent Perron
a130b9aad5 [CP-SAT] remove unused API 2022-01-12 10:31:55 +01:00
Laurent Perron
be8c2f9c79 [CP-SAT] improve C++ modeling layer; allow chaining incremental constraint filling methods in C#/Java 2022-01-11 17:52:27 +01:00
Laurent Perron
42ae5dfd9c fix 2022-01-11 16:22:43 +01:00
Laurent Perron
1615d1956c fixes 2022-01-11 16:15:07 +01:00
Laurent Perron
79865d02cb add TableConstraint.addTuples in java CP-SAT 2022-01-11 15:26:30 +01:00
Laurent Perron
43532a8d49 add incremental constraint creation in CP-SAT C# 2022-01-11 15:25:23 +01:00
Laurent Perron
577f5aef77 [CP-SAT] change constraints in CpModel C# API to allow incremental filling like in C++/Java 2022-01-11 12:43:56 +01:00
Laurent Perron
c22032a7fe [CP-SAT] fix permission in new java API 2022-01-11 12:42:43 +01:00
Laurent Perron
0c8d081936 fix 2022-01-10 23:12:00 +01:00
Laurent Perron
2aba48589e port csharp sat examples 2022-01-10 21:24:54 +01:00
Laurent Perron
4d1eee929b fix 2022-01-10 21:24:41 +01:00
Laurent Perron
badb2189f1 [CP-SAT] update doc files 2022-01-10 19:29:40 +01:00
Laurent Perron
30fe883e9c [GLOP] Fix bug in presolve 2022-01-10 19:29:22 +01:00
Laurent Perron
7b477b0082 add cp-sat C# test; reformat code 2022-01-10 19:24:53 +01:00
Laurent Perron
4036cde59e C# CP-SAT: test new expression; reformat examples/tests/*cs 2022-01-10 18:44:12 +01:00
Laurent Perron
2f34343c6d fix CP-SAT C# layer; port samples 2022-01-10 18:22:27 +01:00
Laurent Perron
f82a67375d Rewrite LinearExpression part in CP-SAT C# interface 2022-01-10 13:38:27 +01:00
Laurent Perron
d6878fdc05 [CP-SAT] speedup bool_var creation 2022-01-08 15:09:25 +01:00
Laurent Perron
58a32b0510 improve binpacking_2d_sat.cc example 2022-01-08 14:45:54 +01:00
Laurent Perron
6f5643a07f [BASE] extend status builder 2022-01-08 14:45:38 +01:00
Laurent Perron
0cab5e45ef [UTIL] speedup domains 2022-01-08 14:45:16 +01:00
Laurent Perron
a1b369d4c8 [CP-SAT] speedup presolve; fix platform non determinism fix @2056; add symmetry detection for model with scheduling constraints 2022-01-08 14:44:59 +01:00