Consolidate data stacking into *Data classes #605
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
BusesData,ComponentsData,ConvertersData, andTransmissionsData— aligning them withFlowsData/StoragesData/EffectsDatawhich already followed this patternBusesModel,ComponentsModel,ConvertersModel,TransmissionsModel) are now pure consumers ofself.data.*, no longer responsible for stacking element parameters into arrayselements.py, ~460 lines added tobatched.pyWhat moved where
BusesDatabalance_coefficientsComponentsDatastatus_data,status_params,previous_status_dict,flow_mask,flow_count,with_prevent_simultaneousConvertersDatasigned_coefficients,equation_mask,max_equations,n_equations_per_converter,piecewise_*(8 properties)TransmissionsDatarelative_losses,absolute_losses,in1_mask,out1_mask,in2_mask,out2_mask,has_absolute_losses_mask,transmissions_with_abs_losses,bidirectional_ids,balanced_ids,balanced_in1_mask,balanced_in2_maskMinor cleanups
FlowsData.dim_name:@cached_property→@property(consistency with all other Data classes)TransmissionsModel: No longer calls privated._build_flow_mask()— uses pre-computedbalanced_in1_mask/balanced_in2_maskType of Change
Testing
Checklist