The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

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 #213: Optimized Flower Arrangements

Charity_K_Wilson
Bola de fogo

This was HARD!

 

I have used the Monte Carlo simulation side before, but I haven't used the optimization side.  Now I'm wondering what business problems might fit into this algorithm.

daiphuongngo
Cometa
Saqueador
Screenshot 2023-10-09 170244.png

Marcel_PwC
Meteoroide

I agree there is kind of error in the solution - using Solver "Glpk" results in 417 flowers (agreed, max possible number) but tool decided to go with 57 Red Roses (2.30$) and 40 White Daisies (2.25$), so not the cheapest solution - probably because switching to White Daisy doesn't increase the number of total flowers. However changing Solver to "Symphony" correct this one matter. Good for Symphony!

RWvanLeeuwen
Bólide

prepping for the expert exam and retaking this challenge

Saqueador
I now see the differences between algorithmsI now see the differences between algorithms
olga_strubbe
Bólide

This was a neat challenge.  It gave me an opportunity to learn about the Optimization tool, which was quite neat. 

In my approach I used both linear (LP) and mixed integer linear (MLP) programming to solve the challenge using a matrix input mode.

2024-02-20_14-29-44.png

lynnesonney
Asteroide

yay no more excel!

Erin
Bólide

Solved using field mapping

Saqueador
This video from the Data Coach helped: https://youtu.be/og4EwRcf1iU?si=bL1XI5WJHze7sMBP 
Challenge 213.png
HardikJani
Asteroide

This kept me up at night. But helped learn an amazing tool. I used the specify model as matrices mode to maximize. Fun tool and fun challenge.

JAKupchik
Asteroide

What an illustrative example of the Optimizer Tool.  Attached!  :-)  JAK

JoshuaM
Cometa

Flower arrangement Optimized!

 

Alteryx workflow :

Saqueador
Snip.PNG

 

Explanation :

Saqueador
O anchor : Consists of the variables (Flowers), Coefficient or what we are maximizing (Number of Flowers), Bounds (ub & lb - respective flower constraints), & Type (I for Integer since flowers have to be an actual number).

A anchor : Dense matrix where our variables are rows - Our variable, flowers, represents each unique flower type. The associated constraint is displayed under budget. This represents the price we would pay for each flower.

B anchor : Define the direction of each constraint. The instructions provide us with the information needed here. Since we have a budget of 950 (right hand side : rhs) we need to ensure the direction is less than or equal to that value.

S output anchor : Lastly , we can interpret the results. The objective relates back to our budget. We can see that we have achieved a value under the total budget. The values associated under name (flowers) represent the total number of flowers. Said differently, this combination of flowers would achieve an objective value under our budget.