Originally posted by: SatishKumarA
Hi All,
I have a set of resources {1,2,3,4} each one belongs to certain type called Resource_Type {1,2}. While defining a variable say X, I would like to declare it as
dvar int+ X[Resource_Type] in Resources[Resource_Type];
whereas data should be like
Resources[1] = {1,3};
Resources[2] = {2,4};
which indicates Resources 1,3 are of Resource_Type and 2,4 are of Resource_Type 2.
Currently, the domain for variable X is all Resources independent of its type. But I would like to reduce the domain and so would like to assign the domain based on Resource_Type.
How can I implement this in OPL?
#DecisionOptimization#OPLusingCPOptimizer