예제 #1
0
def test_constraint_mixed_objective_optimisation_island():
    con_mix_opt = Constraint_mixed_objective_optimisation(task, config=config)
    mix_opt = Mixed_objective_optimization_function(task, config=config)
    champion, champion_x = con_mix_opt.island_run()
    for opt_x, constraint_x in zip(champion_x, mix_opt.constraints()):
        assert opt_x <= constraint_x
예제 #2
0
from tests.test_env import *

from D3HRE.management import Dynamic_environment, Reactive_follow_management, Absolute_follow_management, Finite_horizon_optimal_management, EWMA_management
from D3HRE.optimization import Constraint_mixed_objective_optimisation
from D3HRE.simulation import Reactive_simulation
from D3HRE.core.battery_models import Battery_managed

# -------------------------------------------------------------------------------------
#
#
#
#
#
# -------------------------------------------------------------------------------------

con_mix_opt = Constraint_mixed_objective_optimisation(test_task, config=config)

#
#
#
#
#
#
#

champion, champion_x = con_mix_opt.run()
solar_area, wind_area, battery_capacity = champion_x

# ---------------------------------------------------------------------------------------
#
#