Alns

Latest version: v6.0.0

Safety actively analyzes 630026 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 7

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).

2.0.1

Maintenance release.

- Add RCPSP example notebook.
- Switch to Github Actions (from Travis, which we no longer use).

2.0.0

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.

1.4.0

- Use pyproject.toml
- Drop Py3.6 (EOL December 2021)
- Drop Codacy

1.3.2

Fix issue 40.

1.3.1

Fix issue 36.

Page 4 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.