# The WDM wavelength routing and assignment model # with translation everywhere # Sets set N; # nodes in the network set E within {N,N}; # links in the network set W; # possible wavelength capacities set D within {N,N}; # point-to-point demands set S; # potential structures set C; # potential switches set P; # lightpaths set L {C} within P default {}; # paths that use switch c set Es {S} within E default {}; # Es[s] is the set of links in structure s set Pes {E,S} within P default {}; # Pes[i,j,s] is the set of paths using link (i,j) of structure s set K; # The set of optical cycles set Pk {K} within P; # paths in optical cycle k set J {D} within K; # optical cycles used to satisfy demand (o,d) set H within {P,P}; # pairs of conflicting paths # Constants param a {S,W}; # cost for a structure of size w param f {C,W}; # cost for a switch of size w param r {D}; # demand for (o,d) # penalty term for unsatisfied demand param B default sum{s in S} a[s,80] + sum{c in C} f[c,80] + 1; # Decision Variables var x {P} integer >= 0; # number of wavelengths assigned to path p var u {D} >= 0; # unsatisfied demand for (o,d) var y {S, W} binary; # 1 iff structure s is constructed with size w var z {C, W} binary; # 1 iff switch c is constructed with size w minimize cost: sum {s in S, w in W} a[s,w] * y[s,w] + sum {c in C, w in W} f[c,w] * z[c,w] + sum {(o,d) in D} B * u[o,d]; subject to satisfy_demand {(o,d) in D}: sum {k in J[o,d], p in Pk[k]} x[p] + u[o,d] = r[o,d]; # Size the structures subject to structure_size_1 {s in S, (i,j) in Es[s]}: sum{w in W} w * y[s,w] >= sum {p in Pes[i,j,s]} x[p]; # Size the switches subject to switch_size_1 {c in C}: sum{w in W} w * z[c,w] >= sum{p in L[c]} x[p]; # Structures must be of a single size subject to structure_size_2 {s in S}: sum {w in W} y[s,w] <= 1; # Switches must be of a single size subject to switch_size_2 {c in C}: sum {w in W} z[c,w] <= 1; subject to x_upper {(o,d) in D, p in J[o,d]}: x[p] <= r[o,d];