Originally posted by: leonhbr
Hey everybody,
I am starting to use CPLEX during my studies and I need to know how to assign queues of intigers to a specific set of numbers. For instance, I have the given sets A={1,2,3,4} and B={5,6,7}. Now I want to assign them to given Intervals I= {1,2,3,4} and J={5,6,7,8}. In this case, there are 4 possible sollutions, give be the real world context:
-
{1,2,3,4} is assigned to {1,2,3,4} and {5,6,7} is assigned to {5,6,7}
-
{1,2,3,4} is assigned to {1,2,3,4} and {5,6,7} is assigned to {6,7,8}
-
{1,2,3,4} is assigned to {5,6,7,8} and {5,6,7} is assigned to {1,2,3}
-
{1,2,3,4} is assigned to {5,6,7,8} and {5,6,7} is assigned to {2,3,4}
So in other words, I am not allowed to split up the queues and each queue should be in one intervals. It is also important, that the order of the queues and the intervals can not be changed. For example, it should not be allowed, that {1,2,3,4} is assigned to {4,3,2,1} and vice versa.
When I try to implement this constraint, the solution gets wrong. You can find the constraint and the data set attatched. I think, that the problem is generated by constraint_3 but I don't know how to solve it.
Does anybody have an idea how to solve this?
Kind regards
#DecisionOptimization#OPLusingCPLEXOptimizer