private ModellerControllerParameter[] GetParameters()
        {
            //def __call__(self, xtmf_ScenarioNumber, xtmf_ModeList, xtmf_MatrixNumbers, xtmf_AnalysisTypes, xtmf_ClassNames):
            var scenarioNumber = new ModellerControllerParameter("xtmf_ScenarioNumber", ScenarioNumber.ToString());
            var modeList       = new ModellerControllerParameter("xtmf_ModeList", string.Join(",", from ex in Extractions
                                                                                              select ex.Modes));
            var matrixNumber = new ModellerControllerParameter("xtmf_MatrixNumbers", string.Join(",", from ex in Extractions
                                                                                                 select("mf" + ex.MatrixNumber.ToString())));
            var analysisType = new ModellerControllerParameter("xtmf_AnalysisTypes", string.Join(",", from ex in Extractions
                                                                                                 select ex.TypeString));

            var classNames = new ModellerControllerParameter("xtmf_ClassNames", string.Join(",", from ex in Extractions
                                                                                            select ex.ClassName));

            return(new ModellerControllerParameter[] { scenarioNumber, modeList, matrixNumber, analysisType, classNames });
        }
Example #2
0
 public bool Execute(Controller controller)
 {
     Progress = 0.0f;
     if (controller is ModellerController mc)
     {
         var dir       = SetupResultDirectory();
         var parmeters = new ModellerControllerParameter[]
         {
             new ModellerControllerParameter("scenario_id", ScenarioId.ToString()),
             new ModellerControllerParameter("target_folder", dir.FullName),
             new ModellerControllerParameter("file_prefix", FilePrefix),
             new ModellerControllerParameter("export_nodes", BoolToString(ExportNodes)),
             new ModellerControllerParameter("export_links", BoolToString(ExportLinks)),
             new ModellerControllerParameter("export_turns", BoolToString(ExportTurns)),
             new ModellerControllerParameter("export_lines", BoolToString(ExportLines)),
             new ModellerControllerParameter("export_segments", BoolToString(ExportSegments)),
         };
         string ret = null;
         return(mc.Run(this, ToolName, parmeters, (p) => Progress = p, ref ret));
     }
     throw new XTMFRuntimeException(this, $"In {Name}, the EMME controller was not for modeller!");
 }