Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Constraints in the Optimization Tool

niteshsharma677
7 - Meteor

Hi Everyone,

 

I'm trying to Automate an excel which is using Solver for optimization. In Alteryx, I'm using the 'Optimization tool' for this.

So I'm able to complete the first step which is for input O' of the Optimization tool.

 

I've figured out 'variable', 'coefficient', and 'type' for input 'O'

 

Now the second step is constraints. in Excel, it was like following

 

variableColumn 1dirColumn 2
A0<=1
B0<=2
C0<=5
D0<=7
E0<=3

 

Column 1 is the profit column which I'm trying to maximize but the profit for each variable should not be greater than column 2 values.

How can I put this constraint?

 

And do I need to use input A or input B for the constraints?

 

Can someone please help

1 REPLY 1
JamesCharnley
13 - Pulsar

Hi @niteshsharma677, I don't think that the constraints part of the sample workflows within Alteryx are all that clear so I'll try to explain (I didn't know about that sample workflows for a while, but for reference you can access them going to the help menu -> Sample Workflows -> Predictive Tool Samples -> Prescriptive Analytics). I'm not an expert as such so maybe someone else can chime in too.

 

You have an option within the configuration window of the tool to choose whether you want variables or constraints in rows. I think having variables in rows is a bit more intuitive. In that case, your variables will go into the A anchor and the constraints will go into the B anchor.

 

You can set your constraints up in a format similar to excel, with a dir and rhs in a text input, something like this:

 

JamesCharnley_0-1667985711919.png

 

All of my example workbooks are weekly challenge solutions so I don't necessarily want to post one here as spoilers if you don't want, but I can send you if you'd like.

Labels