Hello everyone,
I am currently working on a problem that requires me to add numerous AddElement constraints with a very big table (length of roughly 14 000) as a parameter. Because of this, finding a solution, while still possible, takes a considerable amount of time. Is there a way to make the model more efficient ?
For example, is spliting the table in 14 smaller tables (each with a length of ~1000) a good idea ? I would calculate which table the required information is in along with its index. I would then add 14 AddElements constraints to find the value with said index in each table, and only take the one that comes from correct table (there is no way to use the OnlyEnforceIf method alongside AddElement to my knowledge). The index would have a much smaller domain, but is it even worth it ?
This brings me to my next question: can I get around the fact that I cannot use OnlyEnforceIf on AddElement constraints by manually creating the variables and constraints that AddElement implicitly creates and using OnlyEnforceIf on these constraints ? Is it worth the hassle ?