[Scip] help with objective function

Robert Fleming robert.e.fleming at gmail.com
Thu Nov 15 18:14:44 MET 2007


We are trying to convert the following objective function from
Xpress-Mosel format to ZIMPL and we are having trouble.

!Objective: maximize total value
MaxVal:= sum(i in GAMES, k in SLOTS) (sum (t in TEAMS)
MapTeamsGames(i,t)*CostTeamSlot(k,t))*x(i,k)

Where GAMES is a set 1..150
SLOTS is a set 1..480
TEAMS is a set 1..25
MapTeamsGames is a binary matrix mapping the game (i) to the two
participating teams (t)
CostTeamSlot is a matrix of real numbers displaying the cost for team
(t) to play in slot (k)
x(i,k) is the binary variable to determine whether game (i) is played
in slot (k)

What we have so far in ZIMPL is:

#Objective maximize total value
maximize MaxVal := sum <i,k> in GS do (sum <t> in TEAMS do
MapTeamsGames[i,t]*CostTeamSlot[k,t])*X[i,k];

Where GS is the set GAMES*SLOTS
The rest is the same
The main problem is figuring out the double forall and double sum commands.

Any help would be much appreciated...

Thanks,
Robert


More information about the Scip mailing list