Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork39
A Java library of Customizable, Hybridizable, Iterative, Parallel, Stochastic, and Self-Adaptive Local Search Algorithms
License
cicirello/Chips-n-Salsa
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Copyright (C) 2002-2024Vincent A. Cicirello.
Website:https://chips-n-salsa.cicirello.org/
API documentation:https://chips-n-salsa.cicirello.org/api/
Publications About the Library | |
---|---|
Packages and Releases | |
Build Status | |
JaCoCo Test Coverage | |
Security | |
DOI | |
Other Information | |
Support |
If you use this library in your research, please cite one or both of the following papers, whichever is relevant. Chips-n-Salsa was introduced in this first article:
Cicirello, V. A., (2020). Chips-n-Salsa: A Java Library of Customizable, Hybridizable, Iterative, Parallel, Stochastic, and Self-Adaptive Local Search Algorithms.Journal of Open Source Software, 5(52), 2448,https://doi.org/10.21105/joss.02448
The following paper covers the evolutionary algorithms of Chips-n-Salsa:
Cicirello, V.A. (2024).Open Source Evolutionary Computation with Chips-n-Salsa.Proceedings of the 16th International Joint Conference on Computational Intelligence (IJCCI 2024), pages 330-337,https://doi.org/10.5220/0013040600003837
Chips-n-Salsa is a Java library of customizable, hybridizable, iterative, parallel, stochastic, and self-adaptive local search algorithms. The library includes implementations of several stochastic local search algorithms, including simulated annealing, hill climbers, as well as constructive search algorithms such as stochastic sampling. Chips-n-Salsa now also includes genetic algorithms as well as evolutionary algorithms more generally. The library very extensively supports simulated annealing. It includes several classes for representing solutions to a variety of optimization problems. For example, the library includes a BitVector class that implements vectors of bits, as well as classes for representing solutions to problems where we are searching for an optimal vector of integers or reals. For each of the built-in representations, the library provides the most common mutation operators for generating random neighbors of candidate solutions, as well as common crossover operators for use with evolutionary algorithms. Additionally, the library provides extensive support for permutation optimization problems, including implementations of many different mutation operators for permutations, and utilizing the efficiently implemented Permutation class of theJavaPermutationTools (JPT) library.
Chips-n-Salsa is customizable, making extensive use of Java's generic types, enabling using the library to optimize other types of representations beyond what is provided in the library. It is hybridizable, providing support for integrating multiple forms of local search (e.g., using a hill climber on a solution generated by simulated annealing), creating hybrid mutation operators (e.g., local search using multiple mutation operators), as well as support for running more than one type of search for the same problem concurrently using multiple threads as a form of algorithm portfolio. Chips-n-Salsa is iterative, with support for multistart metaheuristics, including implementations of several restart schedules for varying the run lengths across the restarts. It also supports parallel execution of multiple instances of the same, or different, stochastic local search algorithms for an instance of a problem to accelerate the search process. The library supports self-adaptive search in a variety of ways, such as including implementations of adaptive annealing schedules for simulated annealing, such as the Modified Lam schedule, implementations of the simpler annealing schedules but which self-tune the initial temperature and other parameters, and restart schedules that adapt to run length.
The rest of this README is organized as follows:
- Java Requirements: Minimum supported Java version information
- Versioning Scheme: Explanation of the library's version numbers
- Building the Library (with Maven)
- Example Programs: Information on example library usage
- Java Modules: Information for those whose projects use Java modules
- Importing from Package Repositories
- Downloading Jar Files: Information on where you can download pre-compiled jars
- License: Licensing information
- Contribute: Information for those who wish to contribute
Chips-n-Salsa currently supports Java 17+. Our development process utilizes OpenJDK 17, andall jar files released to Maven Central, GitHub Packages, and GitHub Releases are built for a Java 17 target.See the following table for a mapping between library version and minimum supported Java version.
version | Java requirements |
---|---|
5.w.x to 7.y.z | Java 17+ |
3.w.x to 4.y.z | Java 11+ |
1.w.x to 2.y.z | Java 8+ |
Chips-n-Salsa usesSemantic Versioning withversion numbers of the form: MAJOR.MINOR.PATCH, where differencesin MAJOR correspond to incompatible API changes, differences in MINORcorrespond to introduction of backwards compatible new functionality,and PATCH corresponds to backwards compatible bug fixes.
The Chips-n-Salsa library is built using Maven. The root of therepository contains a Mavenpom.xml
. To build the library,executemvn package
at the root of the repository, whichwill compile all classes, run all tests, run javadoc, and generatejar files of the library, the sources, and the javadocs. In additionto the jar of the library itself, this will also generate ajar of the library that includes all dependencies. The file namesmake this distinction explicit. All build outputs will thenbe found in the directorytarget
.
To include generation of a code coverage report during the build,executemvn package -Pcoverage
at the root of the repository toenable a Maven profile that executes JaCoCo during the test phase.
To run all static analysis tools (i.e., SpotBugs, Find Security Bugs,refactor-first), executemvn package -Panalysis
to enable a Mavenprofile that executes the various static analysis tools that we areusing. The SpotBugs html report will be found in thetarget
directory,or you can use the SpotBugs GUI with:mvn spotbugs:gui -Panalysis
. Therefactor-first report will be found in thetarget/site
directory.
To run all of the above:mvn package -P "analysis,coverage"
.
There are several example programs available in a separate repository:cicirello/chips-n-salsa-examples.The examples repository contains example usage of several of theclasses of the library. Each of the examples contains detailedcomments within the source code explaining the example. Running theexamples without reading the source comments is not advised.
This library provides a Java module,org.cicirello.chips_n_salsa
. If your Javaproject utilizes modules, then add the following to yourmodule-info.java
:
moduleyour.module.name.here {requiresorg.cicirello.chips_n_salsa;}
Theorg.cicirello.chips_n_salsa
module, in turn, transitively requirestheorg.cicirello.jpt
module because the functionality for optimizingpermutational problems uses the Permutation class as both parameters andreturn types of methods.
If you are directly utilizing the functionality of the dependencies, thenyou may instead need some combination of the following:
moduleyour.module.name.here {requiresorg.cicirello.chips_n_salsa;requiresorg.cicirello.jpt;requiresorg.cicirello.rho_mu;requiresorg.cicirello.core;}
Prebuilt artifacts are regularly published to Maven Central and GitHub Packages. Inmost cases, you'll want to use Maven Central. Releases are published to GitHub Packagesmainly as a fall-back in the unlikely scenario that Maven Central is unavailable.
Add this to the dependencies section of your pom.xml, replacingthe version number with the version that you want to use.
<dependency> <groupId>org.cicirello</groupId> <artifactId>chips-n-salsa</artifactId> <version>7.0.0</version></dependency>
If you'd prefer to import from GitHub Packages, rather than Maven Central,then: (1) add the dependency as indicated in previous section above, and (2) addthe following to the repositories section of your pom.xml:
<repository> <id>github</id> <name>GitHub cicirello Apache Maven Packages</name> <url>https://maven.pkg.github.com/cicirello/Chips-n-Salsa</url></repository>
Note that GitHub Packages requires authenticating to GitHub (even for publicartifacts). Thus, it is likely less convenient than importing from MavenCentral. We mainly provide this option as a backup source of artifacts.
If you don't use a dependency manager that supports importing from Maven Central,or if you simply prefer to download manually, prebuilt jars are also attached toeachGitHub Release. If youmanually download the library jar file, make sure that you also download the jarsof the relevant versions of the dependencies. The easiest way to get this right isto use a dependency manager rather than manually downloading jars.
The Chips-n-Salsa library is licensed under theGNU General Public License 3.0.
If you would like to contribute to Chips-n-Salsa in any way, suchas reporting bugs, suggesting new functionality, or code contributionssuch as bug fixes or implementations of new functionality, then startby readingthecontribution guidelines.This project has adoptedtheContributor Covenant Code of Conduct.
About
A Java library of Customizable, Hybridizable, Iterative, Parallel, Stochastic, and Self-Adaptive Local Search Algorithms
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.