Closed ym2877 closed 1 year ago
Hi @ym2877 ,
Thank you for bringing this up, so biased FVA is done after optimizing for an initial objective function, unbiased FVA is when the initial optimization does not occur--therefore unbiased to a particular objective. The optPerc is just set to avoid numerical instabilities when 100% of the objective is set as bound.
What do you think?
Unless I'm misunderstanding, I don't believe that's exactly the same thing. Let's say you have some objective set on the model with the following bounds- 0.5 <= communityObjective <= 1.0
. Let's also assume that, when initially optimizing the model, the maximum value for this objective is equal to 1.0. Let's say I were to pass in an optPerc of 30- this would then set the objective bounds to 0.3 <= communityObjective <= 1.0
. If I passed it in as 100, it would give me bounds of 1.0 <= communityObjective <= 1.0
With the way it's currently set up, there is no way for me to keep the original bounds of the objective (i.e. 0.5 <= communityObjective <= 1.0
). With this fix, passing in optPerc as -1 will ensure that we do not change the bounds at all
Hi Yoli, yes I think this is very useful and will merge it. My first comment was just to clarify terminology--unbiased FVA is indeed a different thing (bias comes from the objective function; unbiased FVA is when optPerc=0).
On another note, You can still use optPerc =1 to get a rounded value of the original objective, because using the exact value will lead almost certainly to numerical instabilities. Give it a shot!
Ahh, I see what you mean. Sorry for the misunderstanding! :)
Hi!
I noticed that your current implementation only supports a biased FVA (where the lower bound of the objective is set to a certain % of optimal value). There are certain instances where someone might not want to do this, and instead utilize the bounds that are already set within the model. I added support for this by allowing users to pass in -1 as the optPerc parameter in order to trigger
regular
FVA. I also added corresponding print statements.This will not change any of the current functionality, and will only trigger in cases where a user passes in -1 for the optPerc parameter.
Best, Yoli