EnergySystemsModellingLab / MUSE_OS

Welcome to the MUSE-OS repository
https://muse-os.readthedocs.io/en/latest/
GNU General Public License v3.0
22 stars 8 forks source link

[BUG] A single standalone technology cannot produce more than one commodity #249

Closed AAQ2019 closed 3 months ago

AAQ2019 commented 3 months ago

An example of one technology with multiple output commodities is Oil Refinery which takes in Crude Oil and produces LPG, DSL, and GASOLINE.

It is possible to assign more than one output commodity in CommOut.csv, however, in Technodata.csv there is only one EndUse per technology. This will not fit for the other output commodities. So, if the same technology is replicated in Technodata.csv for the same techno-economic parameters for the same timeframe while changing EndUse commodity to fit for all output commodities, this will still not work and will creates the following error:

ValueError: cannot convert a DataFrame with a non-unique MultiIndex into xarray

sgiarols commented 3 months ago

Replicating technologies for different enduses in the technodata is not the correct approach, as evidenced by the ValueError. The technodata EndUse is not meant to be replicated in the way described because it is just used at the moment of screening / filtering across technologies in terms of their main product. It is thus used as an agent filter. The method to have multiple outputs is just via the standard CommOUT.csv. I hope this clarifes.