Пример #1
0
        public void SlotAllocationWithMultiplexing_ComplexCase()
        {
            Topology t = new Topology();

            t.AddDevice("O1");
            t.AddDevice("O2");
            t.AddDevice("O3");
            t.AddDevice("O4");
            t.AddDevice("D1");
            t.AddDevice("I1");

            t.AddConnection("C1", "D1", "O1", 10);
            t.AddConnection("C2", "D1", "O2", 40);
            t.AddConnection("C3", "D1", "O3", 20);
            t.AddConnection("C4", "D1", "O4", 10);
            t.AddConnection("C5", "I1", "D1", 80);

            t.AddLink("L1", "I1", "O1", 10);

            t.AddLink("L2", "I1", "O2", 20);
            t.AddLink("L3", "I1", "O2", 10);
            t.AddLink("L4", "I1", "O2", 10);

            t.AddLink("L5", "I1", "O3", 5);
            t.AddLink("L6", "I1", "O3", 5);
            t.AddLink("L7", "I1", "O3", 10);

            t.AddLink("L8", "I1", "O4", 5);
            t.AddLink("L9", "I1", "O4", 5);

            t.AllocateLinksPaths();
            t.AllocateSlots();
        }
Пример #2
0
        public void FindSlotsForPathWith2Destinations()
        {
            Topology t = new Topology();

            t.AddDevice("D1");
            t.AddDevice("D2");
            t.AddDevice("D3");

            t.AddConnection("C1", "D1", "D2", 10);
            t.AddConnection("C2", "D1", "D3", 10);

            List <string> sources = new List <string>()
            {
                "D1"
            };
            List <string> destinations = new List <string>()
            {
                "D2", "D3"
            };

            t.AddLink("L1", sources, destinations, 10);

            t.AllocateLinksPaths();
            t.AllocateSlots();
        }
Пример #3
0
        public void L111_5_10_20Mhz_Configuration()
        {
            Topology t = SyslogParser.CreateTopology("../../../../Configurations/L111_5_10_20Mhz.log");

            t.AllocateLinksPaths();
            t.AllocateSlots();
        }
Пример #4
0
        public void L222_4TX_4RX_20MHz_FSMF_2FBBA_3FZNI_Configuration()
        {
            Topology t = SyslogParser.CreateTopology("../../../../Configurations/L222_4TX_4RX_20MHz_FSMF_2FBBA_3FZNI_Configuration.log");

            t.AllocateLinksPaths();
            t.AllocateSlots();
        }
Пример #5
0
        public void T3_20MHz_8TXRX_FSIH_FZHJ_Configuration()
        {
            Topology t = SyslogParser.CreateTopology("../../../../Configurations/T3_20MHz_8TXRX_FSIH_FZHJ_Configuration.log");

            t.AllocateLinksPaths();
            t.AllocateSlots();
        }
Пример #6
0
        public void L111_A_5MHz_FSME_FXEA_Configuration()
        {
            Topology t = SyslogParser.CreateTopology("../../../../Configurations/L111_A_5MHz_FSME_FXEA_Configuration.log");

            t.AllocateLinksPaths();
            t.AllocateSlots();
        }
Пример #7
0
        public void L111_5_10_20Mhz_Configuration_WithRoutings()
        {
            Topology t = SyslogParser.CreateTopology("../../../../Configurations/L111_5_10_20Mhz.log");

            t.AllocateLinksPaths();
            t.AllocateSlots();

            RoutingTable rt = t.CalculateRoutingTableForDevice("/MRBTS-1/RAT-1/EQM_L-1/SMOD_L-1/CCU_L-1/BBSWITCH_L-1");
        }
Пример #8
0
        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();
        }
Пример #9
0
        public void SlotAllocationWithMultiplexing()
        {
            Topology t = new Topology();

            t.AddDevice("D1");
            t.AddDevice("D2");
            t.AddDevice("D3");
            t.AddDevice("D4");

            t.AddConnection("C1", "D1", "D2", 20);
            t.AddConnection("C2", "D2", "D3", 10);
            t.AddConnection("C3", "D2", "D4", 10);

            t.AddLink("L1", "D1", "D3", 10);
            t.AddLink("L2", "D1", "D4", 10);

            t.AllocateLinksPaths();
            t.AllocateSlots();
        }
Пример #10
0
        public void PathAllocationNeedsSorting()
        {
            Topology t = new Topology();

            t.AddDevice("D1");
            t.AddDevice("D2");
            t.AddDevice("D3");

            t.AddConnection("C1", "D1", "D2", 20);
            t.AddConnection("C2", "D1", "D3", 10);
            t.AddConnection("C3", "D3", "D2", 10);

            t.AddLink("L1", "D1", "D2", 10);
            t.AddLink("L2", "D1", "D2", 20);

            t.AllocateLinksPaths();
            t.AllocateSlots();

            //ASSERIONS NOT NEEDED - NO EXCEPTION SHOULD BE ENOUGH!
        }
Пример #11
0
        public void SimpleSlotFind()
        {
            Topology t = new Topology();

            t.AddDevice("D1");
            t.AddDevice("D2");

            t.AddConnection("C1", "D1", "D2", 10);

            t.AddLink("L1", "D1", "D2", 10);

            t.AllocateLinksPaths();
            t.AllocateSlots();

            Assert.AreEqual(1, t.GetLink("L1").mainPath.Count);
            Assert.AreEqual(t.GetDevice("D1"), t.GetLink("L1").mainPath[0].source);
            Assert.AreEqual(t.GetDevice("D2"), t.GetLink("L1").mainPath[0].destination);
            Assert.AreEqual(1, t.GetConnection("C1").slots.Count);
            Assert.AreEqual(t.GetLink("L1"), t.GetConnection("C1").slots[0].slotOWner);
        }
Пример #12
0
        public void SlotAllocationWithDemultiplexing_EvenMoreComplexCase()
        {
            Topology t = new Topology();

            t.AddDevice("D1");
            t.AddDevice("D2");
            t.AddDevice("D3");
            t.AddDevice("D4");

            t.AddConnection("C1", "D1", "D3", 40);
            t.AddConnection("C2", "D2", "D3", 10);
            t.AddConnection("C3", "D3", "D4", 80);

            t.AddLink("L1", "D1", "D4", 10);
            t.AddLink("L2", "D1", "D4", 20);
            t.AddLink("L3", "D1", "D4", 10);
            t.AddLink("L4", "D2", "D4", 10);

            t.AllocateLinksPaths();
            t.AllocateSlots();
        }
Пример #13
0
        public void SimpleRoutingCalculation()
        {
            Topology t = new Topology();

            t.AddDevice("D/I");
            t.AddDevice("P/O");
            t.AddDevice("RT/I");
            t.AddDevice("RT/O");

            t.AddConnection("C1", "D/I", "RT/I", 20);
            t.AddConnection("C2", "RT/I", "RT/O", 80);
            t.AddConnection("C3", "RT/O", "P/O", 40);

            t.AddLink("L1", "D/I", "P/O", 10);
            t.AddLink("L2", "D/I", "P/O", 10);

            t.AllocateLinksPaths();
            t.AllocateSlots();

            RoutingTable rt = t.CalculateRoutingTableForDevice("RT");

            Assert.AreEqual(2, rt.routingEntities.Count);
        }