Ejemplo n.º 1
0
        //Class Constructor
        public TestMethod01()
        {
            ParamicsDBi PDB = new ParamicsDBi(Database, Machine, UserName, Password); //Create an object to link to the paramics database

            PDB.ClearTableContents();                                                 //empty any old tables in the database
            EditNodes EN = new EditNodes(NetworkPath);                                //Read in the data on the nodes in the network
            EditZones EZ = new EditZones(NetworkPath);                                //Read in the data on the Zones in the network
            //EditPaths EP = new EditPaths(NetworkPath);

            RunParamicsNetwork Runner = new RunParamicsNetwork(NetworkPath); //Define class to open and run the paramics simulation remotely

            Runner.RunNetwork();                                             //Run the paramics simulation
            ReadEventsFile   REF = new ReadEventsFile(NetworkPath);          //Read simulation output
            ReadSnapshotFile RSN = new ReadSnapshotFile(NetworkPath);

            CollateVehicelData CVD = new CollateVehicelData(REF, RSN, EZ, EN, PDB);

            CVD.AddStep(0, 0);                              //collate the output data and write it to the database

            EditNetwork ENW = new EditNetwork(NetworkPath); // define a class for editing the network

            for (int i = 1; i < 4; i++)
            {
                ENW.SelectSnap();                      //change the network snapshot file so that it represents the final state of the previous run
                Runner.RunNetworkSnap();               //run the network from the new snapshot

                REF = new ReadEventsFile(NetworkPath); //read the simulation outputs
                RSN = new ReadSnapshotFile(NetworkPath);

                CVD.UpdateFiles(REF, RSN, EZ, EN, PDB);
                CVD.AddStep(0, 0);//collate the output data and write it to the database
            }
        }
Ejemplo n.º 2
0
 public LiteToPDB(ReadSnapshotFileLite f1, EditNodes f2, EditLink f3, ParamicsDBiLite f4)
 {
     IDno = 0;
     RSF  = f1;
     EN   = f2;
     EL   = f3;
     PDB  = f4;
 }
Ejemplo n.º 3
0
 public void UpdateFiles(ReadEventsFile f1, ReadSnapshotFile f3, EditZones f4, EditNodes f5, ParamicsDBi f6)
 {
     REF         = f1;
     RSF         = f3;
     EZ          = f4;
     EN          = f5;
     PDB         = f6;
     RouteMethod = "OD";
 }
Ejemplo n.º 4
0
 public CollateVehicelData(ReadEventsFile f1, ReadSnapshotFile f3, EditZones f4, EditNodes f5, ParamicsDBi f6)
 {
     IDno        = 0;
     REF         = f1;
     RSF         = f3;
     EZ          = f4;
     EN          = f5;
     PDB         = f6;
     RouteMethod = "OD";
 }
Ejemplo n.º 5
0
        //*Function To parse data from the GIS database to the paramics model
        public void ParseNetwork()
        {
            //Get nodes data and write Nodes file
            ReadNodesFromGISdb();
            SuperProcessLinksData();
            //ReadLinksFromGISdb();

            EditNodes NodesFileEditor = new EditNodes(NetworkPath, NodesList);

            NodesFileEditor.WriteNodeFile(BoundingBox);

            //Get Links data and write Links file
            //ReadLinksFromGISdb();

            EditLink LinksFileEditor = new EditLink(NetworkPath, LinksList);

            LinksFileEditor.WriteLinksFile();
        }