From 87ca4f58ad9a1777328f0c271e0d3d5973e1faec Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Thu, 16 Jun 2022 15:21:00 +0200 Subject: [PATCH] [CP-SAT] bump license years; fix scheduling cuts; improve lb_tree_search --- ortools/sat/all_different.cc | 2 +- ortools/sat/all_different.h | 2 +- ortools/sat/boolean_problem.cc | 2 +- ortools/sat/boolean_problem.h | 2 +- ortools/sat/boolean_problem.proto | 2 +- ortools/sat/circuit.cc | 2 +- ortools/sat/circuit.h | 2 +- ortools/sat/clause.cc | 2 +- ortools/sat/clause.h | 2 +- ortools/sat/cp_constraints.cc | 2 +- ortools/sat/cp_constraints.h | 2 +- ortools/sat/cp_model.cc | 2 +- ortools/sat/cp_model.h | 2 +- ortools/sat/cp_model.proto | 2 +- ortools/sat/cp_model_checker.cc | 2 +- ortools/sat/cp_model_checker.h | 2 +- ortools/sat/cp_model_expand.cc | 2 +- ortools/sat/cp_model_expand.h | 2 +- ortools/sat/cp_model_lns.cc | 2 +- ortools/sat/cp_model_lns.h | 2 +- ortools/sat/cp_model_loader.cc | 2 +- ortools/sat/cp_model_loader.h | 2 +- ortools/sat/cp_model_mapping.h | 2 +- ortools/sat/cp_model_objective.cc | 2 +- ortools/sat/cp_model_objective.h | 2 +- ortools/sat/cp_model_postsolve.cc | 2 +- ortools/sat/cp_model_postsolve.h | 2 +- ortools/sat/cp_model_presolve.cc | 2 +- ortools/sat/cp_model_presolve.h | 2 +- ortools/sat/cp_model_search.cc | 2 +- ortools/sat/cp_model_search.h | 2 +- ortools/sat/cp_model_service.proto | 2 +- ortools/sat/cp_model_solver.cc | 2 +- ortools/sat/cp_model_solver.h | 2 +- ortools/sat/cp_model_symmetries.cc | 2 +- ortools/sat/cp_model_symmetries.h | 2 +- ortools/sat/cp_model_utils.cc | 2 +- ortools/sat/cp_model_utils.h | 2 +- ortools/sat/csharp/Constraints.cs | 2 +- ortools/sat/csharp/CpModel.cs | 2 +- ortools/sat/csharp/CpSolver.cs | 2 +- ortools/sat/csharp/IntegerExpressions.cs | 2 +- ortools/sat/csharp/IntervalVariables.cs | 2 +- ortools/sat/csharp/SearchHelpers.cs | 2 +- ortools/sat/csharp/sat.i | 2 +- ortools/sat/cumulative.cc | 2 +- ortools/sat/cumulative.h | 2 +- ortools/sat/cumulative_energy.cc | 2 +- ortools/sat/cumulative_energy.h | 2 +- ortools/sat/cuts.cc | 2 +- ortools/sat/cuts.h | 2 +- ortools/sat/diffn.cc | 2 +- ortools/sat/diffn.h | 2 +- ortools/sat/diffn_util.cc | 2 +- ortools/sat/diffn_util.h | 2 +- ortools/sat/disjunctive.cc | 2 +- ortools/sat/disjunctive.h | 2 +- ortools/sat/drat_checker.cc | 2 +- ortools/sat/drat_checker.h | 2 +- ortools/sat/drat_proof_handler.cc | 2 +- ortools/sat/drat_proof_handler.h | 2 +- ortools/sat/drat_writer.cc | 2 +- ortools/sat/drat_writer.h | 2 +- ortools/sat/encoding.cc | 2 +- ortools/sat/encoding.h | 2 +- ortools/sat/feasibility_pump.cc | 2 +- ortools/sat/feasibility_pump.h | 2 +- ortools/sat/implied_bounds.cc | 2 +- ortools/sat/implied_bounds.h | 2 +- ortools/sat/inclusion.h | 2 +- ortools/sat/integer.cc | 5 +- ortools/sat/integer.h | 13 +- ortools/sat/integer_expr.cc | 36 ++- ortools/sat/integer_expr.h | 10 +- ortools/sat/integer_search.cc | 2 +- ortools/sat/integer_search.h | 2 +- ortools/sat/intervals.cc | 2 +- ortools/sat/intervals.h | 2 +- ortools/sat/java/sat.i | 2 +- ortools/sat/lb_tree_search.cc | 279 +++++++++++++----- ortools/sat/lb_tree_search.h | 17 +- ortools/sat/linear_constraint.cc | 2 +- ortools/sat/linear_constraint.h | 2 +- ortools/sat/linear_constraint_manager.cc | 2 +- ortools/sat/linear_constraint_manager.h | 2 +- ortools/sat/linear_programming_constraint.cc | 2 +- ortools/sat/linear_programming_constraint.h | 2 +- ortools/sat/linear_relaxation.cc | 2 +- ortools/sat/linear_relaxation.h | 2 +- ortools/sat/lp_utils.cc | 2 +- ortools/sat/lp_utils.h | 2 +- ortools/sat/max_hs.cc | 2 +- ortools/sat/max_hs.h | 2 +- ortools/sat/model.h | 2 +- ortools/sat/optimization.cc | 2 +- ortools/sat/optimization.h | 2 +- ortools/sat/parameters_validation.cc | 2 +- ortools/sat/parameters_validation.h | 2 +- ortools/sat/pb_constraint.cc | 2 +- ortools/sat/pb_constraint.h | 2 +- ortools/sat/precedences.cc | 12 +- ortools/sat/precedences.h | 2 +- ortools/sat/presolve_context.cc | 2 +- ortools/sat/presolve_context.h | 2 +- ortools/sat/presolve_util.cc | 2 +- ortools/sat/presolve_util.h | 2 +- ortools/sat/probing.cc | 2 +- ortools/sat/probing.h | 2 +- ortools/sat/pseudo_costs.cc | 2 +- ortools/sat/pseudo_costs.h | 2 +- ortools/sat/python/cp_model.py | 2 +- ortools/sat/python/cp_model_helper.py | 2 +- ortools/sat/python/swig_helper.cc | 2 +- ortools/sat/python/visualization.py | 2 +- ortools/sat/restart.cc | 2 +- ortools/sat/restart.h | 2 +- ortools/sat/rins.cc | 2 +- ortools/sat/rins.h | 2 +- ortools/sat/samples/AssignmentGroupsSat.cs | 2 +- ortools/sat/samples/AssignmentGroupsSat.java | 2 +- ortools/sat/samples/AssignmentSat.cs | 2 +- ortools/sat/samples/AssignmentSat.java | 2 +- ortools/sat/samples/AssignmentTaskSizesSat.cs | 2 +- .../sat/samples/AssignmentTaskSizesSat.java | 2 +- ortools/sat/samples/AssignmentTeamsSat.cs | 2 +- ortools/sat/samples/AssignmentTeamsSat.java | 2 +- ortools/sat/samples/AssumptionsSampleSat.cs | 2 +- ortools/sat/samples/AssumptionsSampleSat.java | 2 +- ortools/sat/samples/BinPackingProblemSat.cs | 2 +- ortools/sat/samples/BinPackingProblemSat.java | 2 +- ortools/sat/samples/BoolOrSampleSat.cs | 2 +- ortools/sat/samples/BoolOrSampleSat.java | 2 +- ortools/sat/samples/ChannelingSampleSat.cs | 2 +- ortools/sat/samples/ChannelingSampleSat.java | 2 +- ortools/sat/samples/CpIsFunSat.cs | 2 +- ortools/sat/samples/CpIsFunSat.java | 2 +- ortools/sat/samples/CpSatExample.cs | 2 +- ortools/sat/samples/CpSatExample.java | 2 +- .../EarlinessTardinessCostSampleSat.cs | 2 +- .../EarlinessTardinessCostSampleSat.java | 2 +- ortools/sat/samples/IntervalSampleSat.cs | 2 +- ortools/sat/samples/IntervalSampleSat.java | 2 +- ortools/sat/samples/LiteralSampleSat.cs | 2 +- ortools/sat/samples/LiteralSampleSat.java | 2 +- ortools/sat/samples/MinimalJobshopSat.cs | 2 +- ortools/sat/samples/MinimalJobshopSat.java | 2 +- ortools/sat/samples/MultipleKnapsackSat.cs | 2 +- ortools/sat/samples/MultipleKnapsackSat.java | 2 +- ortools/sat/samples/NQueensSat.cs | 2 +- ortools/sat/samples/NQueensSat.java | 2 +- ortools/sat/samples/NoOverlapSampleSat.cs | 2 +- ortools/sat/samples/NoOverlapSampleSat.java | 2 +- ortools/sat/samples/NursesSat.cs | 2 +- ortools/sat/samples/NursesSat.java | 2 +- .../sat/samples/OptionalIntervalSampleSat.cs | 2 +- .../samples/OptionalIntervalSampleSat.java | 2 +- ortools/sat/samples/RabbitsAndPheasantsSat.cs | 2 +- .../sat/samples/RabbitsAndPheasantsSat.java | 2 +- ortools/sat/samples/RankingSampleSat.cs | 2 +- ortools/sat/samples/RankingSampleSat.java | 2 +- ortools/sat/samples/ReifiedSampleSat.cs | 2 +- ortools/sat/samples/ReifiedSampleSat.java | 2 +- ortools/sat/samples/ScheduleRequestsSat.cs | 2 +- ortools/sat/samples/ScheduleRequestsSat.java | 2 +- .../samples/SearchForAllSolutionsSampleSat.cs | 2 +- .../SearchForAllSolutionsSampleSat.java | 2 +- ortools/sat/samples/SimpleSatProgram.cs | 2 +- ortools/sat/samples/SimpleSatProgram.java | 2 +- .../sat/samples/SolutionHintingSampleSat.cs | 2 +- .../sat/samples/SolutionHintingSampleSat.java | 2 +- ...eAndPrintIntermediateSolutionsSampleSat.cs | 2 +- ...ndPrintIntermediateSolutionsSampleSat.java | 2 +- .../samples/SolveWithTimeLimitSampleSat.cs | 2 +- .../samples/SolveWithTimeLimitSampleSat.java | 2 +- ortools/sat/samples/StepFunctionSampleSat.cs | 2 +- .../sat/samples/StepFunctionSampleSat.java | 2 +- .../samples/StopAfterNSolutionsSampleSat.cs | 2 +- .../samples/StopAfterNSolutionsSampleSat.java | 2 +- ortools/sat/samples/assignment_groups_sat.cc | 2 +- ortools/sat/samples/assignment_groups_sat.py | 2 +- ortools/sat/samples/assignment_sat.cc | 2 +- ortools/sat/samples/assignment_sat.py | 2 +- .../sat/samples/assignment_task_sizes_sat.cc | 2 +- .../sat/samples/assignment_task_sizes_sat.py | 2 +- ortools/sat/samples/assignment_teams_sat.cc | 2 +- ortools/sat/samples/assignment_teams_sat.py | 2 +- ortools/sat/samples/assumptions_sample_sat.cc | 2 +- ortools/sat/samples/assumptions_sample_sat.py | 2 +- ortools/sat/samples/binpacking_problem_sat.cc | 2 +- ortools/sat/samples/binpacking_problem_sat.py | 2 +- ortools/sat/samples/bool_or_sample_sat.cc | 2 +- ortools/sat/samples/bool_or_sample_sat.py | 2 +- .../sat/samples/boolean_product_sample_sat.py | 2 +- ortools/sat/samples/channeling_sample_sat.cc | 2 +- ortools/sat/samples/channeling_sample_sat.py | 2 +- ortools/sat/samples/copy_model_sample_sat.cc | 2 +- ortools/sat/samples/copy_model_sample_sat.py | 2 +- ortools/sat/samples/cp_is_fun_sat.cc | 2 +- ortools/sat/samples/cp_is_fun_sat.py | 2 +- ortools/sat/samples/cp_sat_example.cc | 2 +- ortools/sat/samples/cp_sat_example.py | 2 +- .../earliness_tardiness_cost_sample_sat.cc | 2 +- .../earliness_tardiness_cost_sample_sat.py | 2 +- ortools/sat/samples/interval_sample_sat.cc | 2 +- ortools/sat/samples/interval_sample_sat.py | 2 +- ortools/sat/samples/literal_sample_sat.cc | 2 +- ortools/sat/samples/literal_sample_sat.py | 2 +- ortools/sat/samples/minimal_jobshop_sat.cc | 2 +- ortools/sat/samples/minimal_jobshop_sat.py | 2 +- ortools/sat/samples/multiple_knapsack_sat.cc | 2 +- ortools/sat/samples/multiple_knapsack_sat.py | 2 +- ortools/sat/samples/no_overlap_sample_sat.cc | 2 +- ortools/sat/samples/no_overlap_sample_sat.py | 2 +- ortools/sat/samples/nqueens_sat.cc | 2 +- ortools/sat/samples/nqueens_sat.py | 2 +- ortools/sat/samples/nurses_sat.cc | 2 +- ortools/sat/samples/nurses_sat.py | 2 +- .../samples/optional_interval_sample_sat.cc | 2 +- .../samples/optional_interval_sample_sat.py | 2 +- .../overlapping_intervals_sample_sat.py | 2 +- .../sat/samples/rabbits_and_pheasants_sat.cc | 2 +- .../sat/samples/rabbits_and_pheasants_sat.py | 2 +- ortools/sat/samples/ranking_sample_sat.cc | 2 +- ortools/sat/samples/ranking_sample_sat.py | 2 +- ortools/sat/samples/reified_sample_sat.cc | 2 +- ortools/sat/samples/reified_sample_sat.py | 2 +- ortools/sat/samples/schedule_requests_sat.cc | 2 +- ortools/sat/samples/schedule_requests_sat.py | 2 +- .../scheduling_with_calendar_sample_sat.py | 2 +- .../search_for_all_solutions_sample_sat.cc | 2 +- .../search_for_all_solutions_sample_sat.py | 2 +- ortools/sat/samples/simple_sat_program.cc | 2 +- ortools/sat/samples/simple_sat_program.py | 2 +- .../samples/solution_hinting_sample_sat.cc | 2 +- .../samples/solution_hinting_sample_sat.py | 2 +- ...print_intermediate_solutions_sample_sat.cc | 2 +- ...print_intermediate_solutions_sample_sat.py | 2 +- .../solve_with_time_limit_sample_sat.cc | 2 +- .../solve_with_time_limit_sample_sat.py | 2 +- .../sat/samples/step_function_sample_sat.cc | 2 +- .../sat/samples/step_function_sample_sat.py | 2 +- .../stop_after_n_solutions_sample_sat.cc | 2 +- .../stop_after_n_solutions_sample_sat.py | 2 +- ortools/sat/sat_base.h | 2 +- ortools/sat/sat_decision.cc | 2 +- ortools/sat/sat_decision.h | 8 +- ortools/sat/sat_inprocessing.cc | 2 +- ortools/sat/sat_inprocessing.h | 2 +- ortools/sat/sat_parameters.proto | 2 +- ortools/sat/sat_solver.cc | 23 +- ortools/sat/sat_solver.h | 12 +- ortools/sat/scheduling_constraints.cc | 2 +- ortools/sat/scheduling_constraints.h | 2 +- ortools/sat/scheduling_cuts.cc | 129 ++++---- ortools/sat/scheduling_cuts.h | 2 +- ortools/sat/simplification.cc | 2 +- ortools/sat/simplification.h | 2 +- ortools/sat/subsolver.cc | 2 +- ortools/sat/subsolver.h | 2 +- ortools/sat/swig_helper.cc | 2 +- ortools/sat/swig_helper.h | 2 +- ortools/sat/symmetry.cc | 2 +- ortools/sat/symmetry.h | 2 +- ortools/sat/symmetry_util.cc | 2 +- ortools/sat/symmetry_util.h | 2 +- ortools/sat/synchronization.cc | 2 +- ortools/sat/synchronization.h | 2 +- ortools/sat/table.cc | 2 +- ortools/sat/table.h | 2 +- ortools/sat/theta_tree.cc | 2 +- ortools/sat/theta_tree.h | 2 +- ortools/sat/timetable.cc | 2 +- ortools/sat/timetable.h | 2 +- ortools/sat/timetable_edgefinding.cc | 2 +- ortools/sat/timetable_edgefinding.h | 2 +- ortools/sat/util.cc | 2 +- ortools/sat/util.h | 2 +- ortools/sat/var_domination.cc | 2 +- ortools/sat/var_domination.h | 2 +- ortools/sat/zero_half_cuts.cc | 2 +- ortools/sat/zero_half_cuts.h | 2 +- 281 files changed, 647 insertions(+), 437 deletions(-) diff --git a/ortools/sat/all_different.cc b/ortools/sat/all_different.cc index 377987b566..10c28b6901 100644 --- a/ortools/sat/all_different.cc +++ b/ortools/sat/all_different.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/all_different.h b/ortools/sat/all_different.h index 2517df2016..fcba62b584 100644 --- a/ortools/sat/all_different.h +++ b/ortools/sat/all_different.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/boolean_problem.cc b/ortools/sat/boolean_problem.cc index b64d581869..f2f7fba38c 100644 --- a/ortools/sat/boolean_problem.cc +++ b/ortools/sat/boolean_problem.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/boolean_problem.h b/ortools/sat/boolean_problem.h index 99e0b970b1..0a9612197e 100644 --- a/ortools/sat/boolean_problem.h +++ b/ortools/sat/boolean_problem.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/boolean_problem.proto b/ortools/sat/boolean_problem.proto index 270c759953..450d7f5402 100644 --- a/ortools/sat/boolean_problem.proto +++ b/ortools/sat/boolean_problem.proto @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/circuit.cc b/ortools/sat/circuit.cc index 2f644a9461..4c77c6617e 100644 --- a/ortools/sat/circuit.cc +++ b/ortools/sat/circuit.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/circuit.h b/ortools/sat/circuit.h index 299dcbfba4..0147510008 100644 --- a/ortools/sat/circuit.h +++ b/ortools/sat/circuit.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/clause.cc b/ortools/sat/clause.cc index 0eb1cf13cc..45b168a275 100644 --- a/ortools/sat/clause.cc +++ b/ortools/sat/clause.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/clause.h b/ortools/sat/clause.h index 511ed3ec64..8a99fda48c 100644 --- a/ortools/sat/clause.h +++ b/ortools/sat/clause.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_constraints.cc b/ortools/sat/cp_constraints.cc index e81f3b688e..752c6ad111 100644 --- a/ortools/sat/cp_constraints.cc +++ b/ortools/sat/cp_constraints.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_constraints.h b/ortools/sat/cp_constraints.h index 8d1f5baf0b..114fd8da71 100644 --- a/ortools/sat/cp_constraints.h +++ b/ortools/sat/cp_constraints.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model.cc b/ortools/sat/cp_model.cc index 9d52d1518e..0344ca01d8 100644 --- a/ortools/sat/cp_model.cc +++ b/ortools/sat/cp_model.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model.h b/ortools/sat/cp_model.h index 092a74f6a1..a56b2ce0bd 100644 --- a/ortools/sat/cp_model.h +++ b/ortools/sat/cp_model.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model.proto b/ortools/sat/cp_model.proto index 59db9f96c1..f8f648dfb8 100644 --- a/ortools/sat/cp_model.proto +++ b/ortools/sat/cp_model.proto @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_checker.cc b/ortools/sat/cp_model_checker.cc index fb881740b2..f89cbf2261 100644 --- a/ortools/sat/cp_model_checker.cc +++ b/ortools/sat/cp_model_checker.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_checker.h b/ortools/sat/cp_model_checker.h index 165afd3fa6..ffbb8a2bfd 100644 --- a/ortools/sat/cp_model_checker.h +++ b/ortools/sat/cp_model_checker.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_expand.cc b/ortools/sat/cp_model_expand.cc index f3aac3455c..c8a4a5adb4 100644 --- a/ortools/sat/cp_model_expand.cc +++ b/ortools/sat/cp_model_expand.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_expand.h b/ortools/sat/cp_model_expand.h index 3c45b08418..6ad01188bf 100644 --- a/ortools/sat/cp_model_expand.h +++ b/ortools/sat/cp_model_expand.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_lns.cc b/ortools/sat/cp_model_lns.cc index fddec14744..2bde0e2303 100644 --- a/ortools/sat/cp_model_lns.cc +++ b/ortools/sat/cp_model_lns.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_lns.h b/ortools/sat/cp_model_lns.h index ff7a58dd29..41a43ea0f7 100644 --- a/ortools/sat/cp_model_lns.h +++ b/ortools/sat/cp_model_lns.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_loader.cc b/ortools/sat/cp_model_loader.cc index bd18196aae..4cc26e5f20 100644 --- a/ortools/sat/cp_model_loader.cc +++ b/ortools/sat/cp_model_loader.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_loader.h b/ortools/sat/cp_model_loader.h index 20d1babcac..506d73562b 100644 --- a/ortools/sat/cp_model_loader.h +++ b/ortools/sat/cp_model_loader.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_mapping.h b/ortools/sat/cp_model_mapping.h index 6269d441c5..7ee5215fae 100644 --- a/ortools/sat/cp_model_mapping.h +++ b/ortools/sat/cp_model_mapping.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_objective.cc b/ortools/sat/cp_model_objective.cc index b2ffe5e62d..f44c65b504 100644 --- a/ortools/sat/cp_model_objective.cc +++ b/ortools/sat/cp_model_objective.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_objective.h b/ortools/sat/cp_model_objective.h index 7b6c347230..01928e88fe 100644 --- a/ortools/sat/cp_model_objective.h +++ b/ortools/sat/cp_model_objective.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_postsolve.cc b/ortools/sat/cp_model_postsolve.cc index 2914f07c3d..61673125a0 100644 --- a/ortools/sat/cp_model_postsolve.cc +++ b/ortools/sat/cp_model_postsolve.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_postsolve.h b/ortools/sat/cp_model_postsolve.h index c7850fd328..1da224c39d 100644 --- a/ortools/sat/cp_model_postsolve.h +++ b/ortools/sat/cp_model_postsolve.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_presolve.cc b/ortools/sat/cp_model_presolve.cc index 262a73c69d..2fe14ea559 100644 --- a/ortools/sat/cp_model_presolve.cc +++ b/ortools/sat/cp_model_presolve.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_presolve.h b/ortools/sat/cp_model_presolve.h index 055a510994..efbfe26d5d 100644 --- a/ortools/sat/cp_model_presolve.h +++ b/ortools/sat/cp_model_presolve.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_search.cc b/ortools/sat/cp_model_search.cc index 080fae5d23..61728cbb99 100644 --- a/ortools/sat/cp_model_search.cc +++ b/ortools/sat/cp_model_search.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_search.h b/ortools/sat/cp_model_search.h index a26291df0d..2336778755 100644 --- a/ortools/sat/cp_model_search.h +++ b/ortools/sat/cp_model_search.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_service.proto b/ortools/sat/cp_model_service.proto index d42160f07c..bf268e985a 100644 --- a/ortools/sat/cp_model_service.proto +++ b/ortools/sat/cp_model_service.proto @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_solver.cc b/ortools/sat/cp_model_solver.cc index bb3460e392..30ba0936d4 100644 --- a/ortools/sat/cp_model_solver.cc +++ b/ortools/sat/cp_model_solver.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_solver.h b/ortools/sat/cp_model_solver.h index 2096f6996b..8096d2951c 100644 --- a/ortools/sat/cp_model_solver.h +++ b/ortools/sat/cp_model_solver.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_symmetries.cc b/ortools/sat/cp_model_symmetries.cc index c01107e27e..b6094d1aca 100644 --- a/ortools/sat/cp_model_symmetries.cc +++ b/ortools/sat/cp_model_symmetries.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_symmetries.h b/ortools/sat/cp_model_symmetries.h index 3b9a371233..742e046ad8 100644 --- a/ortools/sat/cp_model_symmetries.h +++ b/ortools/sat/cp_model_symmetries.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_utils.cc b/ortools/sat/cp_model_utils.cc index 3cd9d3d93a..b2da364dfe 100644 --- a/ortools/sat/cp_model_utils.cc +++ b/ortools/sat/cp_model_utils.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cp_model_utils.h b/ortools/sat/cp_model_utils.h index 8ebb2215f9..7d72a0fcab 100644 --- a/ortools/sat/cp_model_utils.h +++ b/ortools/sat/cp_model_utils.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/csharp/Constraints.cs b/ortools/sat/csharp/Constraints.cs index 7934a50fc0..1d8f32f285 100644 --- a/ortools/sat/csharp/Constraints.cs +++ b/ortools/sat/csharp/Constraints.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/csharp/CpModel.cs b/ortools/sat/csharp/CpModel.cs index ede3aeaba6..6a400111b2 100644 --- a/ortools/sat/csharp/CpModel.cs +++ b/ortools/sat/csharp/CpModel.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/csharp/CpSolver.cs b/ortools/sat/csharp/CpSolver.cs index 5be29a7f7c..cfc6dbe48e 100644 --- a/ortools/sat/csharp/CpSolver.cs +++ b/ortools/sat/csharp/CpSolver.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/csharp/IntegerExpressions.cs b/ortools/sat/csharp/IntegerExpressions.cs index 10e6640fb3..88eebbadf6 100644 --- a/ortools/sat/csharp/IntegerExpressions.cs +++ b/ortools/sat/csharp/IntegerExpressions.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/csharp/IntervalVariables.cs b/ortools/sat/csharp/IntervalVariables.cs index 990436ef8e..b639088882 100644 --- a/ortools/sat/csharp/IntervalVariables.cs +++ b/ortools/sat/csharp/IntervalVariables.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/csharp/SearchHelpers.cs b/ortools/sat/csharp/SearchHelpers.cs index 81e0f36495..4bd0c2f867 100644 --- a/ortools/sat/csharp/SearchHelpers.cs +++ b/ortools/sat/csharp/SearchHelpers.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/csharp/sat.i b/ortools/sat/csharp/sat.i index 0aa922e72f..5cb1bcb8dc 100644 --- a/ortools/sat/csharp/sat.i +++ b/ortools/sat/csharp/sat.i @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cumulative.cc b/ortools/sat/cumulative.cc index ce9ba618cc..6e2a85a9b6 100644 --- a/ortools/sat/cumulative.cc +++ b/ortools/sat/cumulative.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cumulative.h b/ortools/sat/cumulative.h index 821b2d65c7..2b74a4240b 100644 --- a/ortools/sat/cumulative.h +++ b/ortools/sat/cumulative.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cumulative_energy.cc b/ortools/sat/cumulative_energy.cc index 48c709c6b6..bed6994b5a 100644 --- a/ortools/sat/cumulative_energy.cc +++ b/ortools/sat/cumulative_energy.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cumulative_energy.h b/ortools/sat/cumulative_energy.h index 2050e570bb..2be4213df5 100644 --- a/ortools/sat/cumulative_energy.h +++ b/ortools/sat/cumulative_energy.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cuts.cc b/ortools/sat/cuts.cc index 1dd587e8ec..42412f1b05 100644 --- a/ortools/sat/cuts.cc +++ b/ortools/sat/cuts.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/cuts.h b/ortools/sat/cuts.h index 4d2eea9f8d..53935675ba 100644 --- a/ortools/sat/cuts.h +++ b/ortools/sat/cuts.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/diffn.cc b/ortools/sat/diffn.cc index 5a7a50936b..e97f50b2ed 100644 --- a/ortools/sat/diffn.cc +++ b/ortools/sat/diffn.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/diffn.h b/ortools/sat/diffn.h index 5ad96b615f..7cd2d56894 100644 --- a/ortools/sat/diffn.h +++ b/ortools/sat/diffn.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/diffn_util.cc b/ortools/sat/diffn_util.cc index 2c2da73e49..31d5971747 100644 --- a/ortools/sat/diffn_util.cc +++ b/ortools/sat/diffn_util.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/diffn_util.h b/ortools/sat/diffn_util.h index 2a8f647b86..bb23ad5914 100644 --- a/ortools/sat/diffn_util.h +++ b/ortools/sat/diffn_util.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/disjunctive.cc b/ortools/sat/disjunctive.cc index 78ed91f6b2..1f09a5c88e 100644 --- a/ortools/sat/disjunctive.cc +++ b/ortools/sat/disjunctive.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/disjunctive.h b/ortools/sat/disjunctive.h index 94770abe5a..580a1f944a 100644 --- a/ortools/sat/disjunctive.h +++ b/ortools/sat/disjunctive.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/drat_checker.cc b/ortools/sat/drat_checker.cc index 49dcbb4292..25f50ba0b6 100644 --- a/ortools/sat/drat_checker.cc +++ b/ortools/sat/drat_checker.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/drat_checker.h b/ortools/sat/drat_checker.h index b01dfd28dc..8f5f5e2ff4 100644 --- a/ortools/sat/drat_checker.h +++ b/ortools/sat/drat_checker.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/drat_proof_handler.cc b/ortools/sat/drat_proof_handler.cc index 5917e9fe1e..ce5f6120e7 100644 --- a/ortools/sat/drat_proof_handler.cc +++ b/ortools/sat/drat_proof_handler.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/drat_proof_handler.h b/ortools/sat/drat_proof_handler.h index 0c024861ea..7b05d821d2 100644 --- a/ortools/sat/drat_proof_handler.h +++ b/ortools/sat/drat_proof_handler.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/drat_writer.cc b/ortools/sat/drat_writer.cc index 89e6761b71..d566ee58be 100644 --- a/ortools/sat/drat_writer.cc +++ b/ortools/sat/drat_writer.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/drat_writer.h b/ortools/sat/drat_writer.h index 9208655bd0..e5a1f6464a 100644 --- a/ortools/sat/drat_writer.h +++ b/ortools/sat/drat_writer.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/encoding.cc b/ortools/sat/encoding.cc index 18feae420f..3bbe19560e 100644 --- a/ortools/sat/encoding.cc +++ b/ortools/sat/encoding.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/encoding.h b/ortools/sat/encoding.h index 5065ac1c3f..3126f6e76f 100644 --- a/ortools/sat/encoding.h +++ b/ortools/sat/encoding.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/feasibility_pump.cc b/ortools/sat/feasibility_pump.cc index f2b8fc3658..06b3a32fe7 100644 --- a/ortools/sat/feasibility_pump.cc +++ b/ortools/sat/feasibility_pump.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/feasibility_pump.h b/ortools/sat/feasibility_pump.h index 9fc8b1877f..c6b56a862d 100644 --- a/ortools/sat/feasibility_pump.h +++ b/ortools/sat/feasibility_pump.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/implied_bounds.cc b/ortools/sat/implied_bounds.cc index 4a9918edb8..0b4a6bc856 100644 --- a/ortools/sat/implied_bounds.cc +++ b/ortools/sat/implied_bounds.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/implied_bounds.h b/ortools/sat/implied_bounds.h index 49ebd3ca63..4f31c3b905 100644 --- a/ortools/sat/implied_bounds.h +++ b/ortools/sat/implied_bounds.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/inclusion.h b/ortools/sat/inclusion.h index cd2712315f..8f1b7cbdec 100644 --- a/ortools/sat/inclusion.h +++ b/ortools/sat/inclusion.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/integer.cc b/ortools/sat/integer.cc index 018e9ca38c..7cdae24ad6 100644 --- a/ortools/sat/integer.cc +++ b/ortools/sat/integer.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 @@ -1923,6 +1923,9 @@ bool GenericLiteralWatcher::Propagate(Trail* trail) { test_limit = 0; if (time_limit_->LimitReached()) break; } + if (stop_propagation_callback_ != nullptr && stop_propagation_callback_()) { + break; + } std::deque& queue = queue_by_priority_[priority]; while (!queue.empty()) { diff --git a/ortools/sat/integer.h b/ortools/sat/integer.h index 2054138dff..9b7e02a10d 100644 --- a/ortools/sat/integer.h +++ b/ortools/sat/integer.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 @@ -1337,6 +1337,15 @@ class GenericLiteralWatcher : public SatPropagator { level_zero_modified_variable_callback_.push_back(cb); } + // This will be called not too often during propagation (when we finish + // propagating one priority). If it returns true, we will stop propagation + // there. It is used by LbTreeSearch as we can stop as soon as the objective + // lower bound crossed a threshold and do not need to call expensive + // propagator when this is the case. + void SetStopPropagationCallback(std::function callback) { + stop_propagation_callback_ = callback; + } + // Returns the id of the propagator we are currently calling. This is meant // to be used from inside Propagate() in case a propagator was registered // more than once at different priority for instance. @@ -1390,6 +1399,8 @@ class GenericLiteralWatcher : public SatPropagator { std::vector&)>> level_zero_modified_variable_callback_; + std::function stop_propagation_callback_; + DISALLOW_COPY_AND_ASSIGN(GenericLiteralWatcher); }; diff --git a/ortools/sat/integer_expr.cc b/ortools/sat/integer_expr.cc index 765431a2b3..4c69419fcb 100644 --- a/ortools/sat/integer_expr.cc +++ b/ortools/sat/integer_expr.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 @@ -143,6 +143,40 @@ std::pair IntegerSumLE::ConditionalLb( } } +std::vector> +IntegerSumLE::ConditionalLbs(IntegerVariable target_var) const { + bool target_var_present_negatively = false; + IntegerValue target_coeff; + + // Compute the implied_lb excluding "- target_coeff * target". + IntegerValue implied_lb(-upper_bound_); + for (int i = 0; i < vars_.size(); ++i) { + const IntegerVariable var = vars_[i]; + const IntegerValue coeff = coeffs_[i]; + if (var == NegationOf(target_var)) { + target_coeff = coeff; + target_var_present_negatively = true; + continue; + } + implied_lb += coeff * integer_trail_->LowerBound(var); + } + + std::vector> result; + if (!target_var_present_negatively) return result; + + for (int i = 0; i < vars_.size(); ++i) { + const IntegerVariable var = vars_[i]; + const IntegerValue coeff = coeffs_[i]; + if (var == NegationOf(target_var)) continue; + + const IntegerValue lb = integer_trail_->LowerBound(var); + if (lb == integer_trail_->UpperBound(var)) continue; + result.push_back({IntegerLiteral::GreaterOrEqual(var, lb + 1), + CeilRatio(implied_lb + coeff, target_coeff)}); + } + return result; +} + bool IntegerSumLE::Propagate() { // Reified case: If any of the enforcement_literals are false, we ignore the // constraint. diff --git a/ortools/sat/integer_expr.h b/ortools/sat/integer_expr.h index eba9243eb4..271ff32a13 100644 --- a/ortools/sat/integer_expr.h +++ b/ortools/sat/integer_expr.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 @@ -84,6 +84,12 @@ class IntegerSumLE : public PropagatorInterface { std::pair ConditionalLb( IntegerLiteral integer_literal, IntegerVariable target_var) const; + // Experimental. Similar to ConditionalLb(), but returns all interesting + // conditional lower bounds instead of just analyzing one integer literal. + // All the IntegerLiteral will be of the form >= var_lb + 1. + std::vector> ConditionalLbs( + IntegerVariable target_var) const; + private: // Fills integer_reason_ with all the current lower_bounds. The real // explanation may require removing one of them, but as an optimization, we @@ -118,8 +124,6 @@ class IntegerSumLE : public PropagatorInterface { // Parallel vectors. std::vector integer_reason_; std::vector reason_coeffs_; - - DISALLOW_COPY_AND_ASSIGN(IntegerSumLE); }; // This assumes target = SUM_i coeffs[i] * vars[i], and detects that the target diff --git a/ortools/sat/integer_search.cc b/ortools/sat/integer_search.cc index c74fc44293..d17cfef0a2 100644 --- a/ortools/sat/integer_search.cc +++ b/ortools/sat/integer_search.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/integer_search.h b/ortools/sat/integer_search.h index 04de6b5ffb..bc0d9dee7b 100644 --- a/ortools/sat/integer_search.h +++ b/ortools/sat/integer_search.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/intervals.cc b/ortools/sat/intervals.cc index bd16c20f27..731f8f51b2 100644 --- a/ortools/sat/intervals.cc +++ b/ortools/sat/intervals.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/intervals.h b/ortools/sat/intervals.h index 614dddfeb4..4c113cd95e 100644 --- a/ortools/sat/intervals.h +++ b/ortools/sat/intervals.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/java/sat.i b/ortools/sat/java/sat.i index 807fc23dad..299851cf15 100644 --- a/ortools/sat/java/sat.i +++ b/ortools/sat/java/sat.i @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/lb_tree_search.cc b/ortools/sat/lb_tree_search.cc index 42ab67c639..06071cc690 100644 --- a/ortools/sat/lb_tree_search.cc +++ b/ortools/sat/lb_tree_search.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 @@ -50,7 +50,9 @@ LbTreeSearch::LbTreeSearch(Model* model) random_(model->GetOrCreate()), sat_solver_(model->GetOrCreate()), integer_encoder_(model->GetOrCreate()), + trail_(model->GetOrCreate()), integer_trail_(model->GetOrCreate()), + watcher_(model->GetOrCreate()), shared_response_(model->GetOrCreate()), sat_decision_(model->GetOrCreate()), search_helper_(model->GetOrCreate()), @@ -171,14 +173,17 @@ bool LbTreeSearch::FullRestart() { } void LbTreeSearch::MarkAsDeletedNodeAndUnreachableSubtree(Node& node) { - std::vector to_delete; - if (sat_solver_->Assignment().LiteralIsTrue(node.literal)) { - to_delete.push_back(node.false_child); - } else { - to_delete.push_back(node.true_child); - } --num_nodes_in_tree_; node.is_deleted = true; + if (sat_solver_->Assignment().LiteralIsTrue(node.literal)) { + MarkSubtreeAsDeleted(node.false_child); + } else { + MarkSubtreeAsDeleted(node.true_child); + } +} + +void LbTreeSearch::MarkSubtreeAsDeleted(NodeIndex root) { + std::vector to_delete{root}; for (int i = 0; i < to_delete.size(); ++i) { const NodeIndex n = to_delete[i]; if (n >= nodes_.size()) continue; @@ -232,6 +237,12 @@ SatSolver::Status LbTreeSearch::Search( // this is assumed constant for one iteration. current_objective_lb_ = shared_response_->GetInnerObjectiveLowerBound(); + // If some branches already have a good lower bound, no need to call the LP + // on those. + watcher_->SetStopPropagationCallback([this] { + return integer_trail_->LowerBound(objective_var_) > current_objective_lb_; + }); + // Propagate upward in the tree the new objective lb. if (!current_branch_.empty()) { // Our branch is always greater or equal to the level. @@ -407,6 +418,18 @@ SatSolver::Status LbTreeSearch::Search( } CHECK_EQ(node.MinObjective(), current_objective_lb_) << level; + // If a node do not improve the current_objective_lb_, we basically + // have no information in this subtree, so we can just restart it. + // + // TODO(user): Experiment with this. We can also delete this node. + // Initial tests shows this is worse though. + if (false && node.false_objective == node.true_objective) { + MarkSubtreeAsDeleted(node.true_child); + MarkSubtreeAsDeleted(node.false_child); + node.true_child = NodeIndex(std::numeric_limits::max()); + node.false_child = NodeIndex(std::numeric_limits::max()); + } + // This will be set to the next node index. NodeIndex n; @@ -440,7 +463,13 @@ SatSolver::Status LbTreeSearch::Search( if (nodes_[parent].MinObjective() > current_objective_lb_) break; } } else { + // See if we have better bounds using the current LP state. + ExploitReducedCosts(current_branch_[level]); + // If both lower bound are the same, we pick a random sub-branch. + // + // TODO(user): Instead always follow the literal branch? The polarity + // was chosen by the heuritic for a reason. num_decisions_taken_++; const bool choose_true = node.true_objective == node.false_objective @@ -508,84 +537,194 @@ SatSolver::Status LbTreeSearch::Search( continue; } - // Increase the size of the tree by exploring a new decision. - const LiteralIndex decision = - search_helper_->GetDecision(search_heuristic_); + // We are about to take a new decision, what we will do is dive until + // the objective lower bound increase. we will then create a bunch of new + // nodes in the tree. + // + // By analyzing the reason for the increase, we can create less nodes than + // if we just followed the initial heuristic. + // + // TODO(user): In multithread, this change the behavior a lot since we + // dive until we beat the best shared bound. Maybe we shouldn't do that. + const int base_level = sat_solver_->CurrentDecisionLevel(); + while (true) { + const LiteralIndex decision = + search_helper_->GetDecision(search_heuristic_); - // No new decision: search done. - if (time_limit_->LimitReached()) return SatSolver::LIMIT_REACHED; - if (decision == kNoLiteralIndex) { - feasible_solution_observer(); - continue; + // No new decision: search done. + if (time_limit_->LimitReached()) return SatSolver::LIMIT_REACHED; + if (decision == kNoLiteralIndex) { + feasible_solution_observer(); + break; + } + + if (!search_helper_->TakeDecision(Literal(decision))) { + return sat_solver_->UnsatStatus(); + } + if (sat_solver_->CurrentDecisionLevel() < base_level) break; + if (integer_trail_->LowerBound(objective_var_) > current_objective_lb_) { + break; + } + } + if (sat_solver_->CurrentDecisionLevel() <= base_level) continue; + + // Analyse the reason for objective increase. Deduce a set of new nodes to + // append to the tree. + const std::vector reason = + integer_trail_->ReasonFor(IntegerLiteral::GreaterOrEqual( + objective_var_, integer_trail_->LowerBound(objective_var_))); + const std::vector decisions = ExtractDecisions(base_level, reason); + + // Bump activities. + sat_decision_->BumpVariableActivities(reason); + sat_decision_->BumpVariableActivities(decisions); + sat_decision_->UpdateVariableActivityIncrement(); + + // Create one node per new decisions. + const int old_size = current_branch_.size(); + CHECK_EQ(current_branch_.size(), base_level); + for (const Literal d : decisions) { + AppendNewNodeToCurrentBranch(d); } - // Create a new node. - // Note that the decision will be pushed to the solver on the next loop. - const NodeIndex n(nodes_.size()); - ++num_nodes_in_tree_; - nodes_.emplace_back(Literal(decision), - std::max(current_objective_lb_, - integer_trail_->LowerBound(objective_var_))); + // Update the objective of the last node in the branch since we just + // improved that. if (!current_branch_.empty()) { - const NodeIndex parent = current_branch_.back(); - if (sat_solver_->Assignment().LiteralIsTrue(nodes_[parent].literal)) { - nodes_[parent].true_child = n; - nodes_[parent].UpdateTrueObjective(nodes_.back().MinObjective()); + Node& n = nodes_[current_branch_.back()]; + if (sat_solver_->Assignment().LiteralIsTrue(n.literal)) { + n.UpdateTrueObjective(integer_trail_->LowerBound(objective_var_)); } else { - CHECK(sat_solver_->Assignment().LiteralIsFalse(nodes_[parent].literal)); - nodes_[parent].false_child = n; - nodes_[parent].UpdateFalseObjective(nodes_.back().MinObjective()); + n.UpdateFalseObjective(integer_trail_->LowerBound(objective_var_)); } } - current_branch_.push_back(n); - // Looking at the reduced costs, we can already have a bound for one of the - // branch. Increasing the corresponding objective can save some branches, - // and also allow for a more incremental LP solving since we do less back - // and forth. + // Reset the solver to a correct state since we have a subset of the + // current propagation. // - // TODO(user): The code to recover that is a bit convoluted. Alternatively - // Maybe we should do a "fast" propagation without the LP in each branch. - // That will work as long as we keep these optimal LP constraints around - // and propagate them. + // TODO(user): no need to backtrack if the prefix is correct? + sat_solver_->Backtrack(base_level); + + // Update bounds with reduced costs info. // - // TODO(user): Incorporate this in the heuristic so we choose more Boolean - // inside these LP explanations? - if (lp_constraint_ != nullptr) { - // Note that this return literal EQUIVALENT to the decision, not just - // implied by it. We need that for correctness. - int num_tests = 0; - for (const IntegerLiteral integer_literal : - integer_encoder_->GetIntegerLiterals(Literal(decision))) { - if (integer_trail_->IsCurrentlyIgnored(integer_literal.var)) continue; - - // To avoid bad corner case. Not sure it ever triggers. - if (++num_tests > 10) break; - - // TODO(user): we could consider earlier constraint instead of just - // looking at the last one, but experiments didn't really show a big - // gain. - const auto& cts = lp_constraint_->OptimalConstraints(); - if (cts.empty()) continue; - - const std::unique_ptr& rc = cts.back(); - const std::pair bounds = - rc->ConditionalLb(integer_literal, objective_var_); - Node& node = nodes_[n]; - if (bounds.first > node.false_objective) { - ++num_rc_detected_; - node.UpdateFalseObjective(bounds.first); - } - if (bounds.second > node.true_objective) { - ++num_rc_detected_; - node.UpdateTrueObjective(bounds.second); - } - } + // TODO(user): Uses old optimal constraint that we just potentially + // backtracked over? + // + // TODO(user): We could do all at once rather than in O(#decision * #size). + for (int i = old_size; i < current_branch_.size(); ++i) { + ExploitReducedCosts(current_branch_[i]); } } return SatSolver::LIMIT_REACHED; } +std::vector LbTreeSearch::ExtractDecisions( + int base_level, const std::vector& conflict) { + std::vector num_per_level(sat_solver_->CurrentDecisionLevel() + 1, 0); + std::vector is_marked; + for (const Literal l : conflict) { + const AssignmentInfo& info = trail_->Info(l.Variable()); + if (info.level <= base_level) continue; + num_per_level[info.level]++; + if (info.trail_index >= is_marked.size()) { + is_marked.resize(info.trail_index + 1); + } + is_marked[info.trail_index] = true; + } + + std::vector result; + if (is_marked.empty()) return result; + for (int i = is_marked.size() - 1; i >= 0; --i) { + if (!is_marked[i]) continue; + + const Literal l = (*trail_)[i]; + const AssignmentInfo& info = trail_->Info(l.Variable()); + if (info.level <= base_level) break; + if (num_per_level[info.level] == 1) { + result.push_back(l); + continue; + } + + // Expand. + num_per_level[info.level]--; + for (const Literal new_l : trail_->Reason(l.Variable())) { + const AssignmentInfo& new_info = trail_->Info(new_l.Variable()); + if (new_info.level <= base_level) continue; + if (is_marked[new_info.trail_index]) continue; + is_marked[new_info.trail_index] = true; + num_per_level[new_info.level]++; + } + } + + // We prefer to keep the same order. + std::reverse(result.begin(), result.end()); + return result; +} + +void LbTreeSearch::AppendNewNodeToCurrentBranch(Literal decision) { + const NodeIndex n(nodes_.size()); + ++num_nodes_in_tree_; + nodes_.emplace_back(Literal(decision), current_objective_lb_); + if (!current_branch_.empty()) { + const NodeIndex parent = current_branch_.back(); + if (sat_solver_->Assignment().LiteralIsTrue(nodes_[parent].literal)) { + nodes_[parent].true_child = n; + nodes_[parent].UpdateTrueObjective(nodes_.back().MinObjective()); + } else { + CHECK(sat_solver_->Assignment().LiteralIsFalse(nodes_[parent].literal)); + nodes_[parent].false_child = n; + nodes_[parent].UpdateFalseObjective(nodes_.back().MinObjective()); + } + } + current_branch_.push_back(n); +} + +// Looking at the reduced costs, we can already have a bound for one of the +// branch. Increasing the corresponding objective can save some branches, +// and also allow for a more incremental LP solving since we do less back +// and forth. +// +// TODO(user): The code to recover that is a bit convoluted. Alternatively +// Maybe we should do a "fast" propagation without the LP in each branch. +// That will work as long as we keep these optimal LP constraints around +// and propagate them. +// +// TODO(user): Incorporate this in the heuristic so we choose more Booleans +// inside these LP explanations? +void LbTreeSearch::ExploitReducedCosts(NodeIndex n) { + if (lp_constraint_ == nullptr) return; + + // TODO(user): we could consider earlier constraints instead of just + // looking at the last one, but experiments didn't really show a big + // gain. + const auto& cts = lp_constraint_->OptimalConstraints(); + if (cts.empty()) return; + const std::unique_ptr& rc = cts.back(); + + // Note that this return literal EQUIVALENT to the node.literal, not just + // implied by it. We need that for correctness. + int num_tests = 0; + Node& node = nodes_[n]; + CHECK(!sat_solver_->Assignment().LiteralIsAssigned(node.literal)); + for (const IntegerLiteral integer_literal : + integer_encoder_->GetIntegerLiterals(node.literal)) { + if (integer_trail_->IsCurrentlyIgnored(integer_literal.var)) continue; + + // To avoid bad corner case. Not sure it ever triggers. + if (++num_tests > 10) break; + + const std::pair bounds = + rc->ConditionalLb(integer_literal, objective_var_); + if (bounds.first > node.false_objective) { + ++num_rc_detected_; + node.UpdateFalseObjective(bounds.first); + } + if (bounds.second > node.true_objective) { + ++num_rc_detected_; + node.UpdateTrueObjective(bounds.second); + } + } +} + } // namespace sat } // namespace operations_research diff --git a/ortools/sat/lb_tree_search.h b/ortools/sat/lb_tree_search.h index aa76658d85..e78caf1f2a 100644 --- a/ortools/sat/lb_tree_search.h +++ b/ortools/sat/lb_tree_search.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 @@ -119,6 +119,19 @@ class LbTreeSearch { // Mark the given node as deleted. Its literal is assumed to be set. We also // delete the subtree that is not longer relevant. void MarkAsDeletedNodeAndUnreachableSubtree(Node& node); + void MarkSubtreeAsDeleted(NodeIndex root); + + // Create a new node at the end of the current branch. + // This assume the last decision in the branch is assigned. + void AppendNewNodeToCurrentBranch(Literal decision); + + // Update the bounds on the given nodes by using reduced costs if possible. + void ExploitReducedCosts(NodeIndex n); + + // Returns a small number of decision needed to reach the same conflict. + // We basically reduce the number of decision at each level to 1. + std::vector ExtractDecisions(int base_level, + const std::vector& conflict); // Used in the solve logs. std::string SmallProgressString() const; @@ -128,7 +141,9 @@ class LbTreeSearch { ModelRandomGenerator* random_; SatSolver* sat_solver_; IntegerEncoder* integer_encoder_; + Trail* trail_; IntegerTrail* integer_trail_; + GenericLiteralWatcher* watcher_; SharedResponseManager* shared_response_; SatDecisionPolicy* sat_decision_; IntegerSearchHelper* search_helper_; diff --git a/ortools/sat/linear_constraint.cc b/ortools/sat/linear_constraint.cc index ca2097066e..0846778433 100644 --- a/ortools/sat/linear_constraint.cc +++ b/ortools/sat/linear_constraint.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/linear_constraint.h b/ortools/sat/linear_constraint.h index 381199a462..8b9146a3f2 100644 --- a/ortools/sat/linear_constraint.h +++ b/ortools/sat/linear_constraint.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/linear_constraint_manager.cc b/ortools/sat/linear_constraint_manager.cc index 3dd2967465..b1093b7c36 100644 --- a/ortools/sat/linear_constraint_manager.cc +++ b/ortools/sat/linear_constraint_manager.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/linear_constraint_manager.h b/ortools/sat/linear_constraint_manager.h index 7c05e04080..5843e2e676 100644 --- a/ortools/sat/linear_constraint_manager.h +++ b/ortools/sat/linear_constraint_manager.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/linear_programming_constraint.cc b/ortools/sat/linear_programming_constraint.cc index 3f840d11da..9be0da5565 100644 --- a/ortools/sat/linear_programming_constraint.cc +++ b/ortools/sat/linear_programming_constraint.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/linear_programming_constraint.h b/ortools/sat/linear_programming_constraint.h index db7bdd2bc6..d68aa1094b 100644 --- a/ortools/sat/linear_programming_constraint.h +++ b/ortools/sat/linear_programming_constraint.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/linear_relaxation.cc b/ortools/sat/linear_relaxation.cc index 1240818293..f9f5756244 100644 --- a/ortools/sat/linear_relaxation.cc +++ b/ortools/sat/linear_relaxation.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/linear_relaxation.h b/ortools/sat/linear_relaxation.h index 3eca84e0cb..e60178a60e 100644 --- a/ortools/sat/linear_relaxation.h +++ b/ortools/sat/linear_relaxation.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/lp_utils.cc b/ortools/sat/lp_utils.cc index d8ae326290..6bb0b9e2d0 100644 --- a/ortools/sat/lp_utils.cc +++ b/ortools/sat/lp_utils.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/lp_utils.h b/ortools/sat/lp_utils.h index 5d8b5b9849..3f35fb98ad 100644 --- a/ortools/sat/lp_utils.h +++ b/ortools/sat/lp_utils.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/max_hs.cc b/ortools/sat/max_hs.cc index bd3317e0b2..9413b06901 100644 --- a/ortools/sat/max_hs.cc +++ b/ortools/sat/max_hs.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/max_hs.h b/ortools/sat/max_hs.h index c1801fa6d6..96349263c1 100644 --- a/ortools/sat/max_hs.h +++ b/ortools/sat/max_hs.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/model.h b/ortools/sat/model.h index d64a679784..9696734535 100644 --- a/ortools/sat/model.h +++ b/ortools/sat/model.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/optimization.cc b/ortools/sat/optimization.cc index 4dd98aa9c8..580cbd3697 100644 --- a/ortools/sat/optimization.cc +++ b/ortools/sat/optimization.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/optimization.h b/ortools/sat/optimization.h index 56371e1fde..5dfdbf2ca1 100644 --- a/ortools/sat/optimization.h +++ b/ortools/sat/optimization.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/parameters_validation.cc b/ortools/sat/parameters_validation.cc index 2935b2cfb9..cd22eaae35 100644 --- a/ortools/sat/parameters_validation.cc +++ b/ortools/sat/parameters_validation.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/parameters_validation.h b/ortools/sat/parameters_validation.h index 6ff902637a..292a100d12 100644 --- a/ortools/sat/parameters_validation.h +++ b/ortools/sat/parameters_validation.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/pb_constraint.cc b/ortools/sat/pb_constraint.cc index aedb917aab..b14c9a574f 100644 --- a/ortools/sat/pb_constraint.cc +++ b/ortools/sat/pb_constraint.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/pb_constraint.h b/ortools/sat/pb_constraint.h index 0fcf9f44a9..6f665878b3 100644 --- a/ortools/sat/pb_constraint.h +++ b/ortools/sat/pb_constraint.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/precedences.cc b/ortools/sat/precedences.cc index 83c76bc342..b0267ede2b 100644 --- a/ortools/sat/precedences.cc +++ b/ortools/sat/precedences.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 @@ -861,12 +861,10 @@ int PrecedencesPropagator:: for (const ArcIndex arc_index : incoming_arcs_[target]) { const Literal literal = arcs_[arc_index].presence_literals.front(); if (solver->Assignment().LiteralIsFalse(literal)) continue; - - const int old_level = solver->CurrentDecisionLevel(); - solver->EnqueueDecisionAndBacktrackOnConflict(literal.Negated()); - if (solver->IsModelUnsat()) return num_added_constraints; - const int new_level = solver->CurrentDecisionLevel(); - if (new_level <= old_level) { + const SatSolver::Status status = + solver->EnqueueDecisionAndBacktrackOnConflict(literal.Negated()); + if (status == SatSolver::INFEASIBLE) return num_added_constraints; + if (status == SatSolver::ASSUMPTIONS_UNSAT) { clause = solver->GetLastIncompatibleDecisions(); break; } diff --git a/ortools/sat/precedences.h b/ortools/sat/precedences.h index 44545b065d..2cb5100389 100644 --- a/ortools/sat/precedences.h +++ b/ortools/sat/precedences.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/presolve_context.cc b/ortools/sat/presolve_context.cc index 6a314be040..7bca2bd0d6 100644 --- a/ortools/sat/presolve_context.cc +++ b/ortools/sat/presolve_context.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/presolve_context.h b/ortools/sat/presolve_context.h index 80326b078d..cf82491bc0 100644 --- a/ortools/sat/presolve_context.h +++ b/ortools/sat/presolve_context.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/presolve_util.cc b/ortools/sat/presolve_util.cc index 517d684d91..535ec0f882 100644 --- a/ortools/sat/presolve_util.cc +++ b/ortools/sat/presolve_util.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/presolve_util.h b/ortools/sat/presolve_util.h index c016b264e4..7142fefba6 100644 --- a/ortools/sat/presolve_util.h +++ b/ortools/sat/presolve_util.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/probing.cc b/ortools/sat/probing.cc index 0b7e4e6ccf..8b0dc3d541 100644 --- a/ortools/sat/probing.cc +++ b/ortools/sat/probing.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/probing.h b/ortools/sat/probing.h index e12cd04901..64aa880230 100644 --- a/ortools/sat/probing.h +++ b/ortools/sat/probing.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/pseudo_costs.cc b/ortools/sat/pseudo_costs.cc index 599b8da726..0a0d85d00c 100644 --- a/ortools/sat/pseudo_costs.cc +++ b/ortools/sat/pseudo_costs.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/pseudo_costs.h b/ortools/sat/pseudo_costs.h index 37551b9d7e..9fa9f87651 100644 --- a/ortools/sat/pseudo_costs.h +++ b/ortools/sat/pseudo_costs.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/python/cp_model.py b/ortools/sat/python/cp_model.py index ae5df369a3..f3a5170868 100644 --- a/ortools/sat/python/cp_model.py +++ b/ortools/sat/python/cp_model.py @@ -1,4 +1,4 @@ -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/python/cp_model_helper.py b/ortools/sat/python/cp_model_helper.py index c185ee0abe..4d2522a7ce 100644 --- a/ortools/sat/python/cp_model_helper.py +++ b/ortools/sat/python/cp_model_helper.py @@ -1,4 +1,4 @@ -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/python/swig_helper.cc b/ortools/sat/python/swig_helper.cc index 885b1cea7f..33f70dd712 100644 --- a/ortools/sat/python/swig_helper.cc +++ b/ortools/sat/python/swig_helper.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/python/visualization.py b/ortools/sat/python/visualization.py index 5af130b7f5..5de06f7e9d 100644 --- a/ortools/sat/python/visualization.py +++ b/ortools/sat/python/visualization.py @@ -1,4 +1,4 @@ -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/restart.cc b/ortools/sat/restart.cc index ff28cf5828..22aaa550b0 100644 --- a/ortools/sat/restart.cc +++ b/ortools/sat/restart.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/restart.h b/ortools/sat/restart.h index 4549a29c86..bc74d23928 100644 --- a/ortools/sat/restart.h +++ b/ortools/sat/restart.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/rins.cc b/ortools/sat/rins.cc index aaaa06a600..89897bbc37 100644 --- a/ortools/sat/rins.cc +++ b/ortools/sat/rins.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/rins.h b/ortools/sat/rins.h index 6cd8acffbe..c5eeaf6e18 100644 --- a/ortools/sat/rins.h +++ b/ortools/sat/rins.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/AssignmentGroupsSat.cs b/ortools/sat/samples/AssignmentGroupsSat.cs index eaa69ab8f5..39c43205d3 100644 --- a/ortools/sat/samples/AssignmentGroupsSat.cs +++ b/ortools/sat/samples/AssignmentGroupsSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/AssignmentGroupsSat.java b/ortools/sat/samples/AssignmentGroupsSat.java index b44493635f..992247d9bc 100644 --- a/ortools/sat/samples/AssignmentGroupsSat.java +++ b/ortools/sat/samples/AssignmentGroupsSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/AssignmentSat.cs b/ortools/sat/samples/AssignmentSat.cs index 6ecaa0e9d5..9333ea0ab3 100644 --- a/ortools/sat/samples/AssignmentSat.cs +++ b/ortools/sat/samples/AssignmentSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/AssignmentSat.java b/ortools/sat/samples/AssignmentSat.java index 3f490784a4..e847fec540 100644 --- a/ortools/sat/samples/AssignmentSat.java +++ b/ortools/sat/samples/AssignmentSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/AssignmentTaskSizesSat.cs b/ortools/sat/samples/AssignmentTaskSizesSat.cs index 78287626fc..d5289e80a6 100644 --- a/ortools/sat/samples/AssignmentTaskSizesSat.cs +++ b/ortools/sat/samples/AssignmentTaskSizesSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/AssignmentTaskSizesSat.java b/ortools/sat/samples/AssignmentTaskSizesSat.java index 8596223d78..931aa4d67a 100644 --- a/ortools/sat/samples/AssignmentTaskSizesSat.java +++ b/ortools/sat/samples/AssignmentTaskSizesSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/AssignmentTeamsSat.cs b/ortools/sat/samples/AssignmentTeamsSat.cs index 45a40af66b..60d75eb148 100644 --- a/ortools/sat/samples/AssignmentTeamsSat.cs +++ b/ortools/sat/samples/AssignmentTeamsSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/AssignmentTeamsSat.java b/ortools/sat/samples/AssignmentTeamsSat.java index 6058a8fe9a..4d4eee39e6 100644 --- a/ortools/sat/samples/AssignmentTeamsSat.java +++ b/ortools/sat/samples/AssignmentTeamsSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/AssumptionsSampleSat.cs b/ortools/sat/samples/AssumptionsSampleSat.cs index 96f8b43af6..da4b906ed1 100644 --- a/ortools/sat/samples/AssumptionsSampleSat.cs +++ b/ortools/sat/samples/AssumptionsSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2021 Xiang Chen +// Copyright 2010-2022 Xiang Chen // 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 diff --git a/ortools/sat/samples/AssumptionsSampleSat.java b/ortools/sat/samples/AssumptionsSampleSat.java index 9e9d7a9ce5..9f9f46412d 100644 --- a/ortools/sat/samples/AssumptionsSampleSat.java +++ b/ortools/sat/samples/AssumptionsSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2021 Xiang Chen +// Copyright 2010-2022 Xiang Chen // 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 diff --git a/ortools/sat/samples/BinPackingProblemSat.cs b/ortools/sat/samples/BinPackingProblemSat.cs index 13462032e7..ab49c293e7 100644 --- a/ortools/sat/samples/BinPackingProblemSat.cs +++ b/ortools/sat/samples/BinPackingProblemSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/BinPackingProblemSat.java b/ortools/sat/samples/BinPackingProblemSat.java index 7d6df08cfa..305934fcf4 100644 --- a/ortools/sat/samples/BinPackingProblemSat.java +++ b/ortools/sat/samples/BinPackingProblemSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/BoolOrSampleSat.cs b/ortools/sat/samples/BoolOrSampleSat.cs index e7bb7c21d1..6ced24bb50 100644 --- a/ortools/sat/samples/BoolOrSampleSat.cs +++ b/ortools/sat/samples/BoolOrSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/BoolOrSampleSat.java b/ortools/sat/samples/BoolOrSampleSat.java index d1faa0b4b8..616d7eaec6 100644 --- a/ortools/sat/samples/BoolOrSampleSat.java +++ b/ortools/sat/samples/BoolOrSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/ChannelingSampleSat.cs b/ortools/sat/samples/ChannelingSampleSat.cs index 7b03367c0a..d77f1c9f19 100644 --- a/ortools/sat/samples/ChannelingSampleSat.cs +++ b/ortools/sat/samples/ChannelingSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/ChannelingSampleSat.java b/ortools/sat/samples/ChannelingSampleSat.java index fa7e15303f..8d9408618d 100644 --- a/ortools/sat/samples/ChannelingSampleSat.java +++ b/ortools/sat/samples/ChannelingSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/CpIsFunSat.cs b/ortools/sat/samples/CpIsFunSat.cs index ed87a79288..6ae654a32c 100644 --- a/ortools/sat/samples/CpIsFunSat.cs +++ b/ortools/sat/samples/CpIsFunSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/CpIsFunSat.java b/ortools/sat/samples/CpIsFunSat.java index d1bd3acfc1..e2361feb73 100644 --- a/ortools/sat/samples/CpIsFunSat.java +++ b/ortools/sat/samples/CpIsFunSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/CpSatExample.cs b/ortools/sat/samples/CpSatExample.cs index a6d93100b1..2384726e6d 100644 --- a/ortools/sat/samples/CpSatExample.cs +++ b/ortools/sat/samples/CpSatExample.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/CpSatExample.java b/ortools/sat/samples/CpSatExample.java index 75ccd8730e..1cd96a222f 100644 --- a/ortools/sat/samples/CpSatExample.java +++ b/ortools/sat/samples/CpSatExample.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/EarlinessTardinessCostSampleSat.cs b/ortools/sat/samples/EarlinessTardinessCostSampleSat.cs index 4b9c470dff..14f23613b7 100644 --- a/ortools/sat/samples/EarlinessTardinessCostSampleSat.cs +++ b/ortools/sat/samples/EarlinessTardinessCostSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/EarlinessTardinessCostSampleSat.java b/ortools/sat/samples/EarlinessTardinessCostSampleSat.java index 6758dd0f73..2688be213c 100644 --- a/ortools/sat/samples/EarlinessTardinessCostSampleSat.java +++ b/ortools/sat/samples/EarlinessTardinessCostSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/IntervalSampleSat.cs b/ortools/sat/samples/IntervalSampleSat.cs index 2636a0d4c5..8820fb6852 100644 --- a/ortools/sat/samples/IntervalSampleSat.cs +++ b/ortools/sat/samples/IntervalSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/IntervalSampleSat.java b/ortools/sat/samples/IntervalSampleSat.java index 00eaeaec70..f7e41b7407 100644 --- a/ortools/sat/samples/IntervalSampleSat.java +++ b/ortools/sat/samples/IntervalSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/LiteralSampleSat.cs b/ortools/sat/samples/LiteralSampleSat.cs index 389fc52352..c91eb5235d 100644 --- a/ortools/sat/samples/LiteralSampleSat.cs +++ b/ortools/sat/samples/LiteralSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/LiteralSampleSat.java b/ortools/sat/samples/LiteralSampleSat.java index ec2db0722c..40e73bd8e5 100644 --- a/ortools/sat/samples/LiteralSampleSat.java +++ b/ortools/sat/samples/LiteralSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/MinimalJobshopSat.cs b/ortools/sat/samples/MinimalJobshopSat.cs index 6c071a3e70..9c856c28a9 100644 --- a/ortools/sat/samples/MinimalJobshopSat.cs +++ b/ortools/sat/samples/MinimalJobshopSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/MinimalJobshopSat.java b/ortools/sat/samples/MinimalJobshopSat.java index 905fb5d185..2960ad47cc 100644 --- a/ortools/sat/samples/MinimalJobshopSat.java +++ b/ortools/sat/samples/MinimalJobshopSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/MultipleKnapsackSat.cs b/ortools/sat/samples/MultipleKnapsackSat.cs index 9ce40de09c..e2b17f7383 100644 --- a/ortools/sat/samples/MultipleKnapsackSat.cs +++ b/ortools/sat/samples/MultipleKnapsackSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/MultipleKnapsackSat.java b/ortools/sat/samples/MultipleKnapsackSat.java index 4963b877b1..c381e0151d 100644 --- a/ortools/sat/samples/MultipleKnapsackSat.java +++ b/ortools/sat/samples/MultipleKnapsackSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/NQueensSat.cs b/ortools/sat/samples/NQueensSat.cs index cadb219403..005b769634 100644 --- a/ortools/sat/samples/NQueensSat.cs +++ b/ortools/sat/samples/NQueensSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/NQueensSat.java b/ortools/sat/samples/NQueensSat.java index d2a0465b05..73c78374b1 100644 --- a/ortools/sat/samples/NQueensSat.java +++ b/ortools/sat/samples/NQueensSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/NoOverlapSampleSat.cs b/ortools/sat/samples/NoOverlapSampleSat.cs index 83915b4ef0..f0dffad69f 100644 --- a/ortools/sat/samples/NoOverlapSampleSat.cs +++ b/ortools/sat/samples/NoOverlapSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/NoOverlapSampleSat.java b/ortools/sat/samples/NoOverlapSampleSat.java index 896408a16f..ed3cd59d2e 100644 --- a/ortools/sat/samples/NoOverlapSampleSat.java +++ b/ortools/sat/samples/NoOverlapSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/NursesSat.cs b/ortools/sat/samples/NursesSat.cs index 8f0febd5ec..50522fa395 100644 --- a/ortools/sat/samples/NursesSat.cs +++ b/ortools/sat/samples/NursesSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/NursesSat.java b/ortools/sat/samples/NursesSat.java index ae05941921..68ee042b0c 100644 --- a/ortools/sat/samples/NursesSat.java +++ b/ortools/sat/samples/NursesSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/OptionalIntervalSampleSat.cs b/ortools/sat/samples/OptionalIntervalSampleSat.cs index 24be876f4a..e7247ecc81 100644 --- a/ortools/sat/samples/OptionalIntervalSampleSat.cs +++ b/ortools/sat/samples/OptionalIntervalSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/OptionalIntervalSampleSat.java b/ortools/sat/samples/OptionalIntervalSampleSat.java index 0cbfb7a951..f7d7754a2d 100644 --- a/ortools/sat/samples/OptionalIntervalSampleSat.java +++ b/ortools/sat/samples/OptionalIntervalSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/RabbitsAndPheasantsSat.cs b/ortools/sat/samples/RabbitsAndPheasantsSat.cs index da5f5ebee8..db1cd289ad 100644 --- a/ortools/sat/samples/RabbitsAndPheasantsSat.cs +++ b/ortools/sat/samples/RabbitsAndPheasantsSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/RabbitsAndPheasantsSat.java b/ortools/sat/samples/RabbitsAndPheasantsSat.java index 94fcf91419..4ff33a9a17 100644 --- a/ortools/sat/samples/RabbitsAndPheasantsSat.java +++ b/ortools/sat/samples/RabbitsAndPheasantsSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/RankingSampleSat.cs b/ortools/sat/samples/RankingSampleSat.cs index b653afb527..166f978854 100644 --- a/ortools/sat/samples/RankingSampleSat.cs +++ b/ortools/sat/samples/RankingSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/RankingSampleSat.java b/ortools/sat/samples/RankingSampleSat.java index 55c2d126f3..90daba1234 100644 --- a/ortools/sat/samples/RankingSampleSat.java +++ b/ortools/sat/samples/RankingSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/ReifiedSampleSat.cs b/ortools/sat/samples/ReifiedSampleSat.cs index dff22fa7b1..59c396348b 100644 --- a/ortools/sat/samples/ReifiedSampleSat.cs +++ b/ortools/sat/samples/ReifiedSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/ReifiedSampleSat.java b/ortools/sat/samples/ReifiedSampleSat.java index c0690b0e14..9119dd55f7 100644 --- a/ortools/sat/samples/ReifiedSampleSat.java +++ b/ortools/sat/samples/ReifiedSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/ScheduleRequestsSat.cs b/ortools/sat/samples/ScheduleRequestsSat.cs index b359f175a4..5b37d99442 100644 --- a/ortools/sat/samples/ScheduleRequestsSat.cs +++ b/ortools/sat/samples/ScheduleRequestsSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/ScheduleRequestsSat.java b/ortools/sat/samples/ScheduleRequestsSat.java index 212f4c32f5..4846e0a698 100644 --- a/ortools/sat/samples/ScheduleRequestsSat.java +++ b/ortools/sat/samples/ScheduleRequestsSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/SearchForAllSolutionsSampleSat.cs b/ortools/sat/samples/SearchForAllSolutionsSampleSat.cs index 2772592e80..c988df6dda 100644 --- a/ortools/sat/samples/SearchForAllSolutionsSampleSat.cs +++ b/ortools/sat/samples/SearchForAllSolutionsSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/SearchForAllSolutionsSampleSat.java b/ortools/sat/samples/SearchForAllSolutionsSampleSat.java index 1193e52094..057b0003b9 100644 --- a/ortools/sat/samples/SearchForAllSolutionsSampleSat.java +++ b/ortools/sat/samples/SearchForAllSolutionsSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/SimpleSatProgram.cs b/ortools/sat/samples/SimpleSatProgram.cs index 34f494dc0c..99f4a92768 100644 --- a/ortools/sat/samples/SimpleSatProgram.cs +++ b/ortools/sat/samples/SimpleSatProgram.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/SimpleSatProgram.java b/ortools/sat/samples/SimpleSatProgram.java index 3614780f48..96f629f1ad 100644 --- a/ortools/sat/samples/SimpleSatProgram.java +++ b/ortools/sat/samples/SimpleSatProgram.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/SolutionHintingSampleSat.cs b/ortools/sat/samples/SolutionHintingSampleSat.cs index 23f3135c5d..ca6856d007 100644 --- a/ortools/sat/samples/SolutionHintingSampleSat.cs +++ b/ortools/sat/samples/SolutionHintingSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/SolutionHintingSampleSat.java b/ortools/sat/samples/SolutionHintingSampleSat.java index 16d409564b..1f2d5b1ad3 100644 --- a/ortools/sat/samples/SolutionHintingSampleSat.java +++ b/ortools/sat/samples/SolutionHintingSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/SolveAndPrintIntermediateSolutionsSampleSat.cs b/ortools/sat/samples/SolveAndPrintIntermediateSolutionsSampleSat.cs index ee39b0ef2c..8c43f5d495 100644 --- a/ortools/sat/samples/SolveAndPrintIntermediateSolutionsSampleSat.cs +++ b/ortools/sat/samples/SolveAndPrintIntermediateSolutionsSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/SolveAndPrintIntermediateSolutionsSampleSat.java b/ortools/sat/samples/SolveAndPrintIntermediateSolutionsSampleSat.java index ea0f3c49ea..a4dc66a0de 100644 --- a/ortools/sat/samples/SolveAndPrintIntermediateSolutionsSampleSat.java +++ b/ortools/sat/samples/SolveAndPrintIntermediateSolutionsSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/SolveWithTimeLimitSampleSat.cs b/ortools/sat/samples/SolveWithTimeLimitSampleSat.cs index 2aa89c2d02..673d0b2b29 100644 --- a/ortools/sat/samples/SolveWithTimeLimitSampleSat.cs +++ b/ortools/sat/samples/SolveWithTimeLimitSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/SolveWithTimeLimitSampleSat.java b/ortools/sat/samples/SolveWithTimeLimitSampleSat.java index a922519c5c..5ce8d1de81 100644 --- a/ortools/sat/samples/SolveWithTimeLimitSampleSat.java +++ b/ortools/sat/samples/SolveWithTimeLimitSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/StepFunctionSampleSat.cs b/ortools/sat/samples/StepFunctionSampleSat.cs index 6df6b459ea..4e87edfa93 100644 --- a/ortools/sat/samples/StepFunctionSampleSat.cs +++ b/ortools/sat/samples/StepFunctionSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/StepFunctionSampleSat.java b/ortools/sat/samples/StepFunctionSampleSat.java index 0a3aa2cd45..4f79d15cbc 100644 --- a/ortools/sat/samples/StepFunctionSampleSat.java +++ b/ortools/sat/samples/StepFunctionSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/StopAfterNSolutionsSampleSat.cs b/ortools/sat/samples/StopAfterNSolutionsSampleSat.cs index 61cdf3eaa4..078f331f6d 100644 --- a/ortools/sat/samples/StopAfterNSolutionsSampleSat.cs +++ b/ortools/sat/samples/StopAfterNSolutionsSampleSat.cs @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/StopAfterNSolutionsSampleSat.java b/ortools/sat/samples/StopAfterNSolutionsSampleSat.java index 14c0534e30..f0261ddf38 100644 --- a/ortools/sat/samples/StopAfterNSolutionsSampleSat.java +++ b/ortools/sat/samples/StopAfterNSolutionsSampleSat.java @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/assignment_groups_sat.cc b/ortools/sat/samples/assignment_groups_sat.cc index 12c84e0026..2a05b82bbc 100644 --- a/ortools/sat/samples/assignment_groups_sat.cc +++ b/ortools/sat/samples/assignment_groups_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/assignment_groups_sat.py b/ortools/sat/samples/assignment_groups_sat.py index fe2b01ee73..aee5f4c46c 100755 --- a/ortools/sat/samples/assignment_groups_sat.py +++ b/ortools/sat/samples/assignment_groups_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/assignment_sat.cc b/ortools/sat/samples/assignment_sat.cc index 56bc69102a..126f39db37 100644 --- a/ortools/sat/samples/assignment_sat.cc +++ b/ortools/sat/samples/assignment_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/assignment_sat.py b/ortools/sat/samples/assignment_sat.py index a9be6e3cbf..8678255f03 100755 --- a/ortools/sat/samples/assignment_sat.py +++ b/ortools/sat/samples/assignment_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/assignment_task_sizes_sat.cc b/ortools/sat/samples/assignment_task_sizes_sat.cc index c6541fe99d..067ac1c985 100644 --- a/ortools/sat/samples/assignment_task_sizes_sat.cc +++ b/ortools/sat/samples/assignment_task_sizes_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/assignment_task_sizes_sat.py b/ortools/sat/samples/assignment_task_sizes_sat.py index e546b141fb..43f1637e92 100755 --- a/ortools/sat/samples/assignment_task_sizes_sat.py +++ b/ortools/sat/samples/assignment_task_sizes_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/assignment_teams_sat.cc b/ortools/sat/samples/assignment_teams_sat.cc index 75805fb28c..9ce62ae62f 100644 --- a/ortools/sat/samples/assignment_teams_sat.cc +++ b/ortools/sat/samples/assignment_teams_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/assignment_teams_sat.py b/ortools/sat/samples/assignment_teams_sat.py index 1d9585fab5..1f481ba1dc 100755 --- a/ortools/sat/samples/assignment_teams_sat.py +++ b/ortools/sat/samples/assignment_teams_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/assumptions_sample_sat.cc b/ortools/sat/samples/assumptions_sample_sat.cc index a04ee24ee3..39c0f64fd7 100644 --- a/ortools/sat/samples/assumptions_sample_sat.cc +++ b/ortools/sat/samples/assumptions_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/assumptions_sample_sat.py b/ortools/sat/samples/assumptions_sample_sat.py index bdd52daae8..3c5a12a225 100755 --- a/ortools/sat/samples/assumptions_sample_sat.py +++ b/ortools/sat/samples/assumptions_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2021 Xiang Chen +# Copyright 2010-2022 Xiang Chen # 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 diff --git a/ortools/sat/samples/binpacking_problem_sat.cc b/ortools/sat/samples/binpacking_problem_sat.cc index de1f46823b..c086086b07 100644 --- a/ortools/sat/samples/binpacking_problem_sat.cc +++ b/ortools/sat/samples/binpacking_problem_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/binpacking_problem_sat.py b/ortools/sat/samples/binpacking_problem_sat.py index 10bb859aeb..11d3bca8f9 100755 --- a/ortools/sat/samples/binpacking_problem_sat.py +++ b/ortools/sat/samples/binpacking_problem_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/bool_or_sample_sat.cc b/ortools/sat/samples/bool_or_sample_sat.cc index 6b1572722f..89d2545209 100644 --- a/ortools/sat/samples/bool_or_sample_sat.cc +++ b/ortools/sat/samples/bool_or_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/bool_or_sample_sat.py b/ortools/sat/samples/bool_or_sample_sat.py index 64bef38203..c151033d08 100755 --- a/ortools/sat/samples/bool_or_sample_sat.py +++ b/ortools/sat/samples/bool_or_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/boolean_product_sample_sat.py b/ortools/sat/samples/boolean_product_sample_sat.py index df981f371a..3763dc4e8b 100755 --- a/ortools/sat/samples/boolean_product_sample_sat.py +++ b/ortools/sat/samples/boolean_product_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/channeling_sample_sat.cc b/ortools/sat/samples/channeling_sample_sat.cc index 3f4650058e..26e5cf61e5 100644 --- a/ortools/sat/samples/channeling_sample_sat.cc +++ b/ortools/sat/samples/channeling_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/channeling_sample_sat.py b/ortools/sat/samples/channeling_sample_sat.py index 9a199a36d3..0ef0bc1c18 100755 --- a/ortools/sat/samples/channeling_sample_sat.py +++ b/ortools/sat/samples/channeling_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/copy_model_sample_sat.cc b/ortools/sat/samples/copy_model_sample_sat.cc index eb5448889c..05aa476cbb 100644 --- a/ortools/sat/samples/copy_model_sample_sat.cc +++ b/ortools/sat/samples/copy_model_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/copy_model_sample_sat.py b/ortools/sat/samples/copy_model_sample_sat.py index c5e7004309..ece616f2d7 100755 --- a/ortools/sat/samples/copy_model_sample_sat.py +++ b/ortools/sat/samples/copy_model_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/cp_is_fun_sat.cc b/ortools/sat/samples/cp_is_fun_sat.cc index e7a5285dd8..26560075fe 100644 --- a/ortools/sat/samples/cp_is_fun_sat.cc +++ b/ortools/sat/samples/cp_is_fun_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/cp_is_fun_sat.py b/ortools/sat/samples/cp_is_fun_sat.py index 5454ea5a1b..e51961ed06 100755 --- a/ortools/sat/samples/cp_is_fun_sat.py +++ b/ortools/sat/samples/cp_is_fun_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/cp_sat_example.cc b/ortools/sat/samples/cp_sat_example.cc index 174026ab88..fe8155c58b 100644 --- a/ortools/sat/samples/cp_sat_example.cc +++ b/ortools/sat/samples/cp_sat_example.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/cp_sat_example.py b/ortools/sat/samples/cp_sat_example.py index 49046b4f88..9e7ad59037 100755 --- a/ortools/sat/samples/cp_sat_example.py +++ b/ortools/sat/samples/cp_sat_example.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/earliness_tardiness_cost_sample_sat.cc b/ortools/sat/samples/earliness_tardiness_cost_sample_sat.cc index df1d61a1f5..55988a9cc6 100644 --- a/ortools/sat/samples/earliness_tardiness_cost_sample_sat.cc +++ b/ortools/sat/samples/earliness_tardiness_cost_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/earliness_tardiness_cost_sample_sat.py b/ortools/sat/samples/earliness_tardiness_cost_sample_sat.py index 86f85f538c..371105bda4 100755 --- a/ortools/sat/samples/earliness_tardiness_cost_sample_sat.py +++ b/ortools/sat/samples/earliness_tardiness_cost_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/interval_sample_sat.cc b/ortools/sat/samples/interval_sample_sat.cc index eca1852bfe..43b2f5f615 100644 --- a/ortools/sat/samples/interval_sample_sat.cc +++ b/ortools/sat/samples/interval_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/interval_sample_sat.py b/ortools/sat/samples/interval_sample_sat.py index 13bc7de74b..12c9a96e63 100755 --- a/ortools/sat/samples/interval_sample_sat.py +++ b/ortools/sat/samples/interval_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/literal_sample_sat.cc b/ortools/sat/samples/literal_sample_sat.cc index 4c1bb90542..81e821d148 100644 --- a/ortools/sat/samples/literal_sample_sat.cc +++ b/ortools/sat/samples/literal_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/literal_sample_sat.py b/ortools/sat/samples/literal_sample_sat.py index c65db5dd99..1619d3c189 100755 --- a/ortools/sat/samples/literal_sample_sat.py +++ b/ortools/sat/samples/literal_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/minimal_jobshop_sat.cc b/ortools/sat/samples/minimal_jobshop_sat.cc index 7f078e4392..fadd0bbccb 100644 --- a/ortools/sat/samples/minimal_jobshop_sat.cc +++ b/ortools/sat/samples/minimal_jobshop_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/minimal_jobshop_sat.py b/ortools/sat/samples/minimal_jobshop_sat.py index 7c63e4efc7..f495092e24 100755 --- a/ortools/sat/samples/minimal_jobshop_sat.py +++ b/ortools/sat/samples/minimal_jobshop_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/multiple_knapsack_sat.cc b/ortools/sat/samples/multiple_knapsack_sat.cc index f37d7081ad..8fb22db766 100644 --- a/ortools/sat/samples/multiple_knapsack_sat.cc +++ b/ortools/sat/samples/multiple_knapsack_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/multiple_knapsack_sat.py b/ortools/sat/samples/multiple_knapsack_sat.py index 4cc1164383..fc87c36231 100755 --- a/ortools/sat/samples/multiple_knapsack_sat.py +++ b/ortools/sat/samples/multiple_knapsack_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/no_overlap_sample_sat.cc b/ortools/sat/samples/no_overlap_sample_sat.cc index 6b3bc05827..036d8899e8 100644 --- a/ortools/sat/samples/no_overlap_sample_sat.cc +++ b/ortools/sat/samples/no_overlap_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/no_overlap_sample_sat.py b/ortools/sat/samples/no_overlap_sample_sat.py index c822220ad5..76773d24d0 100755 --- a/ortools/sat/samples/no_overlap_sample_sat.py +++ b/ortools/sat/samples/no_overlap_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/nqueens_sat.cc b/ortools/sat/samples/nqueens_sat.cc index cab91a3bca..feca21c3b3 100644 --- a/ortools/sat/samples/nqueens_sat.cc +++ b/ortools/sat/samples/nqueens_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/nqueens_sat.py b/ortools/sat/samples/nqueens_sat.py index 62ea96bdf0..c284264366 100644 --- a/ortools/sat/samples/nqueens_sat.py +++ b/ortools/sat/samples/nqueens_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/nurses_sat.cc b/ortools/sat/samples/nurses_sat.cc index 64c6840cde..627794d920 100644 --- a/ortools/sat/samples/nurses_sat.cc +++ b/ortools/sat/samples/nurses_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/nurses_sat.py b/ortools/sat/samples/nurses_sat.py index 2a10574e3e..a24f828035 100755 --- a/ortools/sat/samples/nurses_sat.py +++ b/ortools/sat/samples/nurses_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/optional_interval_sample_sat.cc b/ortools/sat/samples/optional_interval_sample_sat.cc index d6ba7a42f1..29d627d3e9 100644 --- a/ortools/sat/samples/optional_interval_sample_sat.cc +++ b/ortools/sat/samples/optional_interval_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/optional_interval_sample_sat.py b/ortools/sat/samples/optional_interval_sample_sat.py index 4a270d52ed..707718e26e 100755 --- a/ortools/sat/samples/optional_interval_sample_sat.py +++ b/ortools/sat/samples/optional_interval_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/overlapping_intervals_sample_sat.py b/ortools/sat/samples/overlapping_intervals_sample_sat.py index 47d89b5a20..7f2410a226 100755 --- a/ortools/sat/samples/overlapping_intervals_sample_sat.py +++ b/ortools/sat/samples/overlapping_intervals_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/rabbits_and_pheasants_sat.cc b/ortools/sat/samples/rabbits_and_pheasants_sat.cc index 2a2fcb4cb2..c78e9c2946 100644 --- a/ortools/sat/samples/rabbits_and_pheasants_sat.cc +++ b/ortools/sat/samples/rabbits_and_pheasants_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/rabbits_and_pheasants_sat.py b/ortools/sat/samples/rabbits_and_pheasants_sat.py index 17eda9706c..7ab93e0687 100755 --- a/ortools/sat/samples/rabbits_and_pheasants_sat.py +++ b/ortools/sat/samples/rabbits_and_pheasants_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/ranking_sample_sat.cc b/ortools/sat/samples/ranking_sample_sat.cc index 7685f452e4..9e3237e5df 100644 --- a/ortools/sat/samples/ranking_sample_sat.cc +++ b/ortools/sat/samples/ranking_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/ranking_sample_sat.py b/ortools/sat/samples/ranking_sample_sat.py index 70700c294d..51f1e7bf95 100755 --- a/ortools/sat/samples/ranking_sample_sat.py +++ b/ortools/sat/samples/ranking_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/reified_sample_sat.cc b/ortools/sat/samples/reified_sample_sat.cc index 815cffd0fc..11da35e951 100644 --- a/ortools/sat/samples/reified_sample_sat.cc +++ b/ortools/sat/samples/reified_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/reified_sample_sat.py b/ortools/sat/samples/reified_sample_sat.py index 1882c676f2..9e7d05df8b 100755 --- a/ortools/sat/samples/reified_sample_sat.py +++ b/ortools/sat/samples/reified_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/schedule_requests_sat.cc b/ortools/sat/samples/schedule_requests_sat.cc index a49d5d6e92..db1aa0499a 100644 --- a/ortools/sat/samples/schedule_requests_sat.cc +++ b/ortools/sat/samples/schedule_requests_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/schedule_requests_sat.py b/ortools/sat/samples/schedule_requests_sat.py index bd0a8ce38d..0542b35a6e 100755 --- a/ortools/sat/samples/schedule_requests_sat.py +++ b/ortools/sat/samples/schedule_requests_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/scheduling_with_calendar_sample_sat.py b/ortools/sat/samples/scheduling_with_calendar_sample_sat.py index 4d09a5aab1..e177c782a5 100755 --- a/ortools/sat/samples/scheduling_with_calendar_sample_sat.py +++ b/ortools/sat/samples/scheduling_with_calendar_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/search_for_all_solutions_sample_sat.cc b/ortools/sat/samples/search_for_all_solutions_sample_sat.cc index 04c612e274..f8adc34a86 100644 --- a/ortools/sat/samples/search_for_all_solutions_sample_sat.cc +++ b/ortools/sat/samples/search_for_all_solutions_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/search_for_all_solutions_sample_sat.py b/ortools/sat/samples/search_for_all_solutions_sample_sat.py index 455b8db674..457eb1cb1c 100755 --- a/ortools/sat/samples/search_for_all_solutions_sample_sat.py +++ b/ortools/sat/samples/search_for_all_solutions_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/simple_sat_program.cc b/ortools/sat/samples/simple_sat_program.cc index 3c396773d2..aabc14aa1f 100644 --- a/ortools/sat/samples/simple_sat_program.cc +++ b/ortools/sat/samples/simple_sat_program.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/simple_sat_program.py b/ortools/sat/samples/simple_sat_program.py index 48b7f7f8f2..42370fc4b4 100755 --- a/ortools/sat/samples/simple_sat_program.py +++ b/ortools/sat/samples/simple_sat_program.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/solution_hinting_sample_sat.cc b/ortools/sat/samples/solution_hinting_sample_sat.cc index 854c7a78a4..a517bc076e 100644 --- a/ortools/sat/samples/solution_hinting_sample_sat.cc +++ b/ortools/sat/samples/solution_hinting_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/solution_hinting_sample_sat.py b/ortools/sat/samples/solution_hinting_sample_sat.py index 7a4881c9ad..e96e2468a1 100755 --- a/ortools/sat/samples/solution_hinting_sample_sat.py +++ b/ortools/sat/samples/solution_hinting_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/solve_and_print_intermediate_solutions_sample_sat.cc b/ortools/sat/samples/solve_and_print_intermediate_solutions_sample_sat.cc index 4f18a5510a..a135b213b0 100644 --- a/ortools/sat/samples/solve_and_print_intermediate_solutions_sample_sat.cc +++ b/ortools/sat/samples/solve_and_print_intermediate_solutions_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/solve_and_print_intermediate_solutions_sample_sat.py b/ortools/sat/samples/solve_and_print_intermediate_solutions_sample_sat.py index daa9fc38f8..9cd633ec94 100755 --- a/ortools/sat/samples/solve_and_print_intermediate_solutions_sample_sat.py +++ b/ortools/sat/samples/solve_and_print_intermediate_solutions_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/solve_with_time_limit_sample_sat.cc b/ortools/sat/samples/solve_with_time_limit_sample_sat.cc index d944a54f84..1418c3e46a 100644 --- a/ortools/sat/samples/solve_with_time_limit_sample_sat.cc +++ b/ortools/sat/samples/solve_with_time_limit_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/solve_with_time_limit_sample_sat.py b/ortools/sat/samples/solve_with_time_limit_sample_sat.py index b1301a47ae..ee81c6324f 100755 --- a/ortools/sat/samples/solve_with_time_limit_sample_sat.py +++ b/ortools/sat/samples/solve_with_time_limit_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/step_function_sample_sat.cc b/ortools/sat/samples/step_function_sample_sat.cc index 6fe913421e..228369e96e 100644 --- a/ortools/sat/samples/step_function_sample_sat.cc +++ b/ortools/sat/samples/step_function_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/step_function_sample_sat.py b/ortools/sat/samples/step_function_sample_sat.py index d5a62f267c..07452dccf1 100755 --- a/ortools/sat/samples/step_function_sample_sat.py +++ b/ortools/sat/samples/step_function_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/samples/stop_after_n_solutions_sample_sat.cc b/ortools/sat/samples/stop_after_n_solutions_sample_sat.cc index 5f0104270e..43b0d924e6 100644 --- a/ortools/sat/samples/stop_after_n_solutions_sample_sat.cc +++ b/ortools/sat/samples/stop_after_n_solutions_sample_sat.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/samples/stop_after_n_solutions_sample_sat.py b/ortools/sat/samples/stop_after_n_solutions_sample_sat.py index 81c755990f..1823ca1211 100755 --- a/ortools/sat/samples/stop_after_n_solutions_sample_sat.py +++ b/ortools/sat/samples/stop_after_n_solutions_sample_sat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2010-2021 Google LLC +# Copyright 2010-2022 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 diff --git a/ortools/sat/sat_base.h b/ortools/sat/sat_base.h index e1156c5661..b4b31beda7 100644 --- a/ortools/sat/sat_base.h +++ b/ortools/sat/sat_base.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/sat_decision.cc b/ortools/sat/sat_decision.cc index 44d4d569d9..7f64ca709e 100644 --- a/ortools/sat/sat_decision.cc +++ b/ortools/sat/sat_decision.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/sat_decision.h b/ortools/sat/sat_decision.h index 339ee6b83c..dd5abeab1c 100644 --- a/ortools/sat/sat_decision.h +++ b/ortools/sat/sat_decision.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 @@ -104,6 +104,12 @@ class SatDecisionPolicy { // Returns the vector of the current assignment preferences. std::vector> AllPreferences() const; + // Returns the current activity of a BooleanVariable. + double Activity(Literal l) const { + if (l.Variable() < activities_.size()) return activities_[l.Variable()]; + return 0.0; + } + private: // Computes an initial variable ordering. void InitializeVariableOrdering(); diff --git a/ortools/sat/sat_inprocessing.cc b/ortools/sat/sat_inprocessing.cc index 6bc3b15050..29f58c1504 100644 --- a/ortools/sat/sat_inprocessing.cc +++ b/ortools/sat/sat_inprocessing.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/sat_inprocessing.h b/ortools/sat/sat_inprocessing.h index eb85caccf2..49bb2c6a56 100644 --- a/ortools/sat/sat_inprocessing.h +++ b/ortools/sat/sat_inprocessing.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/sat_parameters.proto b/ortools/sat/sat_parameters.proto index 9381e05d71..d61296d270 100644 --- a/ortools/sat/sat_parameters.proto +++ b/ortools/sat/sat_parameters.proto @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/sat_solver.cc b/ortools/sat/sat_solver.cc index 3514c29bbc..c633468ff7 100644 --- a/ortools/sat/sat_solver.cc +++ b/ortools/sat/sat_solver.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 @@ -656,10 +656,8 @@ bool SatSolver::ReapplyAssumptionsIfNeeded() { } DCHECK(assumptions_.empty()); - int unused = 0; const int64_t old_num_branches = counters_.num_branches; - const SatSolver::Status status = - ReapplyDecisionsUpTo(assumption_level_ - 1, &unused); + const SatSolver::Status status = ReapplyDecisionsUpTo(assumption_level_ - 1); counters_.num_branches = old_num_branches; assumption_level_ = CurrentDecisionLevel(); return (status == SatSolver::FEASIBLE); @@ -951,7 +949,9 @@ SatSolver::Status SatSolver::ReapplyDecisionsUpTo( // Not assigned, we try to take it. const int old_level = current_decision_level_; const int index = EnqueueDecisionAndBackjumpOnConflict(previous_decision); - *first_propagation_index = std::min(*first_propagation_index, index); + if (first_propagation_index != nullptr) { + *first_propagation_index = std::min(*first_propagation_index, index); + } if (index == kUnsatTrailIndex) return INFEASIBLE; if (current_decision_level_ <= old_level) { // A conflict occurred which backjumped to an earlier decision level. @@ -971,17 +971,18 @@ SatSolver::Status SatSolver::ReapplyDecisionsUpTo( return FEASIBLE; } -int SatSolver::EnqueueDecisionAndBacktrackOnConflict(Literal true_literal) { +SatSolver::Status SatSolver::EnqueueDecisionAndBacktrackOnConflict( + Literal true_literal, int* first_propagation_index) { SCOPED_TIME_STAT(&stats_); CHECK(PropagationIsDone()); CHECK(assumptions_.empty()); - - if (model_is_unsat_) return kUnsatTrailIndex; + if (model_is_unsat_) return SatSolver::INFEASIBLE; DCHECK_LT(CurrentDecisionLevel(), decisions_.size()); decisions_[CurrentDecisionLevel()].literal = true_literal; - int first_propagation_index = trail_->Index(); - ReapplyDecisionsUpTo(CurrentDecisionLevel(), &first_propagation_index); - return first_propagation_index; + if (first_propagation_index != nullptr) { + *first_propagation_index = trail_->Index(); + } + return ReapplyDecisionsUpTo(CurrentDecisionLevel(), first_propagation_index); } bool SatSolver::EnqueueDecisionIfNotConflicting(Literal true_literal) { diff --git a/ortools/sat/sat_solver.h b/ortools/sat/sat_solver.h index 73f64a2e07..5a9f138a8c 100644 --- a/ortools/sat/sat_solver.h +++ b/ortools/sat/sat_solver.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 @@ -266,8 +266,13 @@ class SatSolver { // of the old stack. Note that decisions that are now consequence of the ones // before them will no longer be decisions. // + // Returns INFEASIBLE if the model was proven infeasible, ASSUMPTION_UNSAT if + // the current decision and the one we are trying to take are not compatible + // together and FEASIBLE if all decisions are taken. + // // Note(user): This function can be called with an already assigned literal. - int EnqueueDecisionAndBacktrackOnConflict(Literal true_literal); + Status EnqueueDecisionAndBacktrackOnConflict( + Literal true_literal, int* first_propagation_index = nullptr); // Tries to enqueue the given decision and performs the propagation. // Returns true if no conflict occurred. Otherwise, returns false and restores @@ -510,7 +515,8 @@ class SatSolver { // // first_propagation_index will be filled with the trail index of the first // newly propagated literal, or with -1 if INFEASIBLE is returned. - Status ReapplyDecisionsUpTo(int level, int* first_propagation_index); + Status ReapplyDecisionsUpTo(int level, + int* first_propagation_index = nullptr); // Returns false if the thread memory is over the limit. bool IsMemoryLimitReached() const; diff --git a/ortools/sat/scheduling_constraints.cc b/ortools/sat/scheduling_constraints.cc index 102f64775a..46401b7345 100644 --- a/ortools/sat/scheduling_constraints.cc +++ b/ortools/sat/scheduling_constraints.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/scheduling_constraints.h b/ortools/sat/scheduling_constraints.h index e324a35306..3f99cdcf66 100644 --- a/ortools/sat/scheduling_constraints.h +++ b/ortools/sat/scheduling_constraints.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/scheduling_cuts.cc b/ortools/sat/scheduling_cuts.cc index 9744bdca83..f51d5f15bc 100644 --- a/ortools/sat/scheduling_cuts.cc +++ b/ortools/sat/scheduling_cuts.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 @@ -75,6 +75,44 @@ void AddIntegerVariableFromIntervals(SchedulingConstraintHelper* helper, } } +template +IntegerValue EnergyMinInWindow(const E& e, + const VariablesAssignment& assignment, + IntegerValue window_start, + IntegerValue window_end) { + if (window_end <= window_start) return IntegerValue(0); + + // Returns zero if the interval do not necessarily overlap. + if (e.x_end_min <= window_start) return IntegerValue(0); + if (e.x_start_max >= window_end) return IntegerValue(0); + const IntegerValue window_size = window_end - window_start; + const IntegerValue simple_energy_min = + e.y_size_min * + std::min({e.x_end_min - window_start, window_end - e.x_start_max, + e.x_size_min, window_size}); + if (e.decomposed_energy.empty()) return simple_energy_min; + + IntegerValue result = kMaxIntegerValue; + for (const auto [lit, fixed_size, fixed_demand] : e.decomposed_energy) { + if (assignment.LiteralIsTrue(lit)) { + // Both should be identical, so we don't recompute it. + return simple_energy_min; + } + if (assignment.LiteralIsFalse(lit)) continue; + const IntegerValue alt_end_min = + std::max(e.x_end_min, e.x_start_min + fixed_size); + const IntegerValue alt_start_max = + std::min(e.x_start_max, e.x_end_max - fixed_size); + const IntegerValue energy_min = + fixed_demand * + std::min({alt_end_min - window_start, window_end - alt_start_max, + fixed_size, window_size}); + result = std::min(result, energy_min); + } + if (result == kMaxIntegerValue) return simple_energy_min; + return std::max(simple_energy_min, result); +} + } // namespace struct EnergyEvent { @@ -156,39 +194,6 @@ struct EnergyEvent { return true; } - IntegerValue EnergyMinInWindow(const VariablesAssignment& assignment, - IntegerValue window_start, - IntegerValue window_end) const { - if (window_end <= window_start) return IntegerValue(0); - - // Returns zero if the interval do not necessarily overlap. - if (x_end_min <= window_start) return IntegerValue(0); - if (x_start_max >= window_end) return IntegerValue(0); - const IntegerValue window_size = window_end - window_start; - const IntegerValue simple_energy_min = - y_size_min * - std::min({x_end_min - window_start, window_end - x_start_max, - x_size_min, window_size}); - if (decomposed_energy.empty()) return simple_energy_min; - - IntegerValue result = kMaxIntegerValue; - for (const auto [lit, fixed_size, fixed_demand] : decomposed_energy) { - if (assignment.LiteralIsTrue(lit)) { - // Both should be identical, so we don't recompute it. - return simple_energy_min; - } - if (assignment.LiteralIsFalse(lit)) continue; - const IntegerValue alt_em = std::max(x_end_min, x_start_min + fixed_size); - const IntegerValue alt_sm = std::min(x_start_max, x_end_max - fixed_size); - const IntegerValue energy_min = - fixed_demand * std::min({alt_em - window_start, window_end - alt_sm, - fixed_size, window_size}); - result = std::min(result, energy_min); - } - if (result == kMaxIntegerValue) return simple_energy_min; - return std::max(simple_energy_min, result); - } - std::string DebugString() const { return absl::StrCat( "EnergyEvent(x_start_min = ", x_start_min.value(), @@ -282,14 +287,14 @@ void GenerateCumulativeEnergeticCuts( const IntegerValue window_size = window_end - window_start; for (const auto [lit, fixed_size, fixed_demand] : energy) { if (assignment.LiteralIsFalse(lit)) continue; - const IntegerValue alt_em = + const IntegerValue alt_end_min = std::max(event.x_end_min, event.x_start_min + fixed_size); - const IntegerValue alt_sm = + const IntegerValue alt_start_max = std::min(event.x_start_max, event.x_end_max - fixed_size); const IntegerValue energy_min = fixed_demand * - std::min({alt_em - window_start, window_end - alt_sm, - fixed_size, window_size}); + std::min({alt_end_min - window_start, + window_end - alt_start_max, fixed_size, window_size}); DCHECK_GT(energy_min, 0); if (!cut->AddLiteralTerm(lit, energy_min)) return false; } @@ -298,7 +303,7 @@ void GenerateCumulativeEnergeticCuts( } else { if (add_opt_to_name != nullptr) *add_opt_to_name = true; const IntegerValue min_energy = - event.EnergyMinInWindow(assignment, window_start, window_end); + EnergyMinInWindow(event, assignment, window_start, window_end); if (min_energy > event.x_size_min * event.y_size_min && add_energy_to_name != nullptr) { *add_energy_to_name = true; @@ -1153,8 +1158,11 @@ CutGenerator CreateNoOverlapPrecedenceCutGenerator( // capacity_max. // For a no_overlap_2d constraint, y the other dimension of the rect. struct CtEvent { - // The start min of the x interval. + // The bounds of the x interval. IntegerValue x_start_min; + IntegerValue x_start_max; + IntegerValue x_end_min; + IntegerValue x_end_max; // The size min of the x interval. IntegerValue x_size_min; @@ -1195,31 +1203,6 @@ struct CtEvent { // will not use this. IntegerValue fixed_y_size = -1; - IntegerValue EnergyMinAfter(const VariablesAssignment& assignment, - IntegerValue window_start) const { - // Returns zero if the interval do not necessarily overlap. - if (x_start_min + x_size_min <= window_start) return IntegerValue(0); - const IntegerValue size_reduction = window_start - x_start_min; - const IntegerValue simple_energy_min = - y_size_min * (x_size_min - size_reduction); - DCHECK_GT(simple_energy_min, 0); - if (decomposed_energy.empty()) return simple_energy_min; - - IntegerValue result = kMaxIntegerValue; - for (const auto [lit, fixed_size, fixed_demand] : decomposed_energy) { - if (assignment.LiteralIsTrue(lit)) { - // Both should be identical, so we don't recompute it. - return simple_energy_min; - } - if (assignment.LiteralIsFalse(lit)) continue; - const IntegerValue energy_min = - fixed_demand * (fixed_size - size_reduction); - DCHECK_GT(energy_min, 0); - result = std::min(result, energy_min); - } - if (result == kMaxIntegerValue) return simple_energy_min; - return std::max(simple_energy_min, result); - } std::string DebugString() const { return absl::StrCat("CtEvent(x_end = ", x_end.DebugString(), @@ -1281,14 +1264,15 @@ void GenerateCompletionTimeCuts( // Build the vector of energies as the vector of sizes. CtEvent event = events[before]; // Copy. event.lifted = true; + event.energy_min = EnergyMinInWindow( + event, assignment, sequence_start_min, event.x_end_max); event.x_size_min = event.x_size_min + event.x_start_min - sequence_start_min; event.x_start_min = sequence_start_min; - event.energy_min = - event.EnergyMinAfter(assignment, sequence_start_min); if (event.energy_min > event.x_size_min * event.y_size_min) { event.use_energy = true; } + CHECK_GE(event.energy_min, event.x_size_min * event.y_size_min); if (event.energy_min <= 0) continue; residual_tasks.push_back(event); } @@ -1414,6 +1398,9 @@ CutGenerator CreateNoOverlapCompletionTimeCutGenerator( const AffineExpression end_expr = helper->Ends()[index]; CtEvent event; event.x_start_min = helper->StartMin(index); + event.x_start_max = helper->StartMax(index); + event.x_end_min = helper->EndMin(index); + event.x_end_max = helper->EndMax(index); event.x_size_min = size_min; event.x_end = end_expr; event.x_lp_end = end_expr.LpValue(lp_values); @@ -1470,6 +1457,9 @@ CutGenerator CreateCumulativeCompletionTimeCutGenerator( CtEvent event; event.x_start_min = helper->StartMin(index); + event.x_start_max = helper->StartMax(index); + event.x_end_min = helper->EndMin(index); + event.x_end_max = helper->EndMax(index); event.x_size_min = size_min; event.x_end = end_expr; event.x_lp_end = end_expr.LpValue(lp_values); @@ -1566,7 +1556,10 @@ CutGenerator CreateNoOverlap2dCompletionTimeCutGenerator( for (const int rect : rectangles) { const AffineExpression x_end_expr = x_helper->Ends()[rect]; CtEvent event; - event.x_start_min = x_helper->ShiftedStartMin(rect); + event.x_start_min = x_helper->StartMin(rect); + event.x_start_max = x_helper->StartMax(rect); + event.x_end_min = x_helper->EndMin(rect); + event.x_end_max = x_helper->EndMax(rect); event.x_size_min = x_helper->SizeMin(rect); event.x_end = x_end_expr; event.x_lp_end = x_end_expr.LpValue(lp_values); diff --git a/ortools/sat/scheduling_cuts.h b/ortools/sat/scheduling_cuts.h index c5c339e8cd..94e095560e 100644 --- a/ortools/sat/scheduling_cuts.h +++ b/ortools/sat/scheduling_cuts.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/simplification.cc b/ortools/sat/simplification.cc index 180165997f..c2ef73898e 100644 --- a/ortools/sat/simplification.cc +++ b/ortools/sat/simplification.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/simplification.h b/ortools/sat/simplification.h index ba59f8a11e..37171f1316 100644 --- a/ortools/sat/simplification.h +++ b/ortools/sat/simplification.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/subsolver.cc b/ortools/sat/subsolver.cc index 6971675f1b..4c0d4de09a 100644 --- a/ortools/sat/subsolver.cc +++ b/ortools/sat/subsolver.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/subsolver.h b/ortools/sat/subsolver.h index b0056b8ee8..52060aedde 100644 --- a/ortools/sat/subsolver.h +++ b/ortools/sat/subsolver.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/swig_helper.cc b/ortools/sat/swig_helper.cc index 9ad7707e43..b37ecc5a1f 100644 --- a/ortools/sat/swig_helper.cc +++ b/ortools/sat/swig_helper.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/swig_helper.h b/ortools/sat/swig_helper.h index 1b2936e945..71c0e9d4d4 100644 --- a/ortools/sat/swig_helper.h +++ b/ortools/sat/swig_helper.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/symmetry.cc b/ortools/sat/symmetry.cc index 94e2ecbc90..71543ee2ff 100644 --- a/ortools/sat/symmetry.cc +++ b/ortools/sat/symmetry.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/symmetry.h b/ortools/sat/symmetry.h index 0d95ce6abb..f7d8b221db 100644 --- a/ortools/sat/symmetry.h +++ b/ortools/sat/symmetry.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/symmetry_util.cc b/ortools/sat/symmetry_util.cc index 284a5ec2aa..86b26dea6a 100644 --- a/ortools/sat/symmetry_util.cc +++ b/ortools/sat/symmetry_util.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/symmetry_util.h b/ortools/sat/symmetry_util.h index 7cda764f95..a09bf47be3 100644 --- a/ortools/sat/symmetry_util.h +++ b/ortools/sat/symmetry_util.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/synchronization.cc b/ortools/sat/synchronization.cc index 130537b9d7..959833268b 100644 --- a/ortools/sat/synchronization.cc +++ b/ortools/sat/synchronization.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/synchronization.h b/ortools/sat/synchronization.h index bbcd4554df..7ca13e3355 100644 --- a/ortools/sat/synchronization.h +++ b/ortools/sat/synchronization.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/table.cc b/ortools/sat/table.cc index 871da000a3..43ed8a8708 100644 --- a/ortools/sat/table.cc +++ b/ortools/sat/table.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/table.h b/ortools/sat/table.h index 20d16fee2d..6f8e8916b4 100644 --- a/ortools/sat/table.h +++ b/ortools/sat/table.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/theta_tree.cc b/ortools/sat/theta_tree.cc index 87da864fc1..87bb756daa 100644 --- a/ortools/sat/theta_tree.cc +++ b/ortools/sat/theta_tree.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/theta_tree.h b/ortools/sat/theta_tree.h index d827530c45..bcbe31c023 100644 --- a/ortools/sat/theta_tree.h +++ b/ortools/sat/theta_tree.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/timetable.cc b/ortools/sat/timetable.cc index e186c21c2f..e4267bfc09 100644 --- a/ortools/sat/timetable.cc +++ b/ortools/sat/timetable.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/timetable.h b/ortools/sat/timetable.h index 0f7dcc8546..6b4175589f 100644 --- a/ortools/sat/timetable.h +++ b/ortools/sat/timetable.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/timetable_edgefinding.cc b/ortools/sat/timetable_edgefinding.cc index 10624f653d..fe6bb40306 100644 --- a/ortools/sat/timetable_edgefinding.cc +++ b/ortools/sat/timetable_edgefinding.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/timetable_edgefinding.h b/ortools/sat/timetable_edgefinding.h index 00a26c47cf..244e14f183 100644 --- a/ortools/sat/timetable_edgefinding.h +++ b/ortools/sat/timetable_edgefinding.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/util.cc b/ortools/sat/util.cc index 98ddaf259a..86314730a7 100644 --- a/ortools/sat/util.cc +++ b/ortools/sat/util.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/util.h b/ortools/sat/util.h index 91b960c918..9ef71ae0f8 100644 --- a/ortools/sat/util.h +++ b/ortools/sat/util.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/var_domination.cc b/ortools/sat/var_domination.cc index 869a6dc7d5..819a8448b3 100644 --- a/ortools/sat/var_domination.cc +++ b/ortools/sat/var_domination.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/var_domination.h b/ortools/sat/var_domination.h index a326f43a29..f4adee4a4d 100644 --- a/ortools/sat/var_domination.h +++ b/ortools/sat/var_domination.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/zero_half_cuts.cc b/ortools/sat/zero_half_cuts.cc index 7296c008c0..4b6bbf489f 100644 --- a/ortools/sat/zero_half_cuts.cc +++ b/ortools/sat/zero_half_cuts.cc @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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 diff --git a/ortools/sat/zero_half_cuts.h b/ortools/sat/zero_half_cuts.h index 0b0af9e1bb..34275b9001 100644 --- a/ortools/sat/zero_half_cuts.h +++ b/ortools/sat/zero_half_cuts.h @@ -1,4 +1,4 @@ -// Copyright 2010-2021 Google LLC +// Copyright 2010-2022 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