constraint

21 views
Skip to first unread message

Rahaf

unread,
Sep 26, 2021, 3:24:58 AM9/26/21
to AMPL Modeling Language
Hi,I have 3 services I want to give each server the same constraint but I I don’t know how I can do that by AMPL . I will write the constrains three times for each server but how I can it know for the first server and the second server, etc.

ser.png

AMPL Google Group

unread,
Sep 27, 2021, 2:26:18 PM9/27/21
to AMPL Modeling Language
The expression for your variable,

e3444d916f1452dd5e52aed78d6fc089.png

is not standard mathematical notation, so I can only guess as to the constraint that you want to express. Is M the set of servers? Then you might want to define a constraint for each server like this:

subject to Severs {a in M}:
sum {lambda in W} sum {t in BrPsi} sum {d in BrM} x[lambda,t,d,a] = 1;

You would probably need to modify this statement, however, so that it is consistent with the names that you give to your sets, and with the definition of variable x.


--
Robert Fourer
am...@googlegroups.com
{#HS:1641961339-106440#}
Reply all
Reply to author
Forward
0 new messages