When I want to use the modulo function in my linear model, I get the following error: “Constraint programming constraints cannot be used in combination with real valued variables, only with integer valued variables, element valued variables and activities.”. In my constraint I calculate the modulo of (x_{zht}*(t-1), Z) where Z is a parameter and I have used the function Ord to calculate the first part of the modulo, so x_{zht}*(Ord(t)-1).

Also, I have tried making the indices a subset of Integers and label it as numeric, but then the model does not give any solution anymore (even when I turn the modulo constraint off). How can I make the constraints containing the modulo function in my linear model work?