Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #52: Solving the Knapsack Problem

patrick_digan
17 - Castor
17 - Castor
Spoiler
I've used the combination macro to get all the combinations. From past experience, it will not scale well in terms of speed. I like my second output which shows you which boxes add up to the weight and price (1+2+3 means boxes 1, 2, and 3 were selected.)Capture.PNG
samN
10 - Fireball

 I Loved this Challenge! I didn't really know what location optimization macros did or how they worked before this. I think it allows for some great use cases and hope to be able to put it to use soon! Also first time nesting macros, so thats fun

ggruccio
ACE Emeritus
ACE Emeritus

Tried several approaches, but went the prescriptive optimization route.  A bit cryptic to set up, but the tool works.

LandonG
8 - Asteroid

Solution attached.

PhilipMannering
16 - Nebula
16 - Nebula

Intrigued about the combination macro someone downloaded from the gallery and used. Will have to give it a try. My solution attached

 

My workflow

Spoiler


The workflow using the macroThe workflow using the macro


The macroThe macro

 

 

jasperlch
12 - Quasar

Solution attached.

dsmdavid
11 - Bolide

Spent most part of the morning stuck at this, trying to find a dynamic solution. Knew that an iterative was going to do the trick, but thought a batch was needed. Inspiration came after a while away from the computer....

Natasha
9 - Comet

Comparing now my solution to others I feel that I am missing something.. I did cheat a little bit for the second output and instead of doing a macro I used a sample tool, which of course won't let to produce the details for thousands of batches but does work for looking at a few options. 

 

My solution is somewhat similar to the provided non-macro solution. I know that it doesn't consider all possible batch combinations, but I don't think we need to consider them all (Correct me if I am wrong here), as the goal is to optimise $ value, so I believe sorting desc is enough. 

 

I've never used Optimisation tool , so looking forward to inspect it! 

 

Spoiler
My all-blue-tool workflow 
Screen Shot 2017-12-28 at 01.29.30.png

 

jamielaird
14 - Magnetar

Well that took a LONG time.

 

But I learned some new things, and that's what this is all about.

 

Full disclosure: after several failed attempts and many reads of the Optimizer Macro help file I reverse engineered @estherb47's solution and implemented something pretty similar. Thanks, Esther. You made it look so easy..

 

Spoiler
Screen Shot 2018-01-04 at 01.03.52.png

And a special shout out to these guys. Couldn't have done it without you.

 

Spoiler
Screen Shot 2018-01-04 at 01.14.55.png
JosephSerpis
17 - Castor
17 - Castor

Challenge Completed