Hi,
what happens if you remove
main_model.sh[s].UB = 1;
?
And if you turn that to
writeln(main_model.sh[s].UB);
?
Last, can you post a minimal example so that other users could try ?
regards
Source: Re: OPL Script – Accessing variable indexed by tuple