final DoubleMatrix2D Aout_ne = getMatrixNodeLinkOutgoingIncidence(layer); final DoubleMatrix2D Ain_ne = getMatrixNodeLinkIncomingIncidence(layer);
if ((f_de.getMinLocation()[0] < -1e-3) || (f_de.getMaxLocation()[0] > 1 + 1e-3)) throw new Net2PlanException("Splitting ratios must be greater or equal than zero and lower or equal than one"); final DoubleMatrix2D Aout_ne = netPlan.getMatrixNodeLinkOutgoingIncidence(layer); final DoubleMatrix2D A_dn = f_de.zMult(Aout_ne, null, 1, 0, false, true); // traffic of demand d that leaves node n if (A_dn.size() > 0) if (A_dn.getMaxLocation()[0] > 1 + Configuration.precisionFactor)
String solverName = Configuration.getDefaultIlpSolverName(); String solverLibraryName = Configuration.getDefaultSolverLibraryName(solverName); DoubleMatrix2D Aout_ne = netPlan.getMatrixNodeLinkOutgoingIncidence(); DoubleMatrix2D Ain_ne = netPlan.getMatrixNodeLinkIncomingIncidence(); for (MulticastDemand demand : netPlan.getMulticastDemands())
this.Aout_ne = netPlan.getMatrixNodeLinkOutgoingIncidence(); this.Ain_ne = netPlan.getMatrixNodeLinkIncomingIncidence(); this.Abid_dd = DoubleFactory2D.sparse.make(D,D); for (Entry<Demand,Demand> entry : opposite_d.entrySet()) { Abid_dd.set(entry.getKey().getIndex (), entry.getValue().getIndex (), 1.0); Abid_dd.set(entry.getValue().getIndex (), entry.getKey().getIndex (), 1.0); }
DoubleMatrix2D outFR_dn = new_fde.zMult(currentNetPlan.getMatrixNodeLinkOutgoingIncidence().viewDice(), null); for (int n = 0; n < N; n++) for (int d = 0; d < D; d++)
for (Node n : destinationNodes) targetIndexes[counter++] = n.getIndex(); if (Aout_ne == null) Aout_ne = np.getMatrixNodeLinkOutgoingIncidence(layer); if (Ain_ne == null) Ain_ne = np.getMatrixNodeLinkIncomingIncidence(layer); List<DoubleMatrix1D> previousTrees = new ArrayList<DoubleMatrix1D>();
op.setInputParameter("Aout_ne" , netPlan.getMatrixNodeLinkOutgoingIncidence()); op.setInputParameter("Ain_ne" , netPlan.getMatrixNodeLinkIncomingIncidence()); op.addConstraint("Aout_ne * z_e' == 1"); /* number of out links of a node is one */ op.setInputParameter("Aout_ne" , netPlan.getMatrixNodeLinkOutgoingIncidence()); op.setInputParameter("Ain_ne" , netPlan.getMatrixNodeLinkIncomingIncidence()); op.setInputParameter("Abid_ee", Abid_ee);
for (Node n : destinationNodes) targetIndexes[counter++] = n.getIndex(); if (Aout_ne == null) Aout_ne = np.getMatrixNodeLinkOutgoingIncidence(layer); if (Ain_ne == null) Ain_ne = np.getMatrixNodeLinkIncomingIncidence(layer); if (linkCost == null) linkCost = DoubleFactory1D.dense.make(E , 1.0);
op.addDecisionVariable("q_n", false , new int[] { 1 , N }, minLinkPersistenceProb.getDouble() , maxNodePersistenceProb.getDouble()); op.setInputParameter("Aout_ne", netPlan.getMatrixNodeLinkOutgoingIncidence()); op.setInputParameter("interf_en", nodeInterferesToLink_ne.viewDice()); op.setInputParameter("b", 1-alphaFairnessFactor.getDouble());
op.setInputParameter("Ain_nd", Ain_nd); /* -1 if node n is egress in multicast demand d */ op.setInputParameter("A_ne", netPlan.getMatrixNodeLinkIncidence()); /* 1 in position (n,e) if link e starts in n, -1 if it ends in n, 0 otherwise */ op.setInputParameter("Aout_ne", netPlan.getMatrixNodeLinkOutgoingIncidence()); /* 1 in position (n,e) if link e starts in n */ op.setInputParameter("Ain_ne", netPlan.getMatrixNodeLinkIncomingIncidence()); /* 1 in position (n,e) if link e ends in n */ op.setInputParameter("h_d", netPlan.getVectorMulticastDemandOfferedTraffic(), "row"); /* for each multicast demand, its offered traffic */
for (int n = 0 ; n < N ; n ++) maxNumOutLinksCarryingTraffic_nt.set(n, n, 0); op.setInputParameter("U", netPlan.getVectorLinkCapacity().getMaxLocation() [0]); op.setInputParameter("Aout_ne", netPlan.getMatrixNodeLinkOutgoingIncidence()); op.setInputParameter("outMax_nt", maxNumOutLinksCarryingTraffic_nt); op.addConstraint("x_te <= U * f_te"); /* f_te takes value 1 for non zero x_te */