Commit Graph

15551 Commits

Author SHA1 Message Date
Corentin Le Molgat
ba7e81f729 ortools: various export from google3 2025-08-22 14:24:48 +02:00
Laurent Perron
6d31264b4a [FZ] support set_le and set_lt; turn off the nosets flag 2025-08-21 20:21:33 -07:00
Corentin Le Molgat
3ca6e921ad cmake: add license boilerplate to samples 2025-08-21 13:56:24 +02:00
Corentin Le Molgat
0d2c2e6782 lp_data: remove model_reader 2025-08-21 09:24:48 +02:00
Corentin Le Molgat
d9756ddc61 ci: fixup freebsd workflow 2025-08-21 08:50:14 +02:00
Laurent Perron
2ebe759189 [FZ] support array_var_set_element 2025-08-20 18:43:09 -07:00
Laurent Perron
ba26576f20 [FZ] more work on native set support 2025-08-21 00:46:32 +02:00
Corentin Le Molgat
30805fd498 math_opt: fix gscip_from_mp_model_proto_test 2025-08-20 14:27:46 +02:00
Mizux Seiha
1bf2448981 cmake: fix math_opt update
* fix cxx build
* fix python build
2025-08-20 11:37:19 +02:00
Corentin Le Molgat
82bc28d3c1 math_opt: backport from google3
* move gscip/ to math_opt/solvers/
2025-08-20 11:36:44 +02:00
Mizux Seiha
4ca5464e48 cmake: fix ortools/util/python 2025-08-20 11:36:44 +02:00
Corentin Le Molgat
de5fbc46ab util/python: add solve interrupter 2025-08-20 11:36:43 +02:00
Corentin Le Molgat
fcf4bd181e base: add temp_file
port: rework file
2025-08-20 11:36:08 +02:00
Corentin Le Molgat
2a5ff961aa third_party_solvers: cleanup 2025-08-20 11:31:36 +02:00
Corentin Le Molgat
56882dd719 sat: remove license boilerplate in MD 2025-08-20 11:31:36 +02:00
Laurent Perron
a94366dc37 start supporting set variables and constraints in CP-SAT; this is inactive as nosets.mzn is still in place 2025-08-18 14:43:20 -07:00
dependabot[bot]
2d5e6f1849 build(deps): bump actions/checkout in the github-actions group
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).

Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 10:33:42 +02:00
Corentin Le Molgat
d830368b0a ortools: export from google3 2025-08-11 09:13:53 +02:00
Corentin Le Molgat
d206973ced bazel: fix sat loads 2025-08-08 09:07:52 +02:00
Mizux Seiha
01d00d98cf Merge remote-tracking branch 'origin/v99bugfix' 2025-08-07 13:19:08 +02:00
Mizux Seiha
badef91fb5 Merge remote-tracking branch 'origin/stable' into v99bugfix 2025-08-07 13:17:42 +02:00
Mizux Seiha
aa28d976ac Merge remote-tracking branch 'origin/v99bugfix' 2025-08-07 12:46:55 +02:00
Mizux Seiha
d389457ae8 cmake: regenerate docs/ images 2025-08-07 12:46:27 +02:00
Mizux Seiha
a762c579b7 cmake: update docs/ 2025-08-07 12:45:53 +02:00
Corentin Le Molgat
3a97726664 linear_solver: backport .lp support to solve_model 2025-08-06 13:21:18 +02:00
Corentin Le Molgat
260856bf0f linear_solver: rework python typing 2025-08-06 13:20:32 +02:00
Corentin Le Molgat
9cde24d763 highs: rework HighsInterface::Solve 2025-08-06 10:59:09 +02:00
Corentin Le Molgat
80af949922 bazel: fix with_highs support 2025-08-06 10:58:29 +02:00
Corentin Le Molgat
2fd586595b bazel: fix more load statements 2025-08-06 10:57:31 +02:00
Corentin Le Molgat
0db80a34f6 sat: backport from main 2025-08-06 10:54:53 +02:00
Corentin Le Molgat
5d5a115dec util: add MatrixOrFunction 2025-08-06 10:53:59 +02:00
Corentin Le Molgat
bcf774e65a math_opt: backport from main 2025-08-06 10:53:04 +02:00
Corentin Le Molgat
679b042944 bazel: regenerate requirements.txt 2025-08-06 10:09:34 +02:00
Corentin Le Molgat
3bef66b3cb bazel: regenerate requirements.txt 2025-08-06 09:50:36 +02:00
Laurent Perron
4ffb359524 [Bazel] enable highs for linear_solver by default; better support for highs in linear_solver; read .lp file in solve_model.py 2025-08-05 10:26:22 -07:00
Laurent Perron
9fa0db877b Merge pull request #4745 from flokli/scip-tests
math_opt: only run SCIP tests if enabled
2025-08-01 14:05:24 -07:00
Florian Klink
b5a2f8ac40 math_opt: only run SCIP tests if enabled
Usage of SCIP library can be disabled in CMake build by setting
-DUSE_SCIP=OFF.

However, the tests were still run unconditionally, showing test failures like this:

```
/build/source/ortools/math_opt/solver_tests/test_models_test.cc:29: Failure
Value of: Solve(*model, SolverType::kGscip)
Expected: is OK and has a value that (is an object whose field `termination` (is an object whose field `reason` is equal to optimal) and (is an object whose field `problem_status` (is an object whose field `primal_status` is equal to feasible) and (is an object whose field `dual_status` is equal to feasible) and (is an object whose field `primal_or_dual_infeasible` is equal to false))) and (is an object whose property `has_primal_feasible_solution` is equal to true) and (is an object whose property `objective_value` is approximately 9 (absolute error <= 1.0000000000000001e-05))
  Actual: [INVALID_ARGUMENT: solver type SOLVER_TYPE_GSCIP is not registered, support for this solver has not been compiled], which has status INVALID_ARGUMENT: solver type SOLVER_TYPE_GSCIP is not registered, support for this solver has not been compiled

[  FAILED  ] SmallModelTest.Integer (2 ms)
[ RUN      ] SmallModelTest.Continuous
[       OK ] SmallModelTest.Continuous (1 ms)
[----------] 2 tests from SmallModelTest (3 ms total)

[----------] 2 tests from DenseIndependentSetTest
[ RUN      ] DenseIndependentSetTest.Integer
/build/source/ortools/math_opt/solver_tests/test_models_test.cc:40: Failure
Value of: Solve(*model, SolverType::kGscip)
Expected: is OK and has a value that (is an object whose field `termination` (is an object whose field `reason` is equal to optimal) and (is an object whose field `problem_status` (is an object whose field `primal_status` is equal to feasible) and (is an object whose field `dual_status` is equal to feasible) and (is an object whose field `primal_or_dual_infeasible` is equal to false))) and (is an object whose property `has_primal_feasible_solution` is equal to true) and (is an object whose property `objective_value` is approximately 7 (absolute error <= 1.0000000000000001e-05))
  Actual: [INVALID_ARGUMENT: solver type SOLVER_TYPE_GSCIP is not registered, support for this solver has not been compiled], which has status INVALID_ARGUMENT: solver type SOLVER_TYPE_GSCIP is not registered, support for this solver has not been compiled

[  FAILED  ] DenseIndependentSetTest.Integer (0 ms)
[ RUN      ] DenseIndependentSetTest.Continuous
[       OK ] DenseIndependentSetTest.Continuous (1 ms)
[----------] 2 tests from DenseIndependentSetTest (2 ms total)

[----------] 1 test from DenseIndependentSetHint5Test
[ RUN      ] DenseIndependentSetHint5Test.HintIsFeasibleWithObjective5
/build/source/ortools/math_opt/solver_tests/test_models_test.cc:59: Failure
Value of: Solve(*model, SolverType::kGscip)
Expected: is OK and has a value that (is an object whose field `termination` (is an object whose field `reason` is equal to optimal) and (is an object whose field `problem_status` (is an object whose field `primal_status` is equal to feasible) and (is an object whose field `dual_status` is equal to feasible) and (is an object whose field `primal_or_dual_infeasible` is equal to false))) and (is an object whose property `has_primal_feasible_solution` is equal to true) and (is an object whose property `objective_value` is approximately 5 (absolute error <= 1.0000000000000001e-05))
  Actual: [INVALID_ARGUMENT: solver type SOLVER_TYPE_GSCIP is not registered, support for this solver has not been compiled], which has status INVALID_ARGUMENT: solver type SOLVER_TYPE_GSCIP is not registered, support for this solver has not been compiled

[  FAILED  ] DenseIndependentSetHint5Test.HintIsFeasibleWithObjective5 (0 ms)
[----------] 1 test from DenseIndependentSetHint5Test (0 ms total)

[----------] 2 tests from IndependentSetCompleteGraphTest
[ RUN      ] IndependentSetCompleteGraphTest.Integer
/build/source/ortools/math_opt/solver_tests/test_models_test.cc:65: Failure
Value of: Solve(*model, SolverType::kGscip)
Expected: is OK and has a value that (is an object whose field `termination` (is an object whose field `reason` is equal to optimal) and (is an object whose field `problem_status` (is an object whose field `primal_status` is equal to feasible) and (is an object whose field `dual_status` is equal to feasible) and (is an object whose field `primal_or_dual_infeasible` is equal to false))) and (is an object whose property `has_primal_feasible_solution` is equal to true) and (is an object whose property `objective_value` is approximately 1 (absolute error <= 1.0000000000000001e-05))
  Actual: [INVALID_ARGUMENT: solver type SOLVER_TYPE_GSCIP is not registered, support for this solver has not been compiled], which has status INVALID_ARGUMENT: solver type SOLVER_TYPE_GSCIP is not registered, support for this solver has not been compiled

[  FAILED  ] IndependentSetCompleteGraphTest.Integer (0 ms)
```

Fix this, by conditionalizing these tests on USE_SCIP.
2025-08-01 14:53:43 +02:00
Laurent Perron
32bd8e0209 [CP-SAT] small cleanup, more work on linear2 2025-07-31 13:57:50 -07:00
Laurent Perron
0e4f0bcad7 Merge pull request #4700 from google/dependabot/pip/bazel/pip-2c7469b053
build(deps): bump urllib3 from 2.2.2 to 2.5.0 in /bazel in the pip group across 1 directory
2025-07-29 10:59:28 -07:00
Laurent Perron
9fa9bd4da4 [CP-SAT] better dtime for scheduling constraints; connect the time limit in the repair_hint mode; fix #4743 2025-07-29 09:07:13 -07:00
Laurent Perron
a3fc2000e4 Merge pull request #4737 from pavlomuts/highs_solution_hint
Pass solution hint to HiGHS from mathopt
2025-07-29 05:44:53 -07:00
Laurent Perron
13e2a14ab6 wrap flat matrices 2025-07-28 10:34:48 -07:00
Laurent Perron
87a66e6239 update python typing 2025-07-28 10:34:20 -07:00
Laurent Perron
99ede3bbde [CP-SAT] more polishing on the python API; fix #4733; improve linear2 processing 2025-07-28 10:34:04 -07:00
Laurent Perron
374cc3e596 polish code 2025-07-27 15:29:20 -07:00
Laurent Perron
a0e25debc5 [CP-SAT] extend support for enforcement literals in constraints 2025-07-26 21:29:40 +02:00
Laurent Perron
8b4c79dd75 [CP-SAT] Python: rewrite support for variable numbers of arguments 2025-07-26 21:29:09 +02:00
Laurent Perron
f2cf147e79 [CP-SAT] rewrite and speed up the python layer; extend support for enforcement literals to more constraints 2025-07-24 23:51:00 +02:00
Guillaume Chatelet
f1113bcb47 Fix load statements 2025-07-24 20:55:56 +02:00
Guillaume Chatelet
99694439f1 Remove duplicated load statement 2025-07-24 16:39:17 +00:00