Closed zasddsgg closed 1 month ago
coupled
means the parameter affects mass/energy and design, isolated
is usually used when the parameter only affects TEA/LCA.Thank you for your answer. May I ask you the following questions. Thanks for your help. Wish you a good day.
a) In https://biosteam.readthedocs.io/en/latest/API/evaluation/Model.html#biosteam.evaluation.Model.get_distribution_summary:~:text=kind%20(%7B%27coupled%27%2C%20%27isolated%27%2C%20%27design%27%2C%20%27cost%27%7D%2C%20optional)%20%E2%80%93, when do we choose kind=cost
?
b) For kind=coupled
, will it re-run the system? Is it running the entire process range?
For kind=design
, will it re-run the system? Is it running the entire process range?
For kind= isolated
, it will not re-run the system, right?
c) When do we use kind=design
? that is, only the design is affected, and the mass balance and energy balance are not affected.
d) If it only affects the mass balance and energy balance, but does not affect the design, is the kind chosen as coupled?
e) If I am not sure whether it will affect the design, mass balance and energy balance, is it better to use coupled than design and isolated?
f) For the top questions 3, 4, 5and 6, could I trouble you to look at them?
a. When the parameter only affects price (i.e., not mass/energy flow). b. Please see my previous replies on how the resimulation scope is determined. c. Yes d. Yes. e. Yes. Top 3. Loading affects mass. Top 4 and 5. I think it can be changed to design. When the lactic acid module was developed, the design option was not available. Top 6. cost is a different option, @yoelcortes maybe the doc should be updated?
@yalinli2, @zasddsgg,
Parameter kind='cost'
and kind='design'
are the same. Regardless if you pass 'cost' or 'design', both the design and cost algorithms are rerun when the parameter is simulated. Long ago, they meant different things, but the decision was made to simplify it. This was necessary because of how many times it is not possible to decouple design from costing (e.g., some new unit operations need to optimize their design to minimize cost). I will update the documentation to note that 'design' and 'cost' mean the same thing and both options are kept for backwards compatibility.
Update
@yalinli2 , sorry I forgot to update you regarding this change:
When running <Model>.evaluate()
the complete system always simulates regardless of what kinds of parameters it has ('coupled', 'isolated', or 'design'; it does not matter).
The only time the choice of 'coupled', 'isolated', vs. 'design' comes into play is when:
<Parameter>(value)
. See set_N_reactors_parameter(5)
in the documentation (https://biosteam.readthedocs.io/en/latest/tutorial/Uncertainty_and_sensitivity.html#Add-cost-parameters).convergence_model
, which is entirely optional (https://biosteam.readthedocs.io/en/latest/tutorial/Uncertainty_and_sensitivity.html#Monte-Carlo). I will update the documentation to make this more clear later today.
@zasddsgg, for your purposes, don't worry about the kind
argument... there is no need to pass any value.
Oh I see, perfect, thanks for the note!
On Sun, May 5, 2024 at 12:01 PM Yoel @.***> wrote:
@yalinli2 https://github.com/yalinli2, @zasddsgg https://github.com/zasddsgg,
For parameters, kind='cost' and kind='design' are the same. Regardless if you pass 'cost' or 'design', both the design and cost algorithms are rerun when the parameter is simulated. Long ago, they meant different things, but the decision was made to simplify it. I will update the documentation to note that 'design' and 'cost' mean the same thing and both options are kept for backwards compatibility.
Update @yalinli2 https://github.com/yalinli2 , sorry I forgot to update you regarding this change: When running
.evaluate() the system always simulates completely regardless of what kinds of parameters it has ('coupled', 'isolated', or 'design'; it does not matter). The only time the choice of 'coupled', 'isolated', vs. 'design' comes into play is when:
- Setting a parameter directly. For example,
(value), just like in the documentation ( https://biosteam.readthedocs.io/en/latest/tutorial/Uncertainty_and_sensitivity.html#Add-cost-parameters ). - When using a convergence_model, which is entirely optional ( https://biosteam.readthedocs.io/en/latest/tutorial/Uncertainty_and_sensitivity.html#Monte-Carlo ).
I will update the documentation to make this more clear later today.
@zasddsgg https://github.com/zasddsgg, for your purposes, don't worry about the kind argument... there is no need to pass any value.
— Reply to this email directly, view it on GitHub https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/issues/120#issuecomment-2094860777, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALV5VLPGOAV2H2RMNYZ63V3ZAZJVLAVCNFSM6AAAAABGX76LAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUHA3DANZXG4 . You are receiving this because you were mentioned.Message ID: @.*** com>
I got it. Thanks for your help.
Hello, could I ask you some questions about kind setting in uncertainty analysis in BioSTEAM. Thanks for your help. Wish you a good day.
Are the design, coupled and isolated parameters in https://biosteam.readthedocs.io/en/latest/API/evaluation/Parameter.html#:~:text=kind%20(str,in%20any%20way the same as the decision variables, technology parameters, and contextual parameters in the article “BioSTEAM-LCA: An Integrated Modeling Framework for Agile Life Cycle Assessment of Biorefineries under Uncertainty”?
In lactic acid models.py (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/models.py#L303-L309), solids loading will not only affect the mass and energy balance of the process, but also the unit design, why
kind
iscoupled
instead ofdesign
?The different loads (Pretreatment solids loading, Pretreatment sulfuric acid loading, Enzymatic hydrolysis solids loading, Enzyme loading) (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/models.py#L304-L316, https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/models.py#L331-L343), the
kind
are set tocoupled
, but how does the different loads (Pretreatment solids loading, Pretreatment sulfuric acid loading, Enzymatic hydrolysis solids loading, Enzyme loading) affect the mass and energy balance of the process, including the yield?For
@param(name='Enzymatic hydrolysis time')
(https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/models.py#L347), why kind is'coupled'
? Shouldn't theenzymatic hydrolysis time
only affect the unit design, how does it affect the energy balance and mass balance?How do
Acidulation time
andEnzymatic hydrolysis time
affect the mass balance and energy balance of the process (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/models.py#L411-L416, https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/models.py#L345-L350)? It seems that they only affect the unit design, so should thekind
bedesign
?Which
kind=cost
(https://biosteam.readthedocs.io/en/latest/tutorial/Uncertainty_and_sensitivity.html#:~:text=of%20reactors%27%2C-,element%3DR301%2C%20kind%3D%27cost%27%2C,-distribution%3Dshape ) in the tutorial corresponds todesign, coupled, isolated
in the API (https://biosteam.readthedocs.io/en/latest/API/evaluation/Parameter.html#:~:text=kind%20(str,in%20any%20way.)?