straindesign.speedy_fva ======================= .. py:module:: straindesign.speedy_fva .. autoapi-nested-parse:: Accelerated FVA using scan LPs and bound scanning. Standard FVA solves 2*n independent LPs (max and min for each reaction). This implementation reduces LP count via a two-phase approach: Phase 1 — Scan LPs (cheap, resolve ~50-70% of bounds): a. v=0 feasibility: free resolutions when zero flux is feasible b. min(sum(|x|)): pushes reactions toward zero, resolves lb=0/ub=0 bounds c. Push-to-bounds: directed objectives push unresolved reactions toward their variable bounds, with dual simplex warm-start for fast re-solves Each scan LP solution is processed by bound scanning (vectorized at-bound check that marks reactions whose flux equals their variable bound). Phase 2 — Individual LPs for remaining unresolved objectives: Sequential (warm-started) or parallel (SDPool) dispatch depending on problem size and thread count. Sequential mode includes co-optimization scanning: each LP vertex is checked for other reactions at their bounds. Module Contents --------------- .. py:function:: speedy_fva(model, **kwargs) Accelerated FVA using global scan LPs and KKT-based optimality propagation. Returns the same DataFrame as straindesign.lptools.fva. :param model: :type model: cobra.Model :param solver: :type solver: str, optional :param constraints: :type constraints: str or list, optional :param compress: Compress the model (coupled compression + conservation removal) before running FVA, then expand results back. None = auto (True if n >= 200). :type compress: bool or None, optional (default None) :param precheck: Run global scan LPs (min/max sum(|x|)) in Phase 1 to pre-resolve many objectives without individual LPs. None = auto (always True). :type precheck: bool or None, optional (default None) :param threads: Number of parallel workers for Phase 2 dispatch. None = auto (Configuration().processes if n >= 1000, else 1). :type threads: int or None, optional (default None) :param verbose: :type verbose: bool, optional (default False) :rtype: pandas.DataFrame with columns 'minimum' and 'maximum', indexed by reaction ID.