Hello everybody,

I have the following CSV file, it is like an array with four entries “(i, s, t, f)”, in which “i” is the indicator and “s, t, f” are its assigned values.

for this, I have written the next code.

```
Sets
i /1*300/
s /0*23/
t /1*24/;
Sets
x(i,s,t)
/
$ondelim
$include Pairs.csv
$offdelim
/;
```

But the code gives the result like this;

This is not what I want since values are not accessible.

Thank you for your helps.

Pairs.csv (4.26 KB)

f is a numeric field, correct? You you need to store this in a *parameter* not a *set*:

```
Parameter x(i,s,t)
/
$ondelim
$include Pairs.csv
$offdelim
/;
```

-Michael

Thank you for your reply.

But if I define it as a parameter, then I cannot use syntaxes such as, “for” or “loop”.

Moreover, Would you please give me some hints on How I can define a subset for multi-dimensional sets?

Why not? loop((i,s,t)$x(i,s,t), …) iterates through the non-zero tuples of x. You can also create a dynamic set from x: set xset(i,s,t); xset(i,s,t) = x(i,s,t); You should invest more in understanding the principles of the language and study the documentation. Then things will be clearer.

-Michael