help-glpk
[Top][All Lists]
Advanced

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

Re: Defining a variable of mixed datatype in Mathprog


From: Domingo Alvarez Duarte
Subject: Re: Defining a variable of mixed datatype in Mathprog
Date: Tue, 15 Mar 2022 09:26:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

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

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