Simulated Annealing

A simulated annealing framework.

License

License

MIT
Categories

Categories

pathfinder Business Logic Libraries
GroupId

GroupId

xyz.thepathfinder
ArtifactId

ArtifactId

simulatedannealing
Last Version

Last Version

0.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

Simulated Annealing
A simulated annealing framework.
Project URL

Project URL

https://github.com/csse497/simulatedannealing
Source Code Management

Source Code Management

https://github.com/csse497/simulatedannealing

Download simulatedannealing

How to add to project

<!-- https://jarcasting.com/artifacts/xyz.thepathfinder/simulatedannealing/ -->
<dependency>
    <groupId>xyz.thepathfinder</groupId>
    <artifactId>simulatedannealing</artifactId>
    <version>0.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/xyz.thepathfinder/simulatedannealing/
implementation 'xyz.thepathfinder:simulatedannealing:0.0.3'
// https://jarcasting.com/artifacts/xyz.thepathfinder/simulatedannealing/
implementation ("xyz.thepathfinder:simulatedannealing:0.0.3")
'xyz.thepathfinder:simulatedannealing:jar:0.0.3'
<dependency org="xyz.thepathfinder" name="simulatedannealing" rev="0.0.3">
  <artifact name="simulatedannealing" type="jar" />
</dependency>
@Grapes(
@Grab(group='xyz.thepathfinder', module='simulatedannealing', version='0.0.3')
)
libraryDependencies += "xyz.thepathfinder" % "simulatedannealing" % "0.0.3"
[xyz.thepathfinder/simulatedannealing "0.0.3"]

Dependencies

compile (1)

Group / Artifact Type Version
com.google.guava : guava jar 19.0

Project Modules

There are no modules declared in this project.

Simulated Annealing

Build Status Maven Central

A simple framework for solving optimization problems by simulated annealing.

Why does this exist?

Pathfinder solves the k-Vehicle Routing Problem using simulated annealing at https://github.com/csse497/pathfinder-routing. We couldn't find any existing frameworks we liked and it was simple enough to implement, so we created our own.

Install

Available on Maven.

<dependency>
    <groupId>xyz.thepathfinder</groupId>
    <artifactId>simulatedannealing</artifactId>
    <version>0.0.3</version>
</dependency>

Usage

You will need to implement the SearchState<T> interface. It defines only one method, T step(), which should return a randomly chosen deviation from the current state. Also, you will need to implement the Problem<T> interface, which initializes a state and evaluates the energey of states.

You will need to choose a Scheduler implementation, which determines the speed and shape of the annealing process. We provide two built-in options, LinearDecayScheduler and ExponentialDecayScheduler.

Finally, just create a Solver and call solve!

Scheduler scheduler = new LinearDecayScheduler(INITIAL_TEMPERATURE, NUMBER_OF_STEPS);
Problem<VRPSearchState> problem = new VehicleRoutingProblem(...);
Solver<VRPSearchState> solver = new Solver(problem, scheduler);
VRPSearchState solution = solver.solve();

LICENSE

MIT.

xyz.thepathfinder

Pathfinder

A realtime platform for routing based mobile and web applications.

Versions

Version
0.0.3
0.0.2
0.0.1