SOS2 equations defination

Hello. I want to code this SOS2 equations with GAMS. I can not do anything because the r and s values are one by one and matrix in the second equation. Can someone help me? How can I code this equations? Thanks in advance.
Adsız.jpg

Help please :frowning:

how can i write this matrix in equations? Nobody knows?