e4st-dev / E4ST.jl

Engineering, Economic, and Environmental Electricity Simulation Tool (E4ST)
GNU General Public License v3.0
7 stars 1 forks source link

Generator hash ID #266

Open sallyrobson opened 7 months ago

sallyrobson commented 7 months ago

While we do not require any unique generator IDs in the model, it may be useful in some cases (results processing, policies applied to specific generators, etc). We decided that the best way to implement this would be using hashes (either in their original form or as strings). Hashes can be generated using the hash() function and will always be the same if they are passed the same object/information.

To implement this in our data we would add a column to the gen table where the hash is generated based on things like name, plant ID, historic capacity, and other unique identifiers (but not bus ID).

In E4ST.jl we would then implement this as a generic mod, something like GenHashID. This mod would take in just the column name of the hashes in the gen table (ie. gen_hash). In modify_raw_data() it would create that column in the build_gen table and set all rows to something like hash(0) as a temporary filler. In modify_setup_data(), the mod would look at the gen table and for anything row with the filler hash it would generate a has based on unique things like gentype, bus ID, build_id (here the main things are gentype and bus ID because of how build_gen creates new build options). This hash would stay with the generator in the saved results and could be references in any sequential sims.

sallyrobson commented 7 months ago

269