Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example notebook PFSP #110

Merged
merged 16 commits into from
Nov 13, 2022
Merged

Example notebook PFSP #110

merged 16 commits into from
Nov 13, 2022

Conversation

leonlan
Copy link
Collaborator

@leonlan leonlan commented Nov 11, 2022

Closes #106.

@leonlan leonlan changed the title [WIP] Example notebook PFSP Example notebook PFSP Nov 12, 2022
@leonlan
Copy link
Collaborator Author

leonlan commented Nov 12, 2022

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

@leonlan leonlan requested a review from N-Wouda November 13, 2022 08:23
Copy link
Owner

@N-Wouda N-Wouda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a look at the notebook now.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@N-Wouda
Copy link
Owner

N-Wouda commented Nov 13, 2022

Notebook:

  • "This notebook is largely based on Stützle and Ruiz (2018)", I would rewrite as "implements ideas of". They came up with ideas, but it's your implementation.

  • with open("tai50_20_8.txt", 'r') as fi: -> can we make this into a classmethod on Data?

  • Do the colours mean anything in the Gantt chart?

  • Gantt chart y-label: "Machine", not "Machines"

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.

  • NEH ordering - what does NEH mean?

  • "Autofitting acceptance criteria" section, first parag: list doesn't render well. I think there needs to be a white line separating it from the text.

  • pct_diff = 100 * (objective - data.bkv) / bkv: this only works because the with open() part pollutes the global namespace (so bkv also exists, but perhaps should not). I'd use data.<value> throughout. Maybe write DATA to make its 'globalness' stand out a bit more.

  • Most of the notebook uses SA, but tuning suddenly uses RRT (without explanation). That feels a bit weird; maybe stick to SA throughout.

  • print(objectives) is somewhat unnecessary if we'll get a plot in the next cell already.

  • Text(0.5, 0, 'n_destroy') you can avoid by putting a semicolon after the last statement in the cell, like so: ax.set_xlabel("n_destroy");.

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
Copy link
Owner

N-Wouda commented Nov 13, 2022

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

@leonlan
Copy link
Collaborator Author

leonlan commented Nov 13, 2022

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

@N-Wouda
Copy link
Owner

N-Wouda commented Nov 13, 2022

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

@N-Wouda N-Wouda merged commit fd0c9e1 into master Nov 13, 2022
@N-Wouda N-Wouda deleted the permutation-flow-shop-example branch November 13, 2022 15:14
@N-Wouda
Copy link
Owner

N-Wouda commented Nov 13, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example for the permutation flow shop problem
2 participants