Posts

Es werden Posts vom Juli, 2025 angezeigt.

Week 7 - Model Refinement, Code Cleanup, and Solver Integration

In the past week, my main focus was on refining the model abstraction, further cleaning the codebase, and once again, integrate the CommonsMathSolver into the solver interface. Progress: Model Refinement with Built Flag: Added a built flag to AbstractLPModel to clearly indicate when the model is finalized. After calling build() , the flag is set to true . Any subsequent changes reset the flag to false until the model is rebuilt. This mechanism ensures clarity about the model's state throughout its lifecycle. Utility for Constraint Indices: Implemented a utility method that retrieves the index of a given constraint within the model. This allows adapters or other classes easy access to constraint indices without redundant logic. Continuous Integration Improvements: Ensured the CI pipeline via GitHub Actions runs all unit tests smoothly and without errors, providing instant feedback on new code contributions and pull requests. Explicit Double Types in Tests: Added ...

Week 6 - Abstract Model Refactoring, Unified Testing & CI Setup

In the past week, my main focus was on refactoring the model layer, improving test coverage, and streamlining project automation. Progress: New Abstract Model Class: Introduced AbstractLPModel as the new central class to dynamically manage variables, constraints, and all model metadata. Instead of fixed arrays, the class uses flexible lists and maps. The final model is only constructed when calling build() . Consistent Mapping & ID Tracking: Implemented clear mapping from names to indices for all variables and constraints, preventing duplicate IDs and making debugging easier. Unit Tests for Model Abstraction: Added a new test class ( AbstractLPModelTest ) covering variable/constraint addition, the build process, and redundancy cases. Exception handling for duplicate names is implemented and tested. CI/CD Pipeline: Set up a GitHub Actions workflow that automatically builds and tests every commit and pull request. Errors are shown directly in the PR for quick feedba...

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

In the past week, my primary goal was enhancing the test infrastructure, finishing the integration of the second solver, OjAlgo, and maintaining overall code quality and clarity. Progress: Unit Tests for CommonsMathSolver Implemented unit tests covering maximization, minimization, variable bounds, equality constraints, unsolvable and unbounded LP scenarios, and precision checks. Standardized test logic and provided clear comments aligned with Commons Math documentation and architecture. Test Environment Stabilization Fully synchronized Maven and IntelliJ configurations, eliminating issues with dependencies (JUnit, etc.) and resolving ClassNotFoundException permanently. Cleaned up the project structure by separating test and main code, removing obsolete files, and ignoring IDE-specific files ( .idea , .iml ) from version control. Development of Second Solver Adapter ( OjAlgoSolver ) Created a new adapter implementation to the ILPSolver   interface. S...