QSD-Group / EXPOsan

EXPOsition of sanitation and resource recovery systems
https://qsdsan.com
Other
16 stars 6 forks source link

Uncertain parameters excluded fron non-country specific analysis #16

Closed yalinli2 closed 2 years ago

yalinli2 commented 2 years ago

In models.py, lines 489-505, 537-553, 643, these parameters were commented out, I can understand that they are excluded when country-specific is True as their values will be updated separately, but in the current that it's coded, they would be excluded from uncertainty analysis, should they be included or not?

https://github.com/QSD-Group/EXPOsan/blob/8420ffcf100b34ab6c98ba9922986863b69b6b2f/exposan/biogenic_refinery/models.py#L489

yalinli2 commented 2 years ago

@lsrowles just to tag you, I probably should've done this when I opened the issue, thanks!

lsrowles commented 2 years ago

@yalinli2 For the general analysis (not country specific), uncertainty was included for those parameters. It may be commented out in this version because it was when the value of the nutrients was fixed to see how that impacted the total user costs. In brief, I think it can be included and maybe a comment can be added before it to note that these values were fixed in the analysis where the impact of nutrients value was assessed on costs. Thanks!

yalinli2 commented 2 years ago

Sounds great, thanks @lsrowles ! I've added those back in 677527add4542d9b2e611311f8c0447282c6a099. Note that I don't recommend using commenting to remove model parameters (because you'll have to go to edit the code each time you do it), I'd recommend either

  1. adding a kwarg in the function to determine whether you want to add those parameters, similar to the country_specific kwarg here (better approach)
  2. or you can remove those parameters after you create the model, e.g.,
    model = create_model('A')
    model.parameters = [p for p in model.parameters if not 'fertilizer price' in p.name]