copasi / basico

A simplified python interface to COPASI.
https://basico.readthedocs.io/
Artistic License 2.0
19 stars 5 forks source link

Fluxes Optimization with Evolutionary Algorithms #62

Open V0idLord opened 1 day ago

V0idLord commented 1 day ago

Hello,

I am working on a task using a kinetic SBML model to optimize the flux of a reaction. I used basico package in order to add my reactions and parameters to the model, but got stuck on the optimization task itself, specifically on how to set up the objective function, I am sorry to bother you if this isn't the right place for these questions, I read the optimization notebook in docs but I wasn't able to solve the problem. Specifically, how to write the expression in set_objective_function(expression='Values[f].InitialValue', maximize=True) in order to maximize a flux?

How exactly do I set a flux as the maximization objective function and how to create the list of targets for optimization (Ki, Km and Vmax in my case)? I want to implement this as a script, as such I prefer doing it in basico instead of the GUI COPASI.

Any help is appreciated :)

fbergmann commented 12 hours ago

This is the right place to ask these questions. To maximise the flux of a Reaction say J1 the expression would be (J1).Flux and then you'd add the bounds on ki, km and vmax as parameters to vary in the optimisation. I'll try and put together an example for that early next week.