Comments (5)
Thanks, But I still have a question: there are several select strategies and accept criterions. The first idea is to make a combination with these strategy, but it will take a lot of time. Is there a priority for these policies( select and accept strategy)?
I'm not sure if I understand you correctly here. Do you mean if there is any recommended selection scheme and acceptance criterion combination? If so, then yes: the vehicle routing literature generally uses the RouletteWheel
selection scheme combined with the SimulatedAnnealing
acceptance criterion. But if you are trying to solve a different problem, then it may be that there are other combinations that work better. This is indeed time consuming to figure out, but there is no general answer to which combination works best besides running numerical experiments.
from alns.
If so, then yes: the vehicle routing literature generally uses the
RouletteWheel
selection scheme combined with theSimulatedAnnealing
acceptance criterion.
[To be fair, particularly the (segmented) roulette wheel is used a lot largely due to inertia/lack of interest in experimenting with alternatives. I doubt it's actually the best method for operator selection - it's just the first thing that's been suggested in the literature.]
from alns.
Thanks.
I have no other questions.
from alns.
Hi Zhe,
In addition to customizing the structure of the solution, destroy and repair operators, Isn't there a need to consider other modules(select, accept and stop conditions)?
The most important ingredients for your ALNS heuristic are the solution states and the destroy/repair operators. You don't have to implement your own operator selection scheme, acceptance criterion or stopping criteria, because we have already implemented the most common ones from the literature (RouletteWheel
, SimulatedAnnealing
, etc.). You could customize your own selection scheme or acceptance criterion, but that is generally less impactful than implementing good destroy/repair operators.
For the stop criterion, can it be mixed to use(for example, under the time limit condition, because the solution for the improvement is not found for a long time, it is terminated early)? If so, are there any examples to refer to?
We have not provided any interface yet to mix stopping criteria, but this should do the trick:
from typing import List
from numpy.random import RandomState
from alns.State import State
from alns.stop.StoppingCriterion import StoppingCriterion
class MixedStop(StoppingCriterion):
"""
Criterion that stops after a specified maximum runtime.
"""
def __init__(self, stopping_criteria: List[StoppingCriterion]):
self.stopping_criteria = stopping_criteria
def __call__(self, rnd: RandomState, best: State, current: State) -> bool:
"""
Returns true if at least one of the initialized stopping criteria is satisfied.
"""
return any(stop(rnd, best, current) for stop in self.stopping_criteria)
from als.stop import NoImprovement, MaxRuntime
stop1 = NoImprovement(10000)
stop2 = MaxRuntime(100)
# This criterion stops when the best solution has not been improved for 10K
# or after 100 seconds of runtime.
stop = MixedStop([stop1, stop2])
Are there any articles on similar trade-offs in terms of choosing weights? (Similar to stop criterion)
I don't know of any articles specifically analyzing the choice of weights, but you might be interested in this paper
If I want to improve the solver, in addition to the custom module, is it focus on how to choose the weight(such as learn select weights)?
That is one possible direction, yes. You could also implement your own custom operator selection scheme (see paper above).
Let me know if you have any other questions!
from alns.
Thanks,
But I still have a question:
there are several select strategies and accept criterions. The first idea is to make a combination with these strategy, but it will
take a lot of time. Is there a priority for these policies( select and accept strategy)?
from alns.
Related Issues (20)
- Simple, cookie-cutter template to get started
- Integrate with MABWiser library HOT 2
- Integration with optimization modeling/solver software HOT 8
- Adaptive simulated annealing temperature and step-size HOT 4
- what's your alns.weights HOT 1
- Update docs
- Tasklist for next release HOT 2
- About other VRP destroy and repair operators HOT 3
- Bug in `examples/resource_constrained_project_scheduling_problem.ipynb:random_insert`?
- Circle bin packing with ALNS HOT 21
- Run example notebooks in CI HOT 1
- Deprecate AlphaUCB?
- How to solve vehicle routing problem with multiple capacities? HOT 5
- Documentation improvements HOT 2
- RCPSP示例中的“instance = ProblemData.read_instance('data/j9041_6.sm')”的数据在哪里 HOT 1
- Where is the data for "instance = ProblemData.read_instance('data/j9041_6.sm')" in the RCPSP example HOT 3
- Run w/o MABwiser in the CI
- Rename RandomWalk and WorseAccept? HOT 2
- Replace `RandomState` with `Generator` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alns.