Week 10 - Bridge Prototype and Classpath Fix

This week I brought the first pieces of the SBML-to-LP bridge to life, fixed a classpath issue that blocked tests, and refreshed docs and the pending PR. I also ran the bridge on the E. coli core model end-to-end.

Progress

Bridge scaffolding running (now on a real model)

  • Implemented a minimal FbaToOptSolvX path that builds an LP and executes.

  • End-to-end with SBSCL on E. coli core: the bridge emits an LP with 95 variables and 72 constraints, objective direction MAXIMIZE.

  • Solver: OptSolvX → CommonsMath backend. Results: feasible = true, objective ≈ 0.874, typical solve time ~70–170 ms.

Smoke & objective tests (JDK 22)

  • Both focused tests complete with exit code 0.

  • Example logs:

    • INFO: FbaToOptSolvX: built LP (vars=95, cons=72, objectiveVars=1, dir=MAXIMIZE)

    • INFO: OptSolvXSolverAdapter: result feasible=true, objective=0.874

Classpath fix

  • Root cause: legacy XML parser jars shadowed the JDK’s JAXP and triggered Log4j2’s XML-parser feature toggles to fail.

  • Action: excluded xercesImpl / xml-apis / xalan in SBSCL’s POM so the JDK parsers are used.

  • Note: When Log4j uses XML config, StatusLogger still prints AbstractMethodError on some runs, but it’s non-fatal and tests pass. Switching Log4j to YAML/JSON/Properties eliminates the JAXP surface (see “Next steps”).

Test layout and imports

  • Normalized test classes under src/test/java/org/simulator/optsolvx.

  • Corrected LPSolution import to org.optsolvx.solver.* (was mistakenly in .model).

Build/IDE hygiene

  • Invalidated IntelliJ caches, re-imported Maven, set JAVA_HOME/JDK explicitly.

  • Ensured OptSolvX artifact targets Java 8 bytecode (major 52).

Dependency cleanup

  • Temporary exclusions for legacy XML stack (see above).

  • With non-XML Log4j config, no StatusLogger noise.

Docs and PR refreshed

  • README: short “Using OptSolvX (LP) in SBSCL” snippet (demo run, debug mode, build check).

  • PR description updated to reflect adapter, demo, tests, and the bridge preview.

Bridge status

  • Scope: Prototype maps a small subset of FBC (variable bounds + objective) to an OptSolvX LP; acts as an execution marker and integration anchor.

  • Verification: Two focused JUnit tests (BridgeSmokeTest, BridgeObjectiveTest) complete; logging shows LP dimensions and objective sense. E. coli core run confirms end-to-end viability with expected objective (~0.874).

Next steps

  • Flesh out full SBML FBC → LP mapping (bounds, objectives, reaction constraints, variable naming, objective sense).

  • Add integration tests on small FBC models (BiGG/fixtures) + edge cases (unbounded, infeasible, multiple objectives).

  • Logging: move Log4j config from XML to YAML/JSON/Properties to avoid JAXP feature toggles entirely.

  • Dependencies: keep the safe classpath in SBSCL; plan an upstream upgrade path for the XML stack if/when needed.

  • Add a simple factory/flag to select the OptSolvX backend at runtime.

Risks and watch-outs

  • Upstream library drift: future SED-ML/DOM updates could reintroduce parser conflicts. Pin versions and keep mvn dependency:tree checks in CI.

  • Java targets: OptSolvX remains Java 8 compatible; running under newer JDKs is fine—avoid re-introducing legacy parser jars.

  • Logging config: XML + external parsers can cause harmless but noisy StatusLogger messages; non-XML configs avoid this.

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