Okey so I ran into another noob error. I tried to edit the code to suit my problem, but when i try to print out some info I get "Sc[C] out of domain" at the for loop: " for {ms in MSizeSubs[c]} {"
Anyone know what I am doing wrong? The new code looks like this:
# The set of servers set S;
#The set of clusters set C;
#The set of servers in a cluster set Sc{c in C};
# Number of servers in subset
param mc{c in C};
# Number of servers available in cluster param cSize{c in C} := card(Sc[c]);
# Set of subset sizes less or equal mc set I{c in C} := {1 .. mc[c]};
# Set of indices for a subset of size i of set Sc
set J{c in C, i in I[c]} := { 1 .. round((prod{a in {1..cSize[c]}}a) / (prod{a in {1..i}}a) / (prod{a in {1..cSize[c]-i}}a)) };
# Set of indices for S set K{c in C} := {1 .. cSize[c]};
# Set containing the kth member of S
set L{c in C, k in K[c]} := setof{s in Sc[c] : k == sum{t in Sc[c] : t <= s} 1} s;
# Set of integers in [i, n] set MRange{c in C, i in I[c]} := {i .. cSize[c]};
# Number of subsets of size i of a set of size j - 1
param ji{c in C, i in I[c], j in MRange[c,i]} := if i==j then 0 else round((prod{a in {1..j-1}}a) / (prod{a in {1..i}}a) / (prod{a in {1..j-1-i}}a)) ;
# Subsets j of size i set N{c in C, i in I[c], j in J[c,i]} :=
if i == 1 then L[c,j] else N[c,i-1,j - ji[c,i,max{k in MRange[c,i] : ji[c,i,k] < j} k]] union L[c,max{k in MRange[c,i] : ji[c,i,k] < j} k];
# Set of subsets of size m set MSizeSubs{c in C} := J[c,mc[c]];
# Servers in subset c set Subsets{c in C, ms in MSizeSubs[c]} := N[c, mc[c], ms];