Giter VIP home page Giter VIP logo

Comments (3)

hariszaf avatar hariszaf commented on August 18, 2024

Hi @vfisikop

The medium is being used by the user as you can see here.

Though, we were missing a setter, I fixed that already.

I also added an example of how to use this in the README.

Similarly, the shut_down_reaction is supposed not to allow a reaction to occur if the user goes for it.

These functions alter the model, thus the polytope that will be returned later on from the get_polytope .

from dingo.

vfisikop avatar vfisikop commented on August 18, 2024

Thanks for the clarification. Regarding medium method if it is only used to update the dictionary then why not simply add a method update_medium instead. Then the update will be done in one line of code and (more important) you will not copy the entire dictionary just to update a few entries.

from dingo.

hariszaf avatar hariszaf commented on August 18, 2024

Apologies, I am not sure I am following.
Once the medium is changed we need to change certain things in the model.
That's what we do in the setter

I tried to follow the scheme of cobrapy for that as it's tricky.

I need to still work a little bit on it because now if someone tries this:

for k,v in model.medium.items():
    model.medium[k] = 0
model.medium

will get

{'EX_co2_e': 0, 'EX_glc__D_e': 0, 'EX_h_e': 0, 'EX_h2o_e': 0, 'EX_nh4_e': 0, 'EX_o2_e': 0, 'EX_pi_e': 0}

but if they run model.fba() they still get the initial solution.
Meaning the model.medium looks like it changes but the constraints did not.

If you have any ideas let me know! :)

from dingo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.