Skip to content

Commit

Permalink
Fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliette-Gerbaux committed Jun 28, 2024
1 parent 0434b5c commit 873a837
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
10 changes: 3 additions & 7 deletions src/andromede/hydro_heuristic/heuristic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@

from typing import List

from andromede.expression import literal, param, var, ExpressionNode
from andromede.expression import ExpressionNode, literal, param, var
from andromede.expression.indexing_structure import IndexingStructure
from andromede.model import Model, float_parameter, float_variable, model
from andromede.model.constraint import Constraint
from andromede.model.parameter import float_parameter
from andromede.model.variable import float_variable
from andromede.model.constraint import Constraint
from andromede.model.parameter import Parameter
from andromede.model.variable import Variable
from andromede.model.parameter import Parameter, float_parameter
from andromede.model.variable import Variable, float_variable

CONSTANT = IndexingStructure(False, False)
TIME_AND_SCENARIO_FREE = IndexingStructure(True, True)
Expand All @@ -33,7 +30,6 @@ def get_heuristic_hydro_model(
hydro_model: Model,
horizon: str,
) -> Model:

HYDRO_HEURISTIC = model(
id="H",
parameters=[p for p in hydro_model.parameters.values()]
Expand Down
5 changes: 2 additions & 3 deletions src/andromede/hydro_heuristic/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
import ortools.linear_solver.pywraplp as pywraplp
import pandas as pd

from andromede.hydro_heuristic.heuristic_model import get_heuristic_hydro_model
from andromede.simulation import (
BlockBorderManagement,
OutputValues,
TimeBlock,
build_problem,
)
from andromede.simulation.optimization import OptimizationProblem
from andromede.study import (
ConstantData,
DataBase,
Expand All @@ -30,9 +32,7 @@
TimeSeriesData,
create_component,
)
from andromede.simulation.optimization import OptimizationProblem
from tests.functional.libs.lib_hydro_heuristic import HYDRO_MODEL
from andromede.hydro_heuristic.heuristic_model import get_heuristic_hydro_model


def create_hydro_problem(
Expand Down Expand Up @@ -73,7 +73,6 @@ def create_hydro_problem(
time_block,
scenarios,
border_management=(BlockBorderManagement.CYCLE),
solver_id="XPRESS",
)

return problem
Expand Down
1 change: 0 additions & 1 deletion tests/functional/libs/lib_hydro_heuristic.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from andromede.model.constraint import Constraint
from andromede.model.parameter import float_parameter
from andromede.model.variable import float_variable
from andromede.model.constraint import Constraint

CONSTANT = IndexingStructure(False, False)
TIME_AND_SCENARIO_FREE = IndexingStructure(True, True)
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_hydro_heuristic_complex_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
from typing import List

from andromede.hydro_heuristic.data import (
calculate_weekly_target,
get_all_data,
get_number_of_days_in_month,
get_target,
calculate_weekly_target,
)
from andromede.hydro_heuristic.problem import create_hydro_problem, solve_hydro_problem

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
import pytest

from andromede.hydro_heuristic.data import (
calculate_weekly_target,
get_all_data,
get_number_of_days_in_month,
get_target,
calculate_weekly_target,
)
from andromede.hydro_heuristic.problem import create_hydro_problem, solve_hydro_problem

Expand Down

0 comments on commit 873a837

Please sign in to comment.