I think the Optimization tool is broken in version 2018.4.
I downloaded the Baseball Optimization workflow from this helpful post and it worked great. It's made with Alteryx 10.5.
If I look at the Optimization tool's source workflow, it breaks.
If I delete the Optimization tool from the workflow and drag in a new Optimization tool (and configure it the same), it breaks.
If I copy/paste the tool from one workflow to another, it breaks in both places.
If I connect different data to the original Optimization tool, it...works fine.
I can't get the 2018.4 Optimization tool to work in any context.
In every case, I get the "Error in UseMethod("as.constraint"):" error.
I've attached a trimmed-down version of the original version, which works.
I've attached a copy/paste of the original version's data with a 2018.4 Optimization tool swapped in (same configuration), which doesn't work.
I haven't been able to open these packages on a different computer to see if they work/break, so the error could be in my install -- please let me know if they both work for you.
If anybody has a fix for this, or can give me a copy/paste of the underpinning R code from a version that works, I'd appreciate it.
-Nathan
Solved! Go to Solution.
Looks like some others have had similar issues-- I found this answer on another post
Changing the constraint mode to 'Dense matrix, variables in rows' instead of 'Dense matrix, constraints in rows' worked for me.
Best,
mmenth
Hey mmenth,
Thanks for this. I read that article yesterday and thought people were just using the wrong constraint mode in general for their data. I didn't realize that the actual Optimization tool itself had the options flip-flopped in the latest release. So I copy/pasted my "working" workflow (which normally breaks it) and changed the constraint mode from "constraints in rows" to "variables in rows" and ... well, it worked! I was all ready to hand-code a workaround today.
You just saved me hours of frustration!
Thank you,
Nathan