Linear programming in Lindo:
min E
s.t.
48.14wg+34.62wu+36.72wc+33.16ws>36.72
43.1wg+27.11wu+45.98wc+56.46ws>45.98
253wg+148wu+175wc+160ws>175
41wg+27wu+23wc+84ws>23
wg+wu+wc+ws=1
285.2wg+162.3wu+275.7wc+210.4ws-275.7E<0
123.8wg+128.7wu+348.5wc+154.1ws-348.5E<0
106.72wg+64.21wu+104.1wc+104.04ws-104.1E<0
end
Lingo program using FOR loop structures:
Model:
Sets:
hospital /wg wu wc ws/:weight;
input / nonphy exp beddays/;
output / patient nonpatient nurse interns/;
in(hospital, input): cost;
out(hospital, output): numbers;
endsets
min=E;
Data:
cost=285.2 123.8 106.72 162.3 128.7 64.21 275.5 348.5 104.1 210.4 154.1 104.04;
numbers=48.14 43.10 253 41 34.62 27.11 148 27 36.72 45.98 175 23 33.16 56.46 160 84;
enddata
end
请教一下如何写lingo里的for loop部分