Background
We currently have an output file, assets.csv, which, among other things, includes fields for commission and decommission years as well as capacity. This works fine for divided assets now, as we only write child assets to the file (albeit there will potentially be many rows if there are many children), however, we should move to representing divided assets with just a parent asset, as we're doing elsewhere, as part of the march towards #1123.
Unlike other commissioned assets (children or non-divisible), parent assets can be partially decommissioned, meaning:
- They don't necessarily have a single decommission year
- Their capacity may decrease over time
My suggestion for output format
I'm not sure exactly the best way to do this, but we could add a second output file to track the decommissioning of assets over time (decommissioned.csv or whatever).
It could have columns like this:
asset_id,group_id,decommission_year,num_units
# ...
num_units would be the number of units decommissioned for that asset in that year and could be set to one for non-parent assets.
This would put the onus on the person analysing the data to compute changes in the capacity over time, however, so maybe it would also be useful to have a remaining_capacity column (and possibly a decommissioned_capacity one indicating how much was decommissioned in the specified year).
We could also consider renaming the capacity column in assets.csv to total_capacity or max_capacity or whatever as a reminder that the actual capacity may change over time.
We will also need to think about what to do with the decommission_year column in assets.csv. We could just drop it, which would be the simplest option, but maybe it would be useful to keep it around (in part because most assets won't be divisible, so there aren't the same subtleties to consider when looking at the data). If we kept it around, we could change its meaning to "the year in which 100% of the capacity was decommissioned", which for parent assets would be the year when the last child is decommissioned (if any).
Other required changes
This will also require changes to the way we represent decommissioned assets. Maybe we want a DecommissionedAssets struct, like this:
struct DecommissionedAssets {
asset: AssetRef,
num_units: u32,
decommission_year: u32
}
Then decommission_year could be dropped from struct Asset.
Background
We currently have an output file,
assets.csv, which, among other things, includes fields for commission and decommission years as well as capacity. This works fine for divided assets now, as we only write child assets to the file (albeit there will potentially be many rows if there are many children), however, we should move to representing divided assets with just a parent asset, as we're doing elsewhere, as part of the march towards #1123.Unlike other commissioned assets (children or non-divisible), parent assets can be partially decommissioned, meaning:
My suggestion for output format
I'm not sure exactly the best way to do this, but we could add a second output file to track the decommissioning of assets over time (
decommissioned.csvor whatever).It could have columns like this:
num_unitswould be the number of units decommissioned for that asset in that year and could be set to one for non-parent assets.This would put the onus on the person analysing the data to compute changes in the capacity over time, however, so maybe it would also be useful to have a
remaining_capacitycolumn (and possibly adecommissioned_capacityone indicating how much was decommissioned in the specified year).We could also consider renaming the
capacitycolumn inassets.csvtototal_capacityormax_capacityor whatever as a reminder that the actual capacity may change over time.We will also need to think about what to do with the
decommission_yearcolumn inassets.csv. We could just drop it, which would be the simplest option, but maybe it would be useful to keep it around (in part because most assets won't be divisible, so there aren't the same subtleties to consider when looking at the data). If we kept it around, we could change its meaning to "the year in which 100% of the capacity was decommissioned", which for parent assets would be the year when the last child is decommissioned (if any).Other required changes
This will also require changes to the way we represent decommissioned assets. Maybe we want a
DecommissionedAssetsstruct, like this:Then
decommission_yearcould be dropped from structAsset.