doubt writing the code

Skip to first unread message

María Vargas Magán

Mar 24, 2024, 9:03:25 AMMar 24
to AMPL Modeling Language
Hello. I would like to define the subset S contained in N:={1..n} and that S is not equal to N at the same time and I don´t know how to do it. I've thought define the restriction 
subject to not_equal_to_N:
     card(S) =! card(N);
so that S is not equal to N. 

Can you help me? Thanks !! :)

AMPL Google Group

Mar 25, 2024, 3:19:11 PMMar 25
to AMPL Modeling Language
Your question has been moved to our new user forum at, and a response has been posted. To see the response, use this link:

To reply, click the red "Reply" button that follows the response. (Do not send an email reply to this message.)

Robert Fourer

We're switching to a new, enhanced user forum.
Join it now at
Reply all
Reply to author
0 new messages