Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1 Commit

Repository files navigation

NP-Optimization - Advanced Optimization Algorithms in Java

JavaMavenJUnitLicense

A comprehensive collection of advanced optimization algorithms for solving NP-complete problems in Java.

FeaturesStructureQuick StartTesting


About

NP-Optimization is a complete implementation of advanced optimization algorithms designed to tackle NP-complete problems. The repository covers techniques ranging from dynamic programming and branch-and-bound to constraint programming and decision diagrams. Each implementation is paired with comprehensive unit tests and detailed LaTeX reports.


Features

Optimization Techniques

  • Dynamic Programming (DP) — Optimal substructure exploitation
  • Branch-and-Bound (BnB) — Tree search with pruning strategies
  • Linear Programming (LP) — Simplex and relaxation methods
  • Local Search (LS) — Neighborhood-based heuristics
  • Constraint Programming (CP) — Declarative constraint solving
  • Decision Diagrams (MDD) — Multi-valued decision diagram optimization

Problem Domains

CategoryImplementations
TSPTraveling Salesman Problem solvers, Held-Karp bounds
Knapsack0/1 Knapsack, Multi-dimensional variants
SchedulingJob scheduling, Resource allocation
PuzzlesMagic Square, Knight's Tour, Killer Sudoku
GraphsOne-Tree bounds, Cheapest Incident edges

Repository Structure

NP-Optimization/
├── src/
│ ├── main/java/
│ │ ├── branchandbound/ # Branch-and-Bound algorithms
│ │ ├── constraintprogramming/ # CP solver and problems
│ │ ├── dynamicprogramming/ # DP implementations
│ │ ├── linearprogramming/ # LP methods
│ │ ├── localsearch/ # Local Search heuristics
│ │ ├── mdd/ # Decision Diagrams
│ │ └── util/ # Shared utilities
│ │
│ └── test/java/ # Unit tests (mirrors main/)
│
├── data/ # Test instances and benchmarks
├── tex/ # LaTeX reports and figures
└── pom.xml # Maven configuration
ModuleDescription
Branch-and-BoundTSP solver, One-Tree/Held-Karp lower bounds, pruning strategies
Constraint ProgrammingDomain propagation, Sum/LessOrEqual constraints, puzzle solvers
Dynamic ProgrammingOptimal TSP, state-space exploration
Linear ProgrammingLP relaxations, optimization formulations
Local SearchNeighborhood search, improvement heuristics
MDDRelaxed/restricted diagrams, sequential solving

Quick Start

Prerequisites

  • Java 9+
  • Maven 3.6+
  • Git

Installation

# Clone the repository
git clone https://github.com/mathisdelsart/NP-Optimization.git
cd NP-Optimization
# Build the project
mvn compile
# Run fast tests
mvn test# Run all tests (including slow ones)
mvn test -Pslow-tests

Testing

Comprehensive test suite covering all optimization algorithms.

# Run fast tests only
mvn test# Run all tests (including slow/exhaustive)
mvn test -Pslow-tests
# Run tests for a specific module
mvn test -Dtest="branchandbound.*"# Run a specific test class
mvn test -Dtest="BranchAndBoundTSPTest"

Reports

LaTeX reports for each project are available in the tex/ directory:

  • Dynamic Programming — DP formulations and complexity analysis
  • Branch-and-Bound — Lower bound techniques and pruning
  • Linear Programming — LP relaxations and formulations
  • Local Search — Neighborhood definitions and convergence
  • Constraint Programming — Propagation and search strategies
  • Decision Diagrams — MDD construction and optimization

Author

Mathis DELSART

License

This project is developed for academic purposes as part of university coursework.


Built for LINFO2266 - Advanced Algorithms for Optimization @ UCLouvain (Universite catholique de Louvain).

About

NP-Optimization is a Java-based repository implementing advanced optimization algorithms for tackling NP-hard and NP-complete problems, combining exact methods, relaxations, and heuristics with a strong focus on correctness and performance.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages