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

Interactive bin packing #490

Merged
merged 6 commits into from Oct 4, 2017
Merged

Conversation

@isabelle49
Copy link
Contributor

@isabelle49 isabelle49 commented Sep 12, 2017

This adds the bin packing interactive. I added a small amount of text to the tractability chapter to explain it.

@JackMorganNZ JackMorganNZ self-requested a review Oct 3, 2017
@JackMorganNZ JackMorganNZ added this to the 2.11.0 milestone Oct 3, 2017
Copy link
Member

@JackMorganNZ JackMorganNZ left a comment

Changes look absolutely amazing! A change to make in the code, plus there should be a thumbnail image at interactives/bin-packing/thumbnail.png of the interactive (see other whole page interactives).

A variation of the first fit algorithm involves sorting the items in decreasing order first. This means the largest items are packed first.

Try out these algorithms or your own ideas using this interactive:
{interactive name="bin-packing" type="whole-page" text="Bin Packing Interactive"}

This comment has been minimized.

@JackMorganNZ

JackMorganNZ Oct 3, 2017
Member

This line has a space at the start which doesn't render the interactive link. All you need to do is delete the space, but to maintain consistency, it would be great to have a blank line between lines 543 and 544.

This comment has been minimized.

@isabelle49

isabelle49 Oct 4, 2017
Author Contributor

Fixed.

<div id="modal1" class="modal">
<div class="modal-content">
<p>Enter the comma separated item sizes. The sizes should be between 1 and 100.</p>
<input type="text" id="sizes" class="validate" minlength="1" pattern="^(([1-9]|[1-8][0-9]|9[0-9]|100)\s*)?(\s*,\s*([1-9]|[1-8][0-9]|9[0-9]|100))*$"/>

This comment has been minimized.

@JackMorganNZ

JackMorganNZ Oct 3, 2017
Member

Could you explain what the pattern does?

This comment has been minimized.

@isabelle49

isabelle49 Oct 4, 2017
Author Contributor

I have removed it. It was an attempt to do input checking, which didn't work and we decided not to prioritise spending time to make it work.

@JackMorganNZ JackMorganNZ merged commit 4f2823c into uccser:develop Oct 4, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@JackMorganNZ JackMorganNZ mentioned this pull request Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.