Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from N-Wouda/adaptive-weighting-schemes
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. API changes ----------- The following list details all breaking API changes. The example notebooks 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.
- Loading branch information