Alteryx Designer Desktop Discussions

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

Optimization | Constraint coefficients change with the chosen combination of variables

LeandroYgorLoli
10 - Fireball

Hello community, I would like to know if it is possible to build an optimization in Alteryx in which the constraint coefficients change with the chosen combination of variables.

 

I'll put an example below to make it clearer:
My problem is maximizing the amount of car I can produce. My vehicles have parts. Each vehicle type can share parts with each other, for example, use the same tire or steering wheel.
My restriction is that I cannot request air freight for the missing parts if the cost to bring all the vehicle parts is greater than a percentage of the vehicle's margin.
In a simplified way, if to produce my vehicle I need a tire (10 usd) and a steering wheel (20 usd). So to produce my vehicle (which limit is 25 usd) I would spend 30 usd, so I couldn't do the shipping.
But if another vehicle also needs a tire and a steering wheel, my fixed cost of packaging is diluted by the two vehicles, making the restriction obeyed. For example, bringing the tire would be, in this case, 5 usd and the steering wheel 10 usd. Getting below 15 usd.


So, I would like to know if it is possible for me to build a constraint for the optimizer in which its coefficients are calculated according to the scenario chosen by the optimizer and used to check if it complies with the constraint.


My problem would be for 5000+ vehicles and 300+ parts, so calculating all possible combinations is impractical. It would be 2^5000 approximately.

2 REPLIES 2
mceleavey
17 - Castor
17 - Castor

Hi @LeandroYgorLoli ,

 

Yes, you can put the Optimisation tool into a batch macro and calculate your coefficient value ahead of the macro. This will then determine this constraint value and that can be fed into the batch macro as the Control Parameter, which you would use to overwrite the constraint value in the Optimisation tool for each batch. This would effectively make this constraint value dynamic.

 

I hope the helps,

 

M.



Bulien

LeandroYgorLoli
10 - Fireball

Hi @mceleavey!
Thanks for your idea, I'll test it and get back to you!
Have a great day!

Labels