Hi All,
Question as i'm scratching my head. I've got a bunch of stores, which can have a number of visits from sales people per week (calls) which generate a certain amount of profit. I have limited visited capacity so I'm trying to maximise profit, within the visit capacity where stores could either receive 0,1,2 or 3 calls. Clearly in production, the store lists, valid number of calls etc will all change.
I followed the community example here:https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Optimization/ta-p/3061... ..and created a workflow based on this (mixed int programming.yxdb )where the individual inputs where created in excel (input_o,input_a, input_b). This seems to work. Excellent news.
I then tried to make it dynamic in a new workflow (mixed int programming actual.yxdb) where it creates the individual input files dynamically based on sheet "prof table". After much hacking, I managed to recreate the 3 inputs and make them dynamic. Plugged them into the same optimisation module and, err, Error: Optimization (64): Tool #3: Error in UseMethod("as.constraint"). I really can't suss it out.
Can anyone spot what I'm doing wrong please?
Thanks
Steve
Hello @stevehughes
Please let me know if you came up with a resolution to this issue or if you are still troubleshooting it!
But to start off, looking at the workflows in question, the error you have is referring to Tool 64 is related to the constraints set up.
Based on this Solved Post, it appears the solution is below: (Props to both @CristonS and @SydneyF for this solution!)
"The error you are getting is because an inconsistent constraint mode was selected. Based on the way your data is formatted, you need to select Dense matrix, variables in rows instead of Dense matrix, constraints in rows under the Select constraint mode for Input Anchor A set-up option. Changing this allows your model to run, however, you now will get the error TM_NO_SOLUTION. I think this is because you've set your warehouses as a constraint, where each warehouse needs to be <= 1. This is essentially saying that each warehouse can only be used once (can only service one home).
For some reference on setting up your Optimization, I would refer to this post:
And the sample workflow in Alteryx:
Help> Sample Workflows> Prescriptive Analytics> 1_Optimization_Model_Input_Modes"
Next, if the issue isn't resolved, we can try to more directly troubleshoot your workflows. I'm noticing an issue when I try to run the workflow since the input fields are all missing from the workflows.
Is it possible for you to re-upload the workflows as a .yxmd? (Options > Export Workflow) with the data sources included? Please make sure to remove any sensitive data from the input fields before re-uploading them!
I hope you already resolved this, but if not I hope this helps you out!
TrevorS
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |