Skip to content

codeurjc/brkga_mp_ipr_java

Repository files navigation

BRKGA-MP-IPR for Java

Java edition of BRKGA-MP-IPR (Multi-Parent Biased Random-Key Genetic Algorithm with Implicit Path Relinking). It reuses the original C++ library unmodified (the optimization core runs natively); you only write Java — a decoder and your problem data. The public API never exposes any low-level native-interop type, and the published artifact bundles precompiled native binaries, so no C++ toolchain is needed to use it.

Repository layout

Path What it is
brkga_mp_ipr_java/ The wrapper — the Java library published to Maven Central (API, native bridge, tests, docs).
examples/ Standalone example project (TSP). Depends on the published artifact; distributed as a zip in each release.
third_party/brkga_mp_ipr_cpp/ The upstream C++ library, as a pinned git submodule (never modified).
docker/ Dockerfiles to recompile the native library or build from source without a local toolchain.

Clone with the submodule:

git clone --recurse-submodules <repo-url>
# or, in an existing clone:
git submodule update --init

Use it (no compiler needed)

<dependency>
    <groupId>io.github.codeurjc</groupId>
    <artifactId>brkga-mp-ipr-java</artifactId>
    <version>0.1.0</version>
</dependency>

Run your app with native access enabled: java --enable-native-access=ALL-UNNAMED .... Linux x86-64 binaries are bundled; for other platforms or custom builds, see Recompiling in the Java guide.

Documentation

Examples

Download brkga_mp_ipr_java_examples.zip from the releases and unzip it, or use the examples/ directory. Then:

./run.sh brkga.single.MainMinimal 27000001 \
    data/config/single.conf 10 data/instances/burma14.dat

Maintainer notes

  • Build & test the wrapper: cd brkga_mp_ipr_java && mvn test (needs JDK 22+, g++, make) — or use docker/Dockerfile.dev.
  • Update the upstream library: git submodule update --remote third_party/brkga_mp_ipr_cpp and commit the new pointer.
  • Publishing to Maven Central and releasing the examples zip are automated by the workflows in .github/workflows/ (see their headers for the required secrets; the io.github.codeurjc namespace must be claimed on Sonatype Central first).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors