コード例 #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
            }
        }
コード例 #2
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";
 }
コード例 #3
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";
 }