It would help if you give a problem description and your expected implementation for it because without then your initial question is too open/vague.

On 15/3/22 7:26, Anku Pandey wrote:
Hi,

I have to formulate a problem in mathprog where a variable can be both integer type and continuous type based on index.

Let me give an example to further illustrate this.

I have two sets of items:
set itemInteger;
set itemContinuous;

I need to define a variable, awardQuantity, on these sets so that for items in the set itemInteger, it is of type Integer and for items in set itemContinuous, it is of type continuous.

I know I can define two different variables:

var awardQuantityInt[i in itemInteger], integer;
var awardQuantityCont[i in itemContinuous];

But that is not what I am looking for.
I want a single variable handling both types.



I would really appreciate it if I can get some help on it. I have been trying to find an answer to this for a few days now.

Thanks,
Anku




Reply via email to