Skip to content

Commit 4ab4b48

Browse files
committed
Raise exception on ExploreObjective
1 parent b9f82aa commit 4ab4b48

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

optimas/generators/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
ContinuousVariable,
2626
DiscreteVariable,
2727
MinimizeObjective,
28+
ExploreObjective,
2829
)
2930
from gest_api.generator import Generator as StandardGenerator
3031

@@ -171,6 +172,8 @@ def _convert_vocs_objectives_to_objectives(self) -> List[Objective]:
171172
"""Convert VOCS objectives to optimas Objective objects."""
172173
objectives = []
173174
for obj_name, obj_type in self._vocs.objectives.items():
175+
if isinstance(obj_type, ExploreObjective):
176+
raise ValueError("EXPLORE is not supported in Optimas")
174177
minimize = isinstance(obj_type, MinimizeObjective)
175178
obj = Objective(name=obj_name, minimize=minimize)
176179
objectives.append(obj)

0 commit comments

Comments
 (0)