alns is a general-purpose, documented and tested Java implementation of the
Adaptive Large Neighborhood Search (ALNS) metaheuristic for solving difficult
combinatorial optimization problems. Starting from an initial solution, ALNS
iterates until a stopping criterion is met. In each iteration, selected destroy
and repair operators transform the current solution into a candidate. The
candidate is evaluated using an acceptance criterion, and the operator selection
policy receives feedback based on the outcome.
- Java 17 or later.
Download alns-0.2.0.jar from release v0.2.0 and add it to your application's classpath. Sources and Javadoc JARs are also available.
The library requires org.slf4j:slf4j-api:2.0.20 on the classpath. Dependencies are
not bundled in the release JAR.
To solve your own problem, provide a solution type, a feasible initial solution, and problem-specific destroy and repair operators. Acceptance criteria, operator selection policies, and stopping criteria are included and can be combined freely or replaced with your own implementations.
Optional features include local search, visited-solution tracking, statistics, and iteration callbacks; all are disabled by default. Operators can also be named for clearer logs and statistics.
The API documentation for version 0.2.0 is available on GitHub Pages. To generate it locally, see Documentation. Documentation for earlier versions is included as a Javadoc JAR in each release.
Contributions are welcome! See CONTRIBUTING.md to get started. For substantial changes, please open an issue first to discuss the proposed approach.
For questions, bug reports, or feature requests, please open an issue. Include enough context and a minimal reproducible example where applicable.
alns is available under the MIT License.