I have a set of Nodes and Edges that create a network. Each Edge has its own set of available wavelengths, called Lambdas (for sake of example, let's say it is 4), then each lambda can carry up to 10 Gbit/s (units are not that important here). In network are fulfilled demands between certain Nodes that have certain volume and have predefined paths able to route the traffic.
# SETS AND PARAMETERS
# Nodes
# Consist of: a number to identify a node
param maxNode, >= 0, integer;
set Nodes=1..maxNode;
# Edges
# Consist of: nodeA and nodeB - nodes at each end of given link, and lambdas - maximum number of available wavelengths in fibre
set Edges;
param nodeA { Edges }, in Nodes;
param nodeZ { Edges }, in Nodes;
set Lambdas { Edges};
#param lambdas { Edges }, >= 0, default 1000;
# Demands
# Consist of: demand_volume - how much traffic we need to allocate, and demand_maxPath - how many paths are available to fulfill demand
set Demands;
param demand_volume { Demands }, >= 0, default 0;
param demand_maxPath { Demands }, >= 0, default 0;
# Demand_pathLinks
set Demand_pathLinks { d in Demands, dp in 1..demand_maxPath[d] } within Edges;
# VARIABLES
# x_ldp definition, cannot be higher than demand_value, cannot be lower than 0
var x_ldp {l in Lambdas[******], d in Demands, p in 1..demand_maxPath[d]} >= 0, <= demand_volume[d];
# delta_edp definition, if given link e is used in path p of demand d, then 1, else 0
var delta_edp {e in Edges, d in Demands, p in 1..demand_maxPath[d]}, binary;
# CONSTRAINTS
subject to demand_satisfaction_constraint { e in Edges, d in Demands }:
sum {l in Lambdas[e], p in 1..demand_maxPath[d]} x_ldp[l, d, p ] = demand_volume[ d ];
subject to lambda_capacity_constraind {e in Edges, l in Lambdas[e] }:
sum {d in Demands, p in 1..demand_maxPath[d]} delta_edp[e,d,p]*x_ldp[l,d,p] <= 10;
The red is part of the declaration of variable that is responsible for traffic. Basically, this variable, x_ldp, by definition in Link-path optimization method, is the amount of volume of demand d, on path p of predefined set of available paths for given demand on given wavelength (l in lambdas). But - when trying to do that, I come stand-off:
when I try to do:
l in Lambdas[e in Demand_pathLinks[d,p], d in Demands, p in 1..demand_maxPath[d],
But then I got the error "e is not defined";
OR:
l in Lambdas, d in Demands, p in 1..demand_maxPath[d]
But then, I got the error, that Lambdas needs to be subscripted.
I really do will appreciate any help