### Continued Equality for Condition

Posted:

**Tue Sep 25, 2018 4:55 pm**Hi all,

Long time no see! I have one question about the implementation of continued equality for a break condition of my algorithm. I want to achieve the following pseudocode:

If: a(1) = a(2) = a(3) = ... = a(n), then Break;

else: Continue;

In a GAMS code manner:
Does anyone have idea for that? Thanks in advance!

Cheers!

Gabriel

Long time no see! I have one question about the implementation of continued equality for a break condition of my algorithm. I want to achieve the following pseudocode:

If: a(1) = a(2) = a(3) = ... = a(n), then Break;

else: Continue;

In a GAMS code manner:

Code: Select all

```
loop(n,
...
break$(a(1)=a(2) and a(1)=a(3) and ... a(1)=a(n));
continue;
);
```

Cheers!

Gabriel