Rescale

liftCouplingConstraints(model, BIG, printLevel)[source]

Reformulates badly-scaled coupling constraints C*v <=> d by lifting them to a better scaled problem in a higher dimension by introducing dummy variables.

Assumes C does not contain very small entries and transforms constraints containing very large entries (entries larger than BIG).

Reformulation techniques are described in detail in: Y. Sun, R. M.T. Fleming, M. A. Saunders, I. Thiele, An Algorithm for Flux Balance Analysis of Multi-scale Biochemical Networks, submitted.

USAGE

[LPproblem] = reformulate (model, BIG, printLevel)

INPUTS

model

  • C - k x n Left hand side of C*v <= d

  • d - k x 1 Right hand side of C*v <= d

  • ctrs k x 1 Cell Array of Strings giving IDs of the coupling constraints

  • dsense - k x 1 character array with entries in {L,E,G}

OPTIONAL INPUTS

‘BIG’ Value consided a large coefficient. BIG should be set between 1000 and 10000 on double precision machines. printLevel 1 or 0 enables/diables printing respectively.

OUTPUTS
  • model

    • E m x evars Sparse or Full Matrix of Double Matrix of additional, non metabolic variables (e.g. Enzyme capacity variables)

    • evarlb evars x 1 Column Vector of Doubles Lower bounds of the additional variables

    • evarub evars x 1 Column Vector of Doubles Upper bounds of the additional variables

    • evarc evars x 1 Column Vector of Doubles Objective coefficient of the additional variables

    • evars evars x 1 Column Cell Array of Strings IDs of the additional variables

    • evarNames evars x 1 Column Cell Array of Strings Names of the additional variables

    • C ctrs x n Sparse or Full Matrix of Double Matrix of additional Constraints (e.g. Coupling Constraints)

    • ctrs ctrs x 1 Column Cell Array of Strings IDs of the additional Constraints

    • ctrNames ctrs x 1 Column Cell Array of Strings Names of the of the additional Constraints

    • d ctrs x 1 Column Vector of Doubles Right hand side values of the additional Constraints

    • dsense ctrs x 1 Column Vector of Chars Senses of the additional Constraints

    • D ctrs x evars Sparse or Full Matrix of Double Matrix to store elements that contain interactions between additional Constraints and additional Variables.

  • The linear optimisation problem derived from this model is then of the form – [S, E; C, D]*x {L,E,G} [b;d]

liftModel(model, BIG, printLevel, fileName, directory)[source]

Lifts a COBRA model with badly-scaled stoichiometric and coupling constraints of the form: \(max c*v\) subject to: \(Sv = 0, x, Cv <= 0\) Converts it into a COBRA LPproblem structure, which can be used with solveCobraLP. Fluxes for the reactions should stay the same i.e. sol.full(1:nRxns) should yield an optimal flux vector.

USAGE

LPproblem = liftModel (model, BIG, printLevel,fileName,directory)

INPUTS

model – COBRA LPproblem Structure containing the original LP to be solved. The format of this struct is described in the documentation for solveCobraLP.m

OPTIONAL INPUTS
  • BIG – A parameter the controls the largest entries that appear in the reformulated problem (default = 1000).

  • printLevel – printLevel = 1 enables printing of problem statistics (default); printLevel = 0 silent

  • fileName – name of th file to load

  • directory – file directory (if model is empty, you can load it using fileName and directory)

OUTPUTS

LPproblem – COBRA Structure contain the reformulated LP to be solved.

reformulate(LPproblem, BIG, printLevel)[source]

Reformulates badly-scaled FBA program Transforms LPproblems with badly-scaled stoichiometric and coupling constraints of the form: \(max c*x\) subject to: math:Ax <= b

Eliminates the need for scaling and hence prevents infeasibilities after unscaling. After using PREFBA to transform a badly-scaled FBA program, please turn off scaling and reduce the aggressiveness of presolve.

Rransforms a badly-scaled LPproblem contained in the struct FBA and returns the transformed program in the structure FBA. reformulate assumes S and C do not contain very small entries and transforms constraints containing very large entries (entries larger than BIG). BIG should be set between 1000 and 10000 on double precision machines. printLevel = 1 or 0 enables/diables printing respectively.

Reformulation techniques are described in detail in: Y. Sun, R. M.T. Fleming, M. A. Saunders, I. Thiele, An Algorithm for Flux Balance Analysis of Multi-scale Biochemical Networks, submitted.

USAGE

[LPproblem] = reformulate (LPproblem, BIG, printLevel)

INPUTS
  • LPproblem – Structure contain the original LP to be solved. The format of this struct is described in the documentation for solveCobraLP.m

  • BIG – A parameter the controls the largest entries that appear in the reformulated problem.

  • printLevel – 1 enables printing of problem statistics; 0 = silent

OUTPUTS

LPproblem – Structure contain the reformulated LP to be solved.