Sunday, March 8, 2009

Linear Programming with LPsolve

The lpsolve library has been integrated into TinkerCell. The code is in c/lpsolve.c and the lpsolve package is included in the c/lpsolve directory. 

The generic outline of the code is as follows:

  • get selected connections (error if none)
  • get stoichiometry for all items
  • find columns of the stoichiometry corresponding to selected items
  • setup lpsolve with the selected connections as the objective 
  • setup lpsolve with the stoichiometry as the constraint
  • solve
  • get the optimal values and post them on the screen using tc_displayText

No comments: