help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Defining a variable of mixed datatype in Mathprog


From: Anku Pandey
Subject: Defining a variable of mixed datatype in Mathprog
Date: Tue, 15 Mar 2022 11:56:54 +0530

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

[Prev in Thread] Current Thread [Next in Thread]