diff --git a/pareto_analysis/pareto_analysis.py b/pareto_analysis/pareto_analysis.py index 9be45aa25add4597029cfd92f1c529ace65e368b..e86650d855dcd7da523ec46fab92021c1cf0f6a4 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