Week 3 - Java Solver Libraries

This past week marked the transition from theoretical preparation to hands-on coding for my GSoC project. Since I have an exam coming up on Monday, my available time was a bit limited. I will resume my regular workload after that. My main focus this week was evaluating Java-based solver libraries to see how well they might integrate with SBSCL.

I started by working with Apache Commons Math (specifically the SimplexSolver). I recreated minimal working examples to understand its functionality and API structure. This involved dynamically defining variables, constraints, and objective functions. Based on these tests, I was able to confirm that it's possible to dynamically map SBML-derived models to this solver’s API, which aligns perfectly with the flexibility required for SBSCL.

Then I explored the ojAlgo library. Following a similliar approach as with Commons Math, I set up basic examples in Maven to try out ojAlgo's functionalities, explore its API, and see how result extraction is handled. It is worth noting that the newer ojAlgo's API (v55) introduces certain structural differences, such as handling variables and constraints via model methods. 

Comparing both Apache Commons Math and ojAlgo gave me a clear understanding of their strengths and differences. Both libraries proved suitable for dynamically building linear optimization models, although their API styles and solution handling vary significantly.

Finally, I started drafting the solver abstraction interface (ILPSolver), drawin inspiration from the Optlang Python package we discussed earlier. The idea is to provide SBSCL users with the ability to switch seamlessly between solvers. While I took an initial look at Google OR-Tools, I decided to wait with the practical implementation until I have completed and tested the first interface version using Commons Math and ojAlgo.

Looking ahead, I plan to focus on implementing and refining the solver abstraction layer. This will involve initial tests with Commons Math and ojAlgo to make sure our solver interface is practical and flexible enough for future solver integrations. As of now, I am on schedule and expect to have a first working model of the interface ready soon.

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