Alteryx Designer Discussions

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

General Discussions has some can't miss conversations going on right now! From conversations about automation to sharing your favorite Alteryx memes, there's something for everyone. Make it part of your community routine!

SOLVED

Optimisation Tool not considering constraints

realdaniel1989
7 - Meteor

Hi all,

 

I'm getting myself familiar with optimization tool and I created a workflow to create an optimised fantasy football team.

 

I have a constraints table 

realdaniel1989_0-1600755820702.png

 

but somehow when I run the workflow, it is not considering the constraints when optimizing. 

 

I've attached the file here.  Hope someone can help me with this.

 

Thanks.

wdavis
Alteryx
Alteryx

Hi @realdaniel1989 

 

It's great to see you looking into the Fantasy Premier League with the Optimization Tool!

 

The reason that your constraints were not working is that the variables need to be in the same format in both the O and A Input. In your existing workflow, the A input had the players sorted alphabetically.

 

I have updated this in your workflow - adding in a sort before each input, which should now work for you.

 

Let me know if this works.

 

Kind Regards,

Will

realdaniel1989
7 - Meteor

Hi @wdavis ,

 

Thank you so much for helping.

 

I hope it's not too much trouble but could you explain to me why they have to be in the same format? 

wdavis
Alteryx
Alteryx

Hi @realdaniel1989 

 

No problem at all!

 

With regards to the formatting, I believe this is just the way that the tool has been configured to work from the outset. However, I don't have the full knowledge on this.

 

This guide here looks in more detail at the workings of the Optimization Tool if you are interested in getting some additional context - https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Optimization/ta-p/3061...

 

Likewise, if you are looking to do more with Fantasy Football and Alteryx I have included an additional macro that was produced to incorporate the future fixtures and team strengths into the workflows.

 

Thanks

Will

 

realdaniel1989
7 - Meteor

Thanks @wdavis 

Labels