Week 11 - Legacy Backends Removed, Bridge Constraints, and Build Fixes

This week I removed the old SCPSolver/GLPK stack, confirmed OptSolvX as the default solver path in SBSCL, fixed an ODE compatibility issue, and extended constraint tests for the bridge.

Progress

Legacy backends removed (SCPSolver/GLPK/Lp_solve)

  • Deleted org.simulator.fba.NewGLPKSolver.

  • Dropped Maven dependencies for SCPSolver, GLPK, and Lp_solve.

  • Verification:

    • mvn -DskipTests clean compileBUILD SUCCESS

    • mvn dependency:tree | grep -i "scpsolver\|glpk\|lpsolve"no results

    • Only references left are in legacy test scripts outside the Maven build.

OptSolvX confirmed as the default path

  • FluxBalanceAnalysis now resolves the backend via ServiceLoader with fallback, using the OptSolvX adapter by default.

  • FbaToOptSolvX remains the central SBML FBC → LP translation layer.

ODE compatibility fix

  • Re-added commons-math:2.2 (alongside commons-math3:3.6.1) for legacy ODE APIs.

  • Project builds cleanly again without org.apache.commons.math.ode errors.

Bridge constraint tests (S·v = 0)

  • New BridgeConstraintTests cover:

    • unitStoich_reactant_negativeSign_and_count

    • nonUnitStoich_signs_and_values (net +0.5 for 3.5 → 4.0)

    • species_on_both_sides_netZero_should_not_create_constraint

    • summing_across_multiple_reactions_and_filter_zero_entries

    • boundary_species_are_ignored

    • ignore_species_with_no_participation

    • multiple_species_constraint_counts_and_per_species_entries

  • Existing BridgeSmokeTest and BridgeObjectiveTest remain green.

Small performance and code hygiene

  • Bridge caches SBML lists/IDs and presizes maps.

  • Unified comment sections for consistency

Logs and behavior

  • Expected warning when FBC objective is not set:
    WARNING: FBC Objective not set; using empty objective (objective=0).

  • Example build log from tests:
    INFO: FbaToOptSolvX: built LP (vars=2, cons=2, objectiveVars=0, dir=MAXIMIZE)

Next steps

  • Complete the full FBC → LP mapping (bounds, objectives, reaction constraints, variable naming, objective sense).

  • Add integration tests on small BiGG-style FBC models and edge cases (unbounded, infeasible, multiple objectives).

  • Decide on OptSolvX distribution until a public Maven release is available:

    • Local mvn install with snapshot, or

    • GitHub Packages, or

    • Vendor JAR under src/lib/maven with install script, or

    • Wrapper task to fetch on build.

  • Clean up remaining legacy test scripts and jars outside the Maven build if no longer needed.

That’s it for this week - see you next week!

Project Details

Kommentare

Beliebte Posts aus diesem Blog

OptSolvX in SBSCL: A Solver-Agnostic LP Core (GSoC 2025 Final Report)

Week 2 – Community Bonding Wrap-Up

Week 5 - Unit Testing, OjAlgo Integration, and Code Cleanup