コード例 #1
0
def test_constraint_mixed_objective_optimisation():
    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.run()
    for opt_x, constraint_x in zip(champion_x, mix_opt.constraints()):
        assert opt_x <= constraint_x
コード例 #2
0
#
#
#
# -------------------------------------------------------------------------------------

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

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

battery = Battery_managed(battery_capacity, config=config)

#
#
#