Skip to content

Align ODE dependencies (Commons Math 2.x vs. 3.x) #92

Description

@xts-Michi

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)

  1. Remove commons-math:2.2 from pom.xml.
  2. Reimport Maven / mvn -U clean package.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    on holdPaused until a prerequisite is completed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions