I would do it without any OPL coding! The easiest way is to design a pre-processing phase (e.g. query if you are using access). Let us assume you have a list of 10 carriers. Let us design a table T with 2 fields : Carrier Name and Turn_On_Off_Flag (boolean values). The list of carriers that you will be using for the current run can be read from a query that involves the table T such that the parameter Turn_On_Off_Flag is equal to 1.

Re: turn on/off contraint

I would do it without any OPL coding! The easiest way is to design a pre-processing phase (e.g. query if you are using access). Let us assume you have a list of 10 carriers. Let us design a table T with 2 fields : Carrier Name and Turn_On_Off_Flag (boolean values). The list of carriers that you will be using for the current run can be read from a query that involves the table T such that the parameter Turn_On_Off_Flag is equal to 1.

Can we use if condition in OPL? I thought we can use only mathematical constraints not logic type of thing.

Here is the situation. The model is assignment problem. The model will choose the best assignment. Then I have another set of constraints (forall) that will force the assignment. I would like to be able to switch on/off this constraint in ODM. How can I do this?

Re: turn on/off contraint

Can we use if condition in OPL? I thought we can use only mathematical constraints not logic type of thing.

Here is the situation. The model is assignment problem. The model will choose the best assignment. Then I have another set of constraints (forall) that will force the assignment. I would like to be able to switch on/off this constraint in ODM. How can I do this?