Skip to content

minimal media question #1317

Answered by cdiener
amarsh26 asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah, if you manually enter the data that will introduce small errors what will change the output slightly. The default output will not show all digits of a float, so something like 0.10000023344 will become 0.1 there. If you just copy that you something that is somewhat but not exactly the same. If you assign directly without truncating it should be much closer, e. g.

# ...
model_default_growth = iml1515_model.slim_optimize() 
med = minimal_medium(iml1515_model, model_default_growth) 
with iml1515_model as mod:
    mod.medium = med
    model_minimal_growth = mod.slim_optimize()
print(model_default_growth, model_minimal_growth)

Those values should be within the solver tolerance.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by amarsh26
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1313 on February 24, 2023 04:22.