Recent Releases of ALNS
ALNS - v7.0.0
This release updates alns to use the Generator class inside numpy.random, rather than the now deprecated RandomState. As such, any arguments that used to take a RandomState now take a Generator, and the argument name has been changed to rng to account for this. No other breaking changes have been made.
What's Changed
- Some textual changes explaining how to get help by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/174
- Run notebooks for docs by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/175
- Replace RandomState with Generator by @leonlan in https://github.com/N-Wouda/ALNS/pull/173
- Sometimes run with and without MABWiser by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/176
Full Changelog: https://github.com/N-Wouda/ALNS/compare/v6.0.0...v7.0.0
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda over 1 year ago
ALNS - v6.0.0
This release adds a logo to ALNS, and updates the names of several acceptance criteria to better reflect what they actually do. The latter is a breaking change.
What's Changed
- Logo by @leonlan in https://github.com/N-Wouda/ALNS/pull/165
- BREAKING: Rename acceptance criteria by @leonlan in https://github.com/N-Wouda/ALNS/pull/167
Full Changelog: https://github.com/N-Wouda/ALNS/compare/v5.3.2...v6.0.0
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda over 2 years ago
ALNS - v5.3.1
What's Changed
- Use Ruff instead of flake8 and isort by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/158
- Updating inputs for MABSelector to new types LearningPolicyType and NeighboorhoodPolicyType from the new version of mabwiser by @AshishPvjs in https://github.com/N-Wouda/ALNS/pull/162
New Contributors
- @AshishPvjs made their first contribution in https://github.com/N-Wouda/ALNS/pull/162
Full Changelog: https://github.com/N-Wouda/ALNS/compare/v5.3.0...v5.3.1
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda almost 3 years ago
ALNS - v5.3.0
What's Changed
- Adaptive threshold acceptance by @TeoSkondras in https://github.com/N-Wouda/ALNS/pull/156
New Contributors
- @TeoSkondras made their first contribution in https://github.com/N-Wouda/ALNS/pull/156
Full Changelog: https://github.com/N-Wouda/ALNS/compare/v5.2.0...v5.3.0
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda almost 3 years ago
ALNS - v5.2.0
Multi-armed bandit operator selection!
Using MABWiser.
What's Changed
- Add
MABSelectormulti-armed bandit operator selection class using MABWiser to select operators by @P-bibs in https://github.com/N-Wouda/ALNS/pull/153
New Contributors
- @P-bibs made their first contribution in https://github.com/N-Wouda/ALNS/pull/153
Full Changelog: https://github.com/N-Wouda/ALNS/compare/v5.1.0...v5.2.0
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda almost 3 years ago
ALNS - v5.1.0
What's Changed
- Add citation metadata by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/139
- Add documentation build steps, move doc dependencies into pyproject.toml by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/143
- Fix bug in RCPSP example by @SleepyBag in https://github.com/N-Wouda/ALNS/pull/147
- Add Protocols for most base classes by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/150
New Contributors
- @SleepyBag made their first contribution in https://github.com/N-Wouda/ALNS/pull/147
Full Changelog: https://github.com/N-Wouda/ALNS/compare/v5.0.4...v5.1.0
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 3 years ago
ALNS - v5.0.3
Archival release
What's Changed
- Add a "getting started" code template by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/131
- Intro to ALNS page in docs by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/136
Full Changelog: https://github.com/N-Wouda/ALNS/compare/v5.0.2...v5.0.3
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda over 3 years ago
ALNS - v5.0.2
What's Changed
- Add method argument to SimulatedAnnealing.autofit by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/118
- Improve docs by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/120 and https://github.com/N-Wouda/ALNS/pull/124
Full Changelog: https://github.com/N-Wouda/ALNS/compare/v5.0.1...v5.0.2
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda over 3 years ago
ALNS - v5.0.1
What's Changed
- Add pre-commit + isort by @leonlan in https://github.com/N-Wouda/ALNS/pull/112
- Example notebook PFSP by @leonlan in https://github.com/N-Wouda/ALNS/pull/110
- Github templates, contributing text by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/115
Full Changelog: https://github.com/N-Wouda/ALNS/compare/v5.0.0...v5.0.1
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda over 3 years ago
ALNS - v5.0.0
What's Changed
- Textual improvements by @leonlan in https://github.com/N-Wouda/ALNS/pull/89
- Rename weights to select by @leonlan in https://github.com/N-Wouda/ALNS/pull/96
- Add standalone documentation by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/95
- Improve TSP example notebook by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/101
- New selection scheme interface by @leonlan in https://github.com/N-Wouda/ALNS/pull/98
- New CVRP example notebook by @leonlan in https://github.com/N-Wouda/ALNS/pull/100
- alpha-UCB bandit operator selection scheme by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/102
- Random operator selection scheme by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/103
- Implement more callbacks by @N-Wouda in https://github.com/N-Wouda/ALNS/pull/104
Full Changelog: https://github.com/N-Wouda/ALNS/compare/v4.1.0...v5.0.0
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda over 3 years ago
ALNS - Version 4.1.0
What's Changed
- NoImprovement stopping criterion by @leonlan in https://github.com/N-Wouda/ALNS/pull/77
- RandomWalk acceptance criterion by @leonlan in https://github.com/N-Wouda/ALNS/pull/79
- WorseAccept acceptance criterion by @leonlan in https://github.com/N-Wouda/ALNS/pull/78
- ThresholdAcceptance acceptance criterion by @leonlan in https://github.com/N-Wouda/ALNS/pull/80
- GreatDeluge acceptance criterion by @leonlan in https://github.com/N-Wouda/ALNS/pull/81
- HillClimbing acceptance criterion by @leonlan in https://github.com/N-Wouda/ALNS/pull/82
Full Changelog: https://github.com/N-Wouda/ALNS/compare/v4.0.0...v4.1.0
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda almost 4 years ago
ALNS - Version 4.0.0
Major version bump because of breaking changes introduced in the WeightScheme's interface, and its dependents.
Changelog
Issue #57 (PR #70, thanks @leonlan) introduces the optional only_after keyword argument to ALNS.add_repair_operator. This keyword argument can be used to indicate that a repair operator only works with a specific set of destroy operators. One can use this argument as follows:
```python
from alns import ALNS
def destroyop1(current, rndstate): pass
def destroyop2(current, rndstate): pass
def repairop1(destroyed, rndstate): pass
def repairop2(destroyed, rndstate): pass
alns = ALNS()
alns.adddestroyoperator(destroyop1)
alns.adddestroyoperator(destroyop2)
alns.addrepairoperator(repairop1, onlyafter=[destroyop1])
alns.addrepairoperator(repairop2)
``
In this example,repairop1will only be selected ifdestroyop1was selected, whereasrepairop2can be used with bothdestroyop1anddestroy_op2`.
This has consequences for the WeightScheme.select_operators interface: it now takes an additional op_coupling argument, which is a binary 0/1 matrix indicating which operators can work together. In particular, element (i, j) is 1 if destroy operator i and repair operator j can work together, 0 otherwise. The WeightScheme has been updated to use this information to select the appropriate operator pairs.
Existing code should not be impacted, unless your code uses a custom weight scheme.
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 4 years ago
ALNS - Version 3.0.1
Adds logging to the ALNS library, using the default Python logging module.
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 4 years ago
ALNS - Version 3.0.0
Changelog:
Generalised stopping criteria (thanks @leonlan!) . Whereas previously only a maximum number of iterations was supported, you can now also use a maximum runtime.
Stopping criteria are available in alns.stop, and should be passed as the stop argument to ALNS.iterate. The stop argument replaces iterations.
Take the following example, using 10000 iterations:
```python
alns.iterate(..., iterations=10000)
You would now write this as
python
from alns.stop import MaxIterations
alns.iterate(..., stop=MaxIterations(10_000)) ```
In addition, alns.stop.MaxRuntime lets you set a maximum runtime (in seconds). You can also write your own stopping criterion, by inheriting from alns.stop.StoppingCriterion.
With the addition of stopping criteria, the old usage of the criteria module for acceptance criteria has become imprecise. This is why alns.criteria is now accessible as alns.accept. To simplify the module names further, alns.weight_schemes has been renamed to alns.weights.
ALNS now has a code style: black! The style is now consistent, and will be enforced through the CI pipeline.
Example notebooks and documentation have been updated to the new usage.
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 4 years ago
ALNS - Version 2.1.2
Fixes a bug where key-word arguments passed to ALNS.iterate were not available in the on_best callback.
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 4 years ago
ALNS - Version 2.1.1
Fix an off-by-one mistake in the number of runtimes to collect. We want to collect how long one iteration takes, but by accident collected the start time as well. This resulted in a mistaken value at index 0.
This release removes that mistake, such that the actual results are properly aligned.
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 4 years ago
ALNS - Version 2.1.0
Collects iteration runtimes. These can be accessed as
python
res = alns.iterate(...)
runtimes = res.statistics.runtimes # per iteration, in seconds
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 4 years ago
ALNS - Version 2.0.2
Allow passing kwargs to ALNS.iterate. These kwargs are then passed to the operators. This is useful for larger heuristics, as this allows one to avoid explicit dependencies on global state (like a global data singleton).
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 4 years ago
ALNS - Version 2.0.1
Maintenance release.
- Add RCPSP example notebook.
- Switch to Github Actions (from Travis, which we no longer use).
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 4 years ago
ALNS - Version 2.0.0
Features
- Weight schemes, which control how
alns.ALNSselects operators. Two schemes commonly used in the literature (convex updating and segmented weights) have been implemented, asalns.weight_schemes.SimpleWeightsandalns.weight_schemes.SegmentedWeights, respectively (issue #29). - An
autofit()function foralns.criteria.SimulatedAnnealing(issue #35). - The
alnspackage is considerably better typed now, and passesmypystatic 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 aweight_schemeargument, 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.AcceptanceCriterionshould now implement__call__, notaccept(). The function signature is unchanged. alns.Result.plot_operator_counts()now takes afigargument, rather thanfigure.- 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.
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 4 years ago
ALNS - Drop Py3.6
- Use pyproject.toml
- Drop Py3.6 (EOL December 2021)
- Drop Codacy
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 4 years ago
ALNS - Support for Python 3.9
- Support Py3.9
- Clean-up and simplify callback implementation
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda over 5 years ago
ALNS - Unofficial support for numpy's new generators
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.
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 6 years ago
ALNS - Improve ALNS solution evaluation order
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.
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 6 years ago
ALNS - Plot global best in objective plots
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda about 6 years ago
ALNS - Remove support for Python 3.4
Going forward, the range of supported Python versions is 3.5 and up. Older versions might work, but there is no guarantee.
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda over 6 years ago
ALNS - 1.2.0
Changelog:
Call-back mix-in class with options for acting on events
Operator decay parameters in [0, 1], rather than (0, 1).
Optional title argument for
Result.plot_objectiveMore flexible
Result.plot_operator_counts
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda over 6 years ago
ALNS - v1.1.1 - Support Python 3.8
Changelog: - Test and support for Python 3.8
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda over 6 years ago
ALNS - v1.1.0
This release adds support for operator selection diagnostics on the ALNS Result class.
Changelog:
- Merged in #16, which closes #9.
- Added plot method for operator counts, as result.plot_operator_counts()
- Added (optional) operator naming, via alns.add_<operator type>_operator(operator[, name="name"])
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda over 6 years ago
ALNS - Fix docstrings, update CSP example
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda almost 7 years ago
ALNS - New example notebook, and clean-up
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda almost 7 years ago
ALNS - Specify PyPI topics
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda almost 7 years ago
ALNS - Initial release
- ALNS algorithm
- Acceptance criteria (Hill-climbing, Simulated annealing, and Record-to-record travel)
- Tests and documentation
- TSP example
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda almost 7 years ago
ALNS - First alpha release
Scientific Software - Peer-reviewed
- Python
Published by N-Wouda almost 7 years ago