Esempio n. 1
0
        public void ExportBinaryMatrixModule()
        {
            /*Ensure the scenario has a valid network and at least one matrix to be exported*/
            var importNetworkModule = new Emme.Import.ImportNetworkPackage()
            {
                Name                = "Importer",
                ScenarioNumber      = Helper.CreateParameter(1, "Const Number"),
                NetworkPackageFile  = Helper.CreateParameter(Path.GetFullPath("TestFiles/test.nwp"), "NWP File Name"),
                ScenarioDescription = Helper.CreateParameter("From XTMF", "Description")
            };

            importNetworkModule.Invoke(Helper.Modeller);
            var importMatrixModule = new Emme.Import.ImportBinaryMatrix()
            {
                Name           = "Importer",
                ScenarioNumber = Helper.CreateParameter(1, "Const Number"),
                MatrixNumber   = Helper.CreateParameter(1, "Matrix Number"),
                FileLocation   = Helper.CreateParameter(Path.GetFullPath("TestFiles/Test.mtx"), "Matrix File Name"),
                Description    = Helper.CreateParameter("Module Loaded", "Description")
            };

            importMatrixModule.Invoke(Helper.Modeller);


            var module = new Emme.Export.ExportBinaryMatrix()
            {
                Name           = "Exporter",
                ScenarioNumber = Helper.CreateParameter(1, "Const Number"),
                MatrixNumber   = Helper.CreateParameter(1, "Matrix Number"),
                SaveTo         = Helper.CreateParameter("Test.mtx", "Matrix File Name")
            };

            module.Invoke(Helper.Modeller);
        }
Esempio n. 2
0
        public void ImportBinaryMatrixModule()
        {
            var importModule = new Emme.Import.ImportBinaryMatrix()
            {
                Name           = "Importer",
                ScenarioNumber = Helper.CreateParameter(1, "Const Number"),
                MatrixNumber   = Helper.CreateParameter(1, "Matrix Number"),
                FileLocation   = Helper.CreateParameter("Test.mtx", "Matrix File Name"),
                Description    = Helper.CreateParameter("Module Loaded", "Description")
            };

            importModule.Invoke(Helper.Modeller);
        }