@@ -172,22 +172,15 @@ def run(
172172
173173 def get_node_variables (self ) -> pd .DataFrame :
174174 """Return the node-specific variables."""
175- output_processor = OutputProcessor (
176- year = self .inputs .year ,
177- fuelmap = self .inputs .fuelmap ,
178- nodal_hourly_demand = self .inputs .demand ,
179- )
180- self .node_variables = self .system_record .get_node_variables ()
181- output_processor .load_node_variables_from_df (self .node_variables )
182- return output_processor .node_variables
175+ return self .system_record .get_node_variables ()
183176
184177 def get_flow_variables (self ) -> pd .DataFrame :
185178 """Return the flow variables."""
186- return self .system_record .flow_variables
179+ return self .system_record .get_flow_variables ()
187180
188181 def get_systemwide_variables (self ) -> pd .DataFrame :
189182 """Return the system variables"""
190- return self .system_record .systemwide_variables
183+ return self .system_record .get_systemwide_variables ()
191184
192185 def write_results (self , output_folder : str ) -> None :
193186 """Write the simulation results to files"""
@@ -208,28 +201,26 @@ def plot_fuelmix(self, chart_type: str, output_folder: str = None) -> None:
208201 "Invalid chart type. Choose between 'fuelmix' and 'fuelmix_area'."
209202 )
210203
211- output_processor = OutputProcessor (
212- inputs = self .inputs ,
213- )
214- node_var_df = self .system_record .get_node_variables ()
215- output_processor .load_from_dataframe (node_var_df )
204+ output_processor = OutputProcessor ()
205+ output_processor .load (self .inputs )
216206
217- visualizer = Visualizer ( model_id = self .inputs . model_id )
207+ node_variables = self .system_record . get_node_variables ( )
218208
209+ visualizer = Visualizer (model_id = self .inputs .model_id )
219210 if chart_type == "bar" :
220211 visualizer .plot_fuelmix_bar (
221- dispatch = output_processor .get_hourly_dispatch ( ),
222- demand = output_processor .get_hourly_demand (),
212+ dispatch = output_processor .get_hourly_generation ( node_variables ),
213+ demand = output_processor .get_hourly_demand (self . inputs . demand ),
223214 output_folder = output_folder ,
224215 )
225216 elif chart_type == "area" :
226217 visualizer .plot_fuelmix_area (
227- dispatch = output_processor .get_hourly_dispatch ( ),
228- demand = output_processor .get_hourly_demand (),
218+ dispatch = output_processor .get_hourly_generation ( node_variables ),
219+ demand = output_processor .get_hourly_demand (self . inputs . demand ),
229220 output_folder = output_folder ,
230221 )
231222
232- def plot_unit_status (self , output_folder : str = None ) -> None :
223+ def plot_thermal_units (self , output_folder : str = None ) -> None :
233224 """Plot the status of the thermal units
234225
235226 Args:
@@ -238,14 +229,17 @@ def plot_unit_status(self, output_folder: str = None) -> None:
238229 Returns:
239230 None
240231 """
241- output_processor = OutputProcessor (
242- inputs = self .inputs ,
243- )
244- output_processor .load_from_dataframe (self .system_record .get_node_variables ())
232+ node_variables = self .system_record .get_node_variables ()
233+
234+ output_processor = OutputProcessor ()
235+ output_processor .load (self .inputs )
236+
245237 visualizer = Visualizer (model_id = self .inputs .model_id )
246238 visualizer .plot_thermal_units (
247- unit_status = output_processor .get_unit_status (),
248- thermal_dispatch = output_processor .get_hourly_thermal_dispatch (),
239+ unit_status = output_processor .get_thermal_unit_hourly_status (node_variables ),
240+ thermal_dispatch = output_processor .get_thermal_unit_hourly_dispatch (
241+ node_variables
242+ ),
249243 thermal_rated_capacity = self .inputs .thermal_rated_capacity ,
250244 output_folder = output_folder ,
251245 )
@@ -259,10 +253,6 @@ def plot_lmp(self, output_folder: str = None) -> None:
259253 Returns:
260254 None
261255 """
262- output_processor = OutputProcessor (
263- inputs = self .inputs ,
264- )
265- output_processor .load_from_dataframe (self .system_record .get_node_variables ())
266256 visualizer = Visualizer (model_id = self .inputs .model_id )
267257 visualizer .plot_lmp (
268258 lmp_df = self .system_record .get_lmp (),
0 commit comments