@@ -345,7 +345,7 @@ def test_scenarios_selection(flow_system_piecewise_conversion_scenarios):
345345
346346 assert flow_system .scenarios .equals (flow_system_full .scenarios [0 :2 ])
347347
348- np .testing .assert_allclose (flow_system .weights .values , flow_system_full .weights [0 :2 ])
348+ np .testing .assert_allclose (flow_system .scenario_weights .values , flow_system_full .scenario_weights [0 :2 ])
349349
350350 calc = fx .Optimization (flow_system = flow_system , name = 'test_scenarios_selection' , normalize_weights = False )
351351 calc .do_modeling ()
@@ -357,8 +357,8 @@ def test_scenarios_selection(flow_system_piecewise_conversion_scenarios):
357357 np .testing .assert_allclose (
358358 calc .results .objective ,
359359 (
360- (calc .results .solution ['costs' ] * flow_system .weights ).sum ()
361- + (calc .results .solution ['Penalty' ] * flow_system .weights ).sum ()
360+ (calc .results .solution ['costs' ] * flow_system .scenario_weights ).sum ()
361+ + (calc .results .solution ['Penalty' ] * flow_system .scenario_weights ).sum ()
362362 ).item (),
363363 ) ## Account for rounding errors
364364
@@ -752,8 +752,8 @@ def test_weights_io_persistence():
752752 fs_loaded = fx .FlowSystem .from_dataset (ds )
753753
754754 # Verify weights persisted correctly
755- np .testing .assert_allclose (fs_loaded .weights .values , fs_original .weights .values )
756- assert fs_loaded .weights .dims == fs_original .weights .dims
755+ np .testing .assert_allclose (fs_loaded .scenario_weights .values , fs_original .scenario_weights .values )
756+ assert fs_loaded .scenario_weights .dims == fs_original .scenario_weights .dims
757757
758758
759759def test_weights_selection ():
@@ -788,7 +788,7 @@ def test_weights_selection():
788788
789789 # Verify weights are correctly sliced
790790 assert fs_subset .scenarios .equals (pd .Index (['base' , 'high' ], name = 'scenario' ))
791- np .testing .assert_allclose (fs_subset .weights .values , custom_scenario_weights [[0 , 2 ]])
791+ np .testing .assert_allclose (fs_subset .scenario_weights .values , custom_scenario_weights [[0 , 2 ]])
792792
793793 # Verify weights are 1D with just scenario dimension (no period dimension)
794- assert fs_subset .weights .dims == ('scenario' ,)
794+ assert fs_subset .scenario_weights .dims == ('scenario' ,)
0 commit comments