Description
SBSCL’s ODE modules import org.apache.commons.math.ode.* (Commons Math 2.x).
With the OptSolvX integration we also require Commons Math 3.x (org.apache.commons.math3.*).
Because 2.x and 3.x use different package names and are not interchangeable, both must be present.
Current status
pom.xml updated to include org.apache.commons:commons-math:2.2 alongside commons-math3:3.6.1.
- Build and demo run successfully.
Affected code
org/simulator/math/odes/*
org/simulator/sbml/SBMLinterpreter.java
org/simulator/examples/*
(ODE types like FirstOrderDifferentialEquations, DerivativeException, EventHandler come from 2.x.)
Steps to reproduce (failure case)
- Remove
commons-math:2.2 from pom.xml.
- Reimport Maven /
mvn -U clean package.
- Compilation fails (
package org.apache.commons.math.ode does not exist, missing ODE types).
Expected
Project compiles and runs with both libraries coexisting.
Acceptance criteria
mvn -q dependency:tree -Dincludes=org.apache.commons:commons-math,org.apache.commons:commons-math3 lists both.
mvn clean package succeeds on a fresh checkout.
- Demo:
org.simulator.optsolvx.OptSolvXDemo runs without errors.
Follow-up
Migrate ODE code to the Commons Math 3 API (org.apache.commons.math3.ode.*) and then drop 2.x.
Description
SBSCL’s ODE modules import
org.apache.commons.math.ode.*(Commons Math 2.x).With the OptSolvX integration we also require Commons Math 3.x (
org.apache.commons.math3.*).Because 2.x and 3.x use different package names and are not interchangeable, both must be present.
Current status
pom.xmlupdated to includeorg.apache.commons:commons-math:2.2alongsidecommons-math3:3.6.1.Affected code
org/simulator/math/odes/*org/simulator/sbml/SBMLinterpreter.javaorg/simulator/examples/*(ODE types like
FirstOrderDifferentialEquations,DerivativeException,EventHandlercome from 2.x.)Steps to reproduce (failure case)
commons-math:2.2frompom.xml.mvn -U clean package.package org.apache.commons.math.ode does not exist, missing ODE types).Expected
Project compiles and runs with both libraries coexisting.
Acceptance criteria
mvn -q dependency:tree -Dincludes=org.apache.commons:commons-math,org.apache.commons:commons-math3lists both.mvn clean packagesucceeds on a fresh checkout.org.simulator.optsolvx.OptSolvXDemoruns without errors.Follow-up
Migrate ODE code to the Commons Math 3 API (
org.apache.commons.math3.ode.*) and then drop 2.x.