N-Wouda / ALNS

Adaptive large neighbourhood search (and more!) in Python.
https://alns.readthedocs.io/en/latest/
MIT License
447 stars 124 forks source link

Example notebook PFSP #110

Closed leonlan closed 1 year ago

leonlan commented 1 year ago

Closes #106.

leonlan commented 1 year ago

This is almost done. I'll have another read tomorrow morning and then this can be reviewed.

N-Wouda commented 1 year ago

Notebook:

Both destroy operators rely on the n_remove parameter, which should inferred from the **kwargs argument. We also set a default value of 2 in case it’s not provided as keyword argument.

Or:

def random_removal(state, rnd_state, n_remove=2):
    ...

And then mention n_remove can be passed as a kwarg to ALNS.iterate. Testing if kwargs has a thing is a bit weird - either pass them along, or have defaults for parameters your need.

What happens if you use 0.01 or 0.05 for $\alpha$? I think 0.1 is fairly large still, and can imagine (much) smaller values work even better.

N-Wouda commented 1 year ago

This LGTM, and I think most of what I remark on above can be updated really quickly.

leonlan commented 1 year ago

@N-Wouda I addressed all comments in the latest version! Can you merge this if you're OK with this?

N-Wouda commented 1 year ago

Yeah, I think it's OK now. I fixed two small typo's.

N-Wouda commented 1 year ago

This is a very nice addition to the examples. We have a wide range of examples now, which should help people get started quickly.