Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Optimization Tool:Error in .check_constraints.L_constraint(constr,x):

MaliniLakshman
7 - Meteor

I am trying to solve room utilization use case(place as many events as possible in the available rooms) with the help of optimization tool. I am getting this error when I run the workflow.

 

MaliniLakshman_0-1617824532121.png

The configuration of Optimization Tool:

 

MaliniLakshman_1-1617824607160.png

 

 

Where am I going wrong?

6 REPLIES 6
patrick_digan
17 - Castor
17 - Castor

@MaliniLakshman I would check out the new and improved help doc. I provided a few key pieces that they incorporated into the help doc recently. My suggestions:

 

1) Not related to your error, but I would always display the field mapping for anchor O. This can prevent  mistakes in case you don't have the casing right (Variable instead of variable) or spelling right (variabel instead of variable).

2) I would verify that in your A input, the first field is named variable.

3) I would verify that all of your constraint columns in the A input are numeric datatypes (click on the line going into the A input).

4) for the B anchor, I would use a select tool to get it down to just 2 columns (dir and rhs, in that order). Make sure rhs is a numeric datatype. from the help doc:

  • dir: a string, direction of the constraint inequality. It has to be >=, <= or ==.
  • rhs: a number, the right hand side of the inequality, corresponding to b.

5) I would make sure that if you have x columns of constraints in your input A, you have x rows in input B.

 

If that still doesn't solve it, try and provide sample data or a dummy dataset that is giving you the same problem.

BenMoss
ACE Emeritus
ACE Emeritus

Just to add to Patrick’s great response, a quick simple thing to check is that your constraints input should have as many rows as your matrix input has columns (-1, as you will have a column with your decision variables in).

 

If this is not met then that’s likely the root cause.

 

Ben

MaliniLakshman
7 - Meteor

@patrick_digan , @BenMoss  Thanks for the help. I checked every thing you said and all seems to be fine. I will post the workflow with the dummy data soon

MaliniLakshman
7 - Meteor

I tried sampling the data(took only 100 classes out of 1400+) and run the workflow. It worked perfectly. 

 

When I increase beyond 100, it is giving me the same error I mentioned earlier.

 

I am having many constraints(nearly 1000+ as I have to make sure each class is placed only once in a particular room at a particular time)

 

Do I need to change the input mode/ give constraint as SLAM matrix? Please advise.

BenMoss
ACE Emeritus
ACE Emeritus

I don’t think it’s the volume of data, I’ve built a model with  2300+ constrains before and didn’t have any issues.

 

Ben

MaliniLakshman
7 - Meteor

@BenMoss 

What option you select for constraint mode for Anchor A?  

Dense Matrix, constraints in rows

or

Dense Matrix, variables in rows

or

sparse(SLAM)matrix

 

Thanks

Labels