We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Optimization tool configuration help

Malsadeh
7 - Meteor

I've attached the dataset, which includes the warehouse name along with vendor pricing in columns I, J, K, and L.

My objective is to determine the lowest total cost while meeting the constraints (in pounds) provided.

The Alteryx workflow is also attached for reference.

 

Malsadeh_0-1753299772451.png

 

Malsadeh_1-1753299879572.png

I'm only allowed to use one vendor per warehouse.

 

13 REPLIES 13
alexnajm
18 - Pollux
18 - Pollux

I'm admittedly not as comfortable with this tool so it will take me more time compared to someone else perhaps, but I might take a look here to help start setting it up: Tool Mastery | Optimization - Alteryx Community

 

Qiu
21 - Polaris
21 - Polaris

@Malsadeh 
I studied the link given by @alexnajm and from there I found this one is more helpful.
https://knowledge.alteryx.com/index/s/article/Optimization-Tool-Entering-a-Model-Manually-1583460627...
I can now only work with Manually input and somehow, my flow will work for upto 4 wareshouses and will fail for 5 and above.
I am wondering if there is any limitation on the number of variables?
@gawa @AkimasaKajitani 
It is time for you to save us here. 😁
0724-Malsadeh-A.png0724-Malsadeh-B.png

caltang
17 - Castor
17 - Castor

I'm not good with the tool either so this is helpful! Thanks @Qiu @alexnajm 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
gawa
16 - Nebula
16 - Nebula

@Qiu 

As I'm not good at the Optimization tool, when I face this kind of puzzles, I always start with brute-force approach. In this case, we have 8 warehouses x 4 vendors;4^8=65,536 patterns shall be examined and it's still easily doable scale with Alteryx to calculate.

 

- Create all patterns of selection of vendors for each warehouse.

- Check all patterns if constraints are met

- Find the minimum cost among the above met patterns

image.png

@Malsadeh 

Just a side note. In this kind of problem, there can be another constraint that 'each vendor shall be selected at least one time'. Without considering this constraint, an optimized pattern is consisted of only vendor 'I' and 'J'.

I'm not sure this is the case for your problem, but I configured this logic into the attached workflow.   

Qiu
21 - Polaris
21 - Polaris

@gawa 
Thanks for your hands out and the flow is super impressive. I definetely need some time to study it.

AkimasaKajitani
17 - Castor
17 - Castor

Hi @Malsadeh 

 

The important point to use the Optimization tool is to create the constraints formula. You have to add all the constraints to the constraints formula.

The most difficult constraint of your constraints is that I'm only allowed to use one vendor per warehouse.

Normally the type is "C" because you want to decide the pounds. But I could't add the constraint "one vendor per warehouse". So, instead of using type "C", I decided to use type "B". And then I choose cost x primary lbs as coefficient. By doing so, I can add the constraint "one vendor per warehouse". That constraint formula is AI+AJ+AK+AL=1.

 

For A input:

 

image.png

 

For B input:

AkimasaKajitani_0-1753447747311.png

 

For O input:

 

image.png

 

Answer :

image.png

 

If you can allow multi vendor for the warehouse, the result is as follows.

 

image.png

 

@Qiu fun problem

Qiu
21 - Polaris
21 - Polaris

@AkimasaKajitani thank you very much. Let's invite another two Japan ACE to the conversation, 😄

@DaisukeTsuchiya  @Yoshiro_Fujimori 

Malsadeh
7 - Meteor

Hi Nebula,
Thank you for taking the time to share your workflow! It's the first one I've reviewed, and I’m genuinely impressed with how you approached and solved the problem.

What stands out the most is the dynamic design—you've built it in a way that allows additional warehouses to be added seamlessly. Great work!

 

The only take is that the total cost with that pattern is $19,772,076.15 (KLLILJJJ)  which is higher than 19,761,076 (LJIKLKJK)

Malsadeh
7 - Meteor

Thanks for bringing the Intelligent people on the table! 

Labels
Top Solution Authors