Hi,
let me try to help you with the syntax:
int nbStudentPerDiscipline[d in Discipline]=
(card({n |in StudentDiscipline })==0)?0:first({n | in StudentDiscipline });
{string} PossibleLargeRoom[d in Discipline] =
{ x |in DedicatedRoomSet : nbStudentPerDiscipline[d] <= 300}; /*We want the code to provide the matching discipline that has n students and room that suitable for # students, n<= 300 , but got error 'Expecting a tuple type, found string */
execute {
writeln(“PossibleLargeRoom = “, PossibleLargeRoom);
}
works better
regards
https://www.linkedin.com/pulse/puzzles-having-fun-useful-mathematics-alex-fleischer/
Source: Re: How to preprocess part of information of excel in CP