Skip to content

Commit

Permalink
Reversed changes that don't work with AntaresWeb and expanded the Exp…
Browse files Browse the repository at this point in the history
…ortMPS enum to include boolean values.
  • Loading branch information
Sigurd-Borge committed Oct 14, 2024
1 parent 71b0607 commit 4a968fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/antares/model/settings/advanced_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from pydantic import BaseModel
from pydantic.alias_generators import to_camel

from antares.model.settings.general import OutputChoices
from antares.tools.all_optional_meta import all_optional_model


Expand Down Expand Up @@ -70,7 +69,7 @@ class RenewableGenerationModeling(Enum):

class DefaultAdvancedParameters(BaseModel, alias_generator=to_camel):
# Advanced parameters
accuracy_on_correlation: set[OutputChoices] = set()
accuracy_on_correlation: str = ""
# Other preferences
initial_reservoir_levels: InitialReservoirLevel = InitialReservoirLevel.COLD_START
hydro_heuristic_policy: HydroHeuristicPolicy = HydroHeuristicPolicy.ACCOMMODATE_RULES_CURVES
Expand Down
2 changes: 2 additions & 0 deletions src/antares/model/settings/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ class SimplexOptimizationRange(Enum):


class ExportMPS(Enum):
FALSE = False
NONE = "none"
OPTIM1 = "optim1"
OPTIM2 = "optim2"
BOTH_OPTIMS = "both-optims"
TRUE = True


class DefaultOptimizationParameters(BaseModel, alias_generator=to_camel):
Expand Down
2 changes: 1 addition & 1 deletion tests/antares/services/local_services/test_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def test_local_study_has_correct_advanced_parameters(self, local_study):
# Given
expected_advanced_parameters = DefaultAdvancedParameters.model_validate(
{
"accuracy_on_correlation": set(),
"accuracy_on_correlation": "",
"initial_reservoir_levels": InitialReservoirLevel.COLD_START,
"hydro_heuristic_policy": HydroHeuristicPolicy.ACCOMMODATE_RULES_CURVES,
"hydro_pricing_mode": HydroPricingMode.FAST,
Expand Down

0 comments on commit 4a968fd

Please sign in to comment.