From bd54324c0c2234a9633dab2ea5fdb7592bcc2feb Mon Sep 17 00:00:00 2001 From: "christoph.von.oy" <christoph.von.oy@rwth-aachen.de> Date: Tue, 16 Apr 2024 10:44:47 +0200 Subject: [PATCH] Everything is Topology now --- pareto_analysis/pareto_analysis.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pareto_analysis/pareto_analysis.py b/pareto_analysis/pareto_analysis.py index 9be45aa..e86650d 100644 --- a/pareto_analysis/pareto_analysis.py +++ b/pareto_analysis/pareto_analysis.py @@ -26,11 +26,11 @@ import os import pyomo.environ as pyo from pyomo.opt import SolverStatus, TerminationCondition -def pareto_analysis(entity, strategy): +def pareto_analysis(topology, strategy): if len(strategy) != 2: raise ValueError('Pareto analysis can only be done with two strategies!') - model = entity._topology.build_model(entity._name, entity._dynamic) + model = topology.build_model(topology._name, topology._dynamic) model = model.block strategy_names = list(strategy.keys()) @@ -97,4 +97,4 @@ def pareto_analysis(entity, strategy): plot.grid(True) plot.xlabel(strategy_name_1) plot.ylabel(strategy_name_2) - plot.savefig('output_files/' + entity._name + '_pareto_front.png') \ No newline at end of file + plot.savefig('output_files/' + topology._name + '_pareto_front.png') \ No newline at end of file -- GitLab