https://github.com/cicirello/chips-n-salsa-examples

Example programs for usage of the Chips-n-Salsa library

https://github.com/cicirello/chips-n-salsa-examples

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.8%) to scientific vocabulary

Keywords

combinatorial-optimization evolutionary-algorithms genetic-algorithms hill-climbing metaheuristics simulated-annealing stochastic-sampling

Keywords from Contributors

projection sequences archival interactive randomization generic embedded genomics observability autograding
Last synced: 5 months ago · JSON representation

Repository

Example programs for usage of the Chips-n-Salsa library

Basic Info
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 32
Topics
combinatorial-optimization evolutionary-algorithms genetic-algorithms hill-climbing metaheuristics simulated-annealing stochastic-sampling
Created over 5 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

Example Programs for Usage of the Chips-n-Salsa Library

Copyright (C) 2020-2023 Vincent A. Cicirello. https://www.cicirello.org/

| Packages and Releases | Maven Central GitHub release (latest by date) | | :--- | :--- | | Build Status | build CodeQL | | Security | Snyk security score Snyk Known Vulnerabilities | | Other Information | GitHub style | | Support | GitHub Sponsors Liberapay Ko-Fi |

This repository contains several example programs of the usage of the Chips-n-Salsa library. Chips-n-Salsa is a Java library of customizable, hybridizable, iterative, parallel, stochastic, and self-adaptive local search algorithms. Chips-n-Salsa's source code is maintained on GitHub, and the prebuilt jars of the library can be imported from Maven Central using maven or other build tools. The purpose of this repository is to demonstrate usage of the major functionality of the Chips-n-Salsa library.

The Example Programs

The source for several example programs is contained in this repository. Read the comments in the source code of the example programs for a description of what they demonstrate, etc. Running the examples without reading the source code, and comments, is not advised, since the output of the example programs requires the context of the code samples to be meaningful.

Basic Examples: The following examples are of basic usage using simulated annealing or genetic algorithms to optimize functions over different structure types: bit vectors, integer vectors, permutations, and a real-value function optimization example, the root finding example: * org.cicirello.examples.chipsnsalsa.BitVectorExample * org.cicirello.examples.chipsnsalsa.GeneticAlgorithmExamples * org.cicirello.examples.chipsnsalsa.IntegerVectorExample * org.cicirello.examples.chipsnsalsa.RootFindingExample * org.cicirello.examples.chipsnsalsa.PermutationExample

Configuring the Random Number Generator: If you either need to specify a particular pseudorabdom number generator (PRNG) to be used by the library, or if you want to seed its default PRNG in order to exactly repeat a run of your program, or if you want to do both, then you can use the Configurator class. Here are examples of using the Configurator class. * org.cicirello.examples.chipsnsalsa.ConfigureRandomness

Parallel Examples: The next couple examples are of parallel search: * org.cicirello.examples.chipsnsalsa.ParallelPermutationExample * org.cicirello.examples.chipsnsalsa.TimedParallelExample

Custom Problem Examples: The following examples demonstrate defining a custom optimization problem (whereas the above examples mostly use benchmark problems included in the library): * org.cicirello.examples.chipsnsalsa.CustomProblemExample * org.cicirello.examples.chipsnsalsa.CustomIntegerCostProblemExample

Hybrid Search Examples: The following examples show how multiple search algorithms can be integrated (e.g., combining hill climbing with simulated annealing): * org.cicirello.examples.chipsnsalsa.PostHillclimbExample * org.cicirello.examples.chipsnsalsa.PreHillclimbExample

Industrial Scheduling Problem Examples: The following examples use scheduling problems, and are also a bit more complex than some of the other example programs. * org.cicirello.examples.chipsnsalsa.SchedulingExample * org.cicirello.examples.chipsnsalsa.SchedulingWithVBSS

Versioning Scheme

The version numbers for the example programs mirror the versions of Chips-n-Salsa. The version may or may not be incremented upon every new release of the Chips-n-Salsa library. The version number of the examples corresponds to the version of the Chips-n-Salsa library used in that release. The examples should run against newer versions of the Chips-n-Salsa library provided the MAJOR portion of the version number is the same.

The Chips-n-Salsa library uses Semantic Versioning with version numbers of the form: MAJOR.MINOR.PATCH, where differences in MAJOR correspond to incompatible API changes, differences in MINOR correspond to introduction of backwards compatible new functionality, and PATCH corresponds to backwards compatible bug fixes.

Prebuilt Jars of the Examples

Since the purpose of the example programs is to demonstrate usage of the Chips-n-Salsa library, you will most likely want to build the examples directly from the source (see the sections that follow). However, we also provide jars of the compiled examples, as well as of the source and javadocs, in a variety of ways: * GitHub releases * Maven Central * GitHub Packages

If you use the example programs in precompiled form, you will also need a compatible version of the Chips-n-Salsa library, and its dependencies. If you build the examples from the source, the build process will take care of downloading these for you. But if you choose to use the prebuilt jars, you can find the jars of the Chips-n-Salsa library likewise in Maven Central, GitHub Releases, and GitHub Packages. In particular, you will find a jarred version of Chips-n-Salsa that includes all of its dependencies.

Requirements to Build and Run the Example Programs from the Source

To build and run the examples on your own machine, you will need the following: * JDK 17: Beginning with Chips-n-Salsa, v5.0.0, the minimum supported version of Java is Java 17, so you will need Java 17+ for the example programs. * Apache Maven: In the root of the repository, there is a pom.xml for building the example programs. Using this pom.xml, Maven will take care of downloading the most recent version of the Chips-n-Salsa library for which the examples have been tested, as well as Chips-n-Salsa's dependencies. The examples should also work with more recent versions of the library. * Make (optional): The repository also contains a Makefile to simplify running the build, and running the example programs. If you are familiar with using the Maven build tool, then you can just run these directly, although the Makefile may be useful to see the specific commands needed, such as the main classes to execute for the example programs.

Building the Example Programs with Maven

The source code of the example programs are in the src/main/java directory. You can build the example programs in one of the following ways: * Execute mvn package at the root of the repository (mvn compile should also be sufficient, but only generates class files, while mvn package generates jar files as well as the javadocs). * Execute make or make build at the root of the repository (which simply executes a mvn package).

This build process follows the usual Maven directory structure, so the .class files, .jar files, etc will be found in a target directory that is created by the build process.

To run various static analysis tools (e.g., SpotBugs, FindSecBugs, refactor-first, etc) during the build, run: mvn clean package -Panalysis.

Running the Example Programs with Maven

Once you have successfully executed the build above, you can run the examples by executing make examples at the root of the repository. This will run each of the example programs in sequence. Be aware that the examples are intended to illustrate how to use the Chips-n-Salsa library, so will be most meaningful if you read the source code, which includes comments explaining what they are doing.

If you would rather run them one at a time, see the examples target in the Makefile for the main classes to execute.

License

The example programs in this repository are licensed under the GNU General Public License 3.0.

Owner

  • Name: Vincent A. Cicirello
  • Login: cicirello
  • Kind: user
  • Location: Galloway, NJ
  • Company: Stockton University

Vincent A. Cicirello is a researcher in AI, evolutionary computation, and swarm intelligence.

GitHub Events

Total
  • Release event: 1
  • Delete event: 18
  • Issue comment event: 3
  • Push event: 19
  • Pull request review event: 15
  • Pull request event: 36
  • Create event: 20
Last Year
  • Release event: 1
  • Delete event: 18
  • Issue comment event: 3
  • Push event: 19
  • Pull request review event: 15
  • Pull request event: 36
  • Create event: 20

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 182
  • Total Committers: 2
  • Avg Commits per committer: 91.0
  • Development Distribution Score (DDS): 0.346
Past Year
  • Commits: 45
  • Committers: 2
  • Avg Commits per committer: 22.5
  • Development Distribution Score (DDS): 0.044
Top Committers
Name Email Commits
dependabot[bot] 4****] 119
Vincent A. Cicirello c****o 63

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 12
  • Total pull requests: 193
  • Average time to close issues: about 8 hours
  • Average time to close pull requests: about 21 hours
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.08
  • Average comments per pull request: 0.11
  • Merged pull requests: 171
  • Bot issues: 0
  • Bot pull requests: 177
Past Year
  • Issues: 0
  • Pull requests: 41
  • Average time to close issues: N/A
  • Average time to close pull requests: about 6 hours
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.05
  • Merged pull requests: 35
  • Bot issues: 0
  • Bot pull requests: 40
Top Authors
Issue Authors
  • cicirello (12)
Pull Request Authors
  • dependabot[bot] (177)
  • cicirello (16)
Top Labels
Issue Labels
enhancement (3) java (2) cicd (2) github_actions (1) bug (1)
Pull Request Labels
dependencies (179) java (168) github_actions (10) documentation (3) enhancement (3) cicd (3) hacktoberfest-accepted (2) bug (2)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 32
repo1.maven.org: org.cicirello:chips-n-salsa-examples

This package contains several example programs of the usage of the Chips-n-Salsa library. Chips-n-Salsa is a Java library of customizable, hybridizable, iterative, parallel, stochastic, and self-adaptive local search algorithms. Chips-n-Salsa's source code is maintained on GitHub, and the prebuilt jars of the library can be imported from Maven Central using maven or other build tools. The purpose of the package chips-n-salsa-examples is to demonstrate usage of the major functionality of the Chips-n-Salsa library. You can find out more about the Chips-n-Salsa library itself from its website: https://chips-n-salsa.cicirello.org/.

  • Versions: 32
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 32.0%
Stargazers count: 39.7%
Forks count: 39.8%
Average: 40.1%
Dependent packages count: 48.9%
Last synced: 6 months ago

Dependencies

pom.xml maven
  • org.cicirello:chips-n-salsa 5.0.0
  • org.cicirello:core 2.2.0
  • org.cicirello:jpt 4.0.0
  • org.cicirello:rho-mu 2.3.1
.github/workflows/build.yml actions
  • actions/checkout v3 composite
  • actions/setup-java v3 composite
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v3 composite
  • actions/setup-java v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
.github/workflows/maven-publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-java v3 composite