public void FixedSlotConstraintTest_complexCase() { Topology t = new Topology(); t.AddDevice("O1"); t.AddDevice("D1"); t.AddDevice("I1"); t.AddDevice("I2"); t.AddConnection("C1", "I1", "D1", 40); t.AddConnection("C2", "I2", "D1", 40); t.AddConnection("C3", "D1", "O1", 80); t.AddLink("L1", "I1", "O1", 10); t.AddLink("L2", "I2", "O1", 10); t.AddFixedSlotConstraint("L1", 3, 4); t.AddFixedSlotConstraint("L2", 3, 4); t.AllocateLinksPaths(); t.AllocateSlots(); Assert.AreEqual("L1", t.GetConnection("C3").slots[6].slotOWner.name); Assert.AreEqual("L2", t.GetConnection("C3").slots[7].slotOWner.name); }
public void FixedSlotConstraintTest() { Topology t = new Topology(); t.AddDevice("D1"); t.AddDevice("D2"); t.AddDevice("D3"); t.AddConnection("C1", "D1", "D2", 20); t.AddConnection("C2", "D2", "D3", 80); t.AddLink("L1", "D1", "D3", 10); t.AddFixedSlotConstraint("L1", 3, 4); t.AllocateLinksPaths(); t.AllocateSlots(); }