Skip to content

Commit

Permalink
More on paramters
Browse files Browse the repository at this point in the history
  • Loading branch information
d-krupke committed Sep 5, 2024
1 parent 4019c33 commit 74c0283
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
13 changes: 11 additions & 2 deletions 05_parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,10 @@ configuration. It is important not to modify the parameters at the top level, as
this would affect all subsolvers, including the LNS-workers. Doing so could
disrupt the balance of the portfolio, potentially activating costly techniques
for the LNS-workers, which could slow them down to the point of being
ineffective.
ineffective. Additionally, you risk creating a default subsolver incompatible
with your model - such as one that requires an objective function - causing
CP-SAT to exclude most or all subsolvers from the portfolio, resulting in a
solver that is either inefficient or nonfunctional.

For example, in packing problems, certain expensive propagation techniques can
significantly speed up the search but can also drastically slow it down if
Expand Down Expand Up @@ -671,12 +674,18 @@ solver.parameters.extra_subsolvers.append(
```

After adding the subsolver, you can check the log to verify that it is included
in the list of active subsolvers:
in the list of active subsolvers. If it is not shown, you probably used
parameters incompatible with the model, causing the subsolver to be excluded.

```
8 full problem subsolvers: [MyPackingSubsolver, default_lp, max_lp, no_lp, probing, probing_max_lp, quick_restart, quick_restart_no_lp]
```

If you want to find out how the existing subsolvers are configured, you can
check out the
[cp_model_search.cc](https://github.com/google/or-tools/blob/stable/ortools/sat/cp_model_search.cc)
file in the OR-Tools repository.

> [!TIP]
>
> You can also overwrite the parameters of an existing subsolver by using the
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3445,7 +3445,10 @@ configuration. It is important not to modify the parameters at the top level, as
this would affect all subsolvers, including the LNS-workers. Doing so could
disrupt the balance of the portfolio, potentially activating costly techniques
for the LNS-workers, which could slow them down to the point of being
ineffective.
ineffective. Additionally, you risk creating a default subsolver incompatible
with your model - such as one that requires an objective function - causing
CP-SAT to exclude most or all subsolvers from the portfolio, resulting in a
solver that is either inefficient or nonfunctional.

For example, in packing problems, certain expensive propagation techniques can
significantly speed up the search but can also drastically slow it down if
Expand Down Expand Up @@ -3475,12 +3478,18 @@ solver.parameters.extra_subsolvers.append(
```

After adding the subsolver, you can check the log to verify that it is included
in the list of active subsolvers:
in the list of active subsolvers. If it is not shown, you probably used
parameters incompatible with the model, causing the subsolver to be excluded.

```
8 full problem subsolvers: [MyPackingSubsolver, default_lp, max_lp, no_lp, probing, probing_max_lp, quick_restart, quick_restart_no_lp]
```

If you want to find out how the existing subsolvers are configured, you can
check out the
[cp_model_search.cc](https://github.com/google/or-tools/blob/stable/ortools/sat/cp_model_search.cc)
file in the OR-Tools repository.

> [!TIP]
>
> You can also overwrite the parameters of an existing subsolver by using the
Expand Down

0 comments on commit 74c0283

Please sign in to comment.