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.