Originally posted by: SystemAdmin
Dear all,
I have built a MCF problem (multi-commodity flow problem) in wireless network with OPL language in CPLEX 12.4. (see the model below).
It works well for the 9-node(or less nodes) grid network.
my problem is in those networks with more nodes (e.g., 16-node), it always output 'solution (optimal) with objective 0' as follows.
so, i don't know what is the problem with my program.
can someone check for me where the problem is.
Thank a lot!
// solution (optimal) with objective 0
// Quality There are no bound infeasibilities.
// There are no reduced-cost infeasibilities.
// Maximum Ax-b residual = 0
// Maximum c-B'pi residual = 0
// Maximum |x| = 0
// Maximum |pi| = 0
// Maximum |red-cost| = 0
// Condition number of unscaled basis = 0.0e+000
////////////////////////////////////////////////
int NumNodes = ...;
range Nodes = 1..NumNodes;
int NumScheduleSet = ...;
range ScheduleSet = 1..NumScheduleSet;
tuple link{
key int fromNode;
key int toNode;
float bandwidth;
};
{link} Links = ...;
int scheduleMatrix
ScheduleSetLinks = ...;
tuple commodity {
key int Src;
key int Dest;
};
{commodity} Flows = ...;
dvar float+ value
FlowsLinks;
dvar float+ factor
ScheduleSet in 0 .. 1;
maximize sum(f in Flows) (sum (<f.Src,i,b> in Links) value[f]
http://<f.Src,i,b>);
subject to {
forall (n in Nodes, f in Flows) {
ctFlow: // flow constraints
if (f.Src == n) {
sum (<t,n,b> in Links) value[f]
<t,n,b> == 0;
}
else if (f.Dest == n) {
sum (<n,t,b> in Links) value[f]
<n,t,b> == 0;
}
else {
sum (<n,t,b> in Links) value[f]
<n,t,b> - sum (<t,n,b> in Links) value[f]
<t,n,b> == 0;
}
}
ctFactor: // factor constraint
sum (s in ScheduleSet) factor[s] <= 1;
forall (a in Links) {
ctSchedule: // schedule constraints
sum (f in Flows) value[f][a] <=
(sum (s in ScheduleSet) (factor[s] * scheduleMatrix[s][a])) * a.bandwidth;
}
}
#DecisionOptimization#OPLusingCPLEXOptimizer