-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structure reformation of namespace for expressions, variables and constraints #79
Comments
For different sectors including power, hydrogen, carbon and synthesis fuels, single character like P, H, C, F could be used as sector identifier. With more energy sectors involved, more characters could be used. |
Specifically, in power sector, four nodes are GEN for generation, NET for network transportation, STO for storage and D for demand. Capacity variables for each technology with distinguishment of newly built, retirement, existing and total should be also taken into the structure. Leaving physical modeling aside, it's time to discuss something about costs. Capital expenditure (CAPEX), operational expenditure (OPEX) and potential replacement expenditure (REPEX) are the sub-first terms. Under this level, OPEX could be divided into FOM and VOM. This part is mainly expressions attached to costs. Maybe |
Nearly finishing modeling, some hidden things should be revealed that inputs and sets for indexing could also be named with this name space cause they also suffers from expansiong of energy sectors. Sets could all be capital which is easy to recognize. But Z, T, G, H which are single character should be used carefully. To distinguish a concept of global and local, we could use Z and T across the whole model but it will cause zonal asymmetricity for different energy sectors. Temporarily we assume that a zone is an energy hub, but this also could be expanded by using multi zonal index and sets. It's ok to do so with T. But other sets like generators set, line set, carbon cap set and load curtailment segment should be specified. We could add energy sector identifier and then saperate key words with underscore. Inputs are more complicated since we throw nearly everything into inputs to be passed into the model. Inner containment is almost unknown. Hierarchical inputs data structure is unacceptable since we will not know through how many levels could we have access to the data we need. So one layer of data packing through dictionary is perfectly designed and name space should be carefully used. Energy sector identifier is still a good way to distinguish the difference. |
This issue will be reopened if next version is on schedule. For the current version this may have large impact on existing code and users. |
Adopted from GenX repo, basic name space for expression, variables and constraints has some patterns like starting with
e
for expressions, withv
for variables and withc
for constraints. Balance constraints will havebalance
in name space and common constraints will havecon
basically. But now we need more energy sectors being modeled and this name space is expanding fast out of easy-going understanding area.A more detailed name space should be designed and applied to take future and current developing energy sectors into consideration.
Generally we need to design name space for different energy sectors, energy flow nodes/joints inside each energy sector and different technical levels. This is hierarchical structure extraction from physical modeling. Besides this in code level, different macros in JuMP should firstly be distinguished for referencing them. And at the same time model name space should be combined.
In this structure, typically the name space will be like
vPPower
for power output (Power) in electricity sector (P), note that it involves multi energy nodes (generation and storage) so this level is missing.ePPowerBalance
for generic power balance (PowerBalance) in electricity sector (P) of different zones at any time. Still, it involves multi energy nodes (generation and storage) so this level is missing. Since we know it's for electricity, we may useBalance
instead ofPowerBalance
.cPPowerBalance
for generic power balance (PowerBalance) in electricity sector (P) of different zones at any time given demand. Still, it involves multi energy nodes (generation and storage) so this level is missing.And some examples using full name space will be like
vPGenThemalCommit
(maybevPGenThemalOnline
) for thermal unit commit.P
for sector,Gen
for energy flow nodes,Commit
for technical level.ePPowerBalanceGenThermalCommit
andePPowerBalanceGenThermalNoCommit
for balance sub terms andePPowerBalanceGenThermalAll
for adding them. The name space is long while readable and easy to understand.cPGenThermalRampingUp
andcPGenThermalRampingDn
for ramping constraints. Also, for unit commitment constraints,cPGenThermalUCStart
andcPGenThermalUCInter
.But practice is more complicated, I think more familiar abbreviation could help reduce the length and construct them. Another problem to consider is the usage of capital form or lower form. It's not a big deal but affects reading experience.
The text was updated successfully, but these errors were encountered: