Skip to content

Commit

Permalink
Constraints only applied when ENTMOOT uses Gurobi (#86)
Browse files Browse the repository at this point in the history
* Add files via upload

First take on ENTMOOT strategy - init and suggest_experiments functions implemented.

* Add files via upload

Fixed some of the documentation

* Update and rename emstrat.py to entmoot.py

Renaming

* Add files via upload

* Adding ENTMOOT test

* Turning off verbose logging

* Update __init__.py

* Update ci.yml

* Update entmoot.py

Changed default optimizer type to Gurobi, and added an error if constraints are applied when optimizer type is set to sampling.

* Update entmoot.py

Set default optimizer type back to sampling
  • Loading branch information
jezsadler authored Jan 14, 2021
1 parent 6f9cbd4 commit fc9a509
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions summit/strategies/entmoot.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,14 @@ def __init__(
self.optimizer_type = optimizer_type
else:
self.optimizer_type = "sampling" # default optimizer: sampling

if self.optimizer_type == "sampling" & self.constraints is not None:
raise ValueError(
"Constraints can only be applied when ENTMOOT is using \
global solver. Set optimizer_type = \"global\" or remove \
constraints."
)

"""
Sets an initial points generator. Can be either
- "random" for uniform random numbers,
Expand Down

0 comments on commit fc9a509

Please sign in to comment.