Hello Everyone,

I'm trying to define a set consists of binary variables. I have defined my problem below:

t=24

∑ binary_variable_i(t) = X_i

t=1

In this problem, I should have different type of binary variables in a set. How can I code this in GAMS?

Thannks

## Defining a binary variable set Topic is solved

### Re: Defining a binary variable set

Hi

I might have misunderstood you, but are this you are looking for (see here):

Cheers

Renger

I might have misunderstood you, but are this you are looking for (see here):

Code: Select all

```
binary variable
myvar(t);
```

Renger

____________________________________

Enjoy modeling even more: Read my blog on modeling at The lazy economist

Enjoy modeling even more: Read my blog on modeling at The lazy economist

### Re: Defining a binary variable set

Yes. That's exactly what I want. Since I'm new on GAMS, questions can be easy. Sorry for that

I've another question. Similar to this question, can I create a set consisting of other sets ?

For example;

and I'd like to call these x,y,z sets in the

I've another question. Similar to this question, can I create a set consisting of other sets ?

For example;

Code: Select all

```
set
t /1*24/
x(t) /6*8/
y(t) /14*17/
z(t) /14*18/
```

**equation**part depending of a variable i. Is it possible?