Hello,

I have a questions that seems straightforward, that I cannot figure out. I am trying to assign a value to all set-elements in a parameter *before* the set-element in a parameter that meets a certain criteria. For example, see the following code:

```
set i
/first, second, third, fourth/;
parameter TT(i);
TT('first')=0;
TT('second')=0;
TT('third')=1
TT('fourth')=0
K$(ord(i)<(TT(i)=1))=1;
;
```

The idea is that I want all *i* before the entry TT(i)=1 to be set to 1 in K. Therefore the output should look like

K(‘first’)=1

K(‘second’)=1

K(‘third’)=0

K(‘fourth’)=0

In reality, I want to use this in an equation to restrict the domain of the equation, to only include elements of the set less than a certain element.

Please let me know if this is clear,

Zack