Smoothconcave

SparseLP_old(c, polyhedron, zeps, max_warm_start)[source]

Compute the sparsest solution of a linear program (LP)

\[\begin{split}min ~& c^T x \\ s.t. ~& S x = b \\ ~& lb \leq x \leq ub\end{split}\]
USAGE:

[result_tab, error_code, nb_warm_start, z] = SparseLP_old (c, polyhedron, zeps, max_warm_start)

INPUTS:
  • cn x 1 linear objective coefficient vector

  • polyhedron – Structure describing the feasible polyhedron, with fields:

    • .Aeq - equality constraint matrix (Aeq*x = beq)

    • .beq - equality constraint right hand side vector

    • .Ain - inequality constraint matrix (Ain*x <= bin)

    • .bin - inequality constraint right hand side vector

    • .lb - lower bound vector

    • .ub - upper bound vector

  • zeps – Precision threshold below which a value is considered to be zero

  • max_warm_start – Maximum number of warm starts allowed for the sparsity-seeking (Theta L0) iterations

OUTPUTS:
  • result_tab – Vector of the number of nonzeros achieved at each stage (initial LP solution, L1-norm solution, and each successive warm-started L0 iteration)

  • error_code – 0 - success; 1 - the initial LP is unbounded/infeasible

  • nb_warm_start – Number of warm-start (Theta L0) iterations performed

  • zn x 1 sparsest solution vector found

findMinimalSetOfRxns(model)[source]

This function finds the minimal set of reactions subject to a LP objective function \(min ||x||_0\) \(min c'x\) s.t. \(Sx = b\) \(lb <= x <= ub\)

USAGE:

[result_tab, sol, lprxns, l1rxns, l0rxns] = findMinimalSetOfRxns (model)

INPUT:

model – COBRA model structure with fields:

  • .c - Objective coefficients

  • .S - Stoichiometric matrix

  • .b - Right hand side of S*x = b

  • .lb - Lower bound vector

  • .ub - Upper bound vector

OUTPUTS:
  • result_tab – number of reactions obtained for each condition

  • solx - solution vector

  • lprxns – rxns indices for LP solution

  • l1rxns – rxns indices for L1 solution

  • l0rxns – rxns indices for L0 solution

main_norm0[source]

Code matlab