Skip to content

Releases: N-Wouda/ALNS

Version 2.0.0

01 Mar 22:27
8a83423
Compare
Choose a tag to compare

Features

  • Weight schemes, which control how alns.ALNS selects operators. Two schemes commonly used in the literature (convex updating and segmented weights) have been implemented, as alns.weight_schemes.SimpleWeights and alns.weight_schemes.SegmentedWeights, respectively (issue #29).
  • An autofit() function for alns.criteria.SimulatedAnnealing (issue #35).
  • The alns package is considerably better typed now, and passes mypy static analysis.

The weighting schemes and acceptance criteria have been given an example notebook, showcasing their use.

API changes

The following list details all breaking API changes. The example notebooks in the repository have been updated to the new behaviour, and can be used as a reference for how to adapt your own algorithm.

  • alns.ALNS.iterate() now takes a weight_scheme argument, rather than various weight-related parameters it previously accepted.
  • alns.ALNS.iterate() no longer provides the option not to collect statistics. Statistics are now always collected.
  • Any criterion implementing alns.criteria.AcceptanceCriterion should now implement __call__, not accept(). The function signature is unchanged.
  • alns.Result.plot_operator_counts() now takes a fig argument, rather than figure.
  • Removed alns.tools.exceptions.NotCollectedError, since statistics are now always collected.
  • Removed alns.tools.warnings.OverwriteWarning. Operators are now silently overwritten when a new operator with the same name as an existing one is passed into the ALNS instance.

Drop Py3.6

26 Feb 14:04
12e6b24
Compare
Choose a tag to compare
  • Use pyproject.toml
  • Drop Py3.6 (EOL December 2021)
  • Drop Codacy

Bugfix

11 Nov 21:20
Compare
Choose a tag to compare

Fix issue #40.

Bugfix

01 Nov 15:12
ad6b7fd
Compare
Choose a tag to compare

Fix issue #36.

Support for Python 3.9

31 Oct 11:46
f7dc90c
Compare
Choose a tag to compare
  • Support Py3.9
  • Clean-up and simplify callback implementation

Unofficial support for numpy's new generators

29 Mar 15:02
ce3e64a
Compare
Choose a tag to compare

This is intended as a quick fix to support generators in the SimulatedAnnealing class. Eventually, of course, they are to replace the deprecated RandomState class.

Improve ALNS solution evaluation order

28 Feb 08:53
cb6b75f
Compare
Choose a tag to compare

This is more in line with the reference implementation given in Ropke and Pisinger (2019), and has the added benefit that it guarantees accept() is called for each iteration. That's nice if you want to estimate e.g. the step parameter for simulated annealing based on the number of iterations.

Plot global best in objective plots

26 Feb 13:44
2bb17bc
Compare
Choose a tag to compare
Plot objective legend (#23)

* Objective plot legend

Remove support for Python 3.4

23 Feb 15:17
Compare
Choose a tag to compare

Going forward, the range of supported Python versions is 3.5 and up. Older versions might work, but there is no guarantee.

Fix #20

23 Feb 15:03
c643d7d
Compare
Choose a tag to compare

Fixes issue #20, where plot_operator_counts did not scale its x-axis with the actual data to be plotted.