Esempio n. 1
0
        public override void ConnectToParamics()
        {
            //Find out the number of agents and junctions
            int AgentNum    = NetworkStruct.GetElementsByTagName("Agent").Count;
            int JunctionNum = NetworkStruct.GetElementsByTagName("Junction").Count;

            //NetDat = new NetworkDataSIT(ParamicsPath, IP, Port, AgentNum, JunctionNum, "Vehicledatasimple", "SITtrue");
            NetDat  = new NetworkDataSIT(ParamicsPath, IP, Port, AgentNum, JunctionNum, "LinkTurningMovements", "SITtrue");
            NetDat2 = new NetworkDataSIT(ParamicsPath, IP, Port, AgentNum, JunctionNum, "VehicledataWobbly", "SITwobbly");
            NetDat.PDB.ClearTableContents();
            NetDat2.PDB.ClearTableContents();
            NetDat2.LTB.ClearTableContents();

            MainZone   = new ZoneAgent(NetDat, Strat);
            WobblyZone = new ZoneAgent(NetDat2, Strat);
            FindAgents(NetDat, ref MainZone);
            FindAgents(NetDat2, ref WobblyZone);

            SitB = new SITbridge(NetDat2);
            FindSITAgents(NetDat2, ref SitB);
            SitB.AreaMash();
            FindSensors(NetDat2, ref SitB);//TODO it is important that this is called after AreaMash() should probably put in acheck for this....

            List <string> NodeNames = new List <string>();

            foreach (JunctionAgent JA in MainZone.Junctions)
            {
                NodeNames.Add(JA.SignalNode);
            }

            SigSet = new SignalsSet(NetDat, NodeNames);
        }
Esempio n. 2
0
        public virtual void ConnectToParamics()
        {
            //Find out the number of agents and junctions
            int AgentNum    = NetworkStruct.GetElementsByTagName("Agent").Count * 3; //AH added times 3 to include all 12 phase bids
            int JunctionNum = NetworkStruct.GetElementsByTagName("Junction").Count;

            NetDat = new NetworkData(ParamicsPath, IP, Port, AgentNum, JunctionNum);
            NetDat.PDB.ClearTableContents();

            MainZone = new ZoneAgent(NetDat, Strat);

            FindAgents(NetDat, ref MainZone);


            List <string> NodeNames = new List <string>();

            foreach (JunctionAgent JA in MainZone.Junctions)
            {
                NodeNames.Add(JA.SignalNode);
            }

            SigSet = new SignalsSet(NetDat, NodeNames);
        }