Esempio n. 1
0
        void SetOutputFileName(ModelMetaClass toUpdate)
        {
            string output = string.Concat(this.OutputDirectory, "\\", this.FilePrefix, "_");
            string name   = toUpdate.FileName.Substring(toUpdate.FileName.LastIndexOf("\\") + 1);

            toUpdate.OutputFileName = string.Concat(output, name);
        }
 void SearchAllModels(ModelMetaClass referenceModel, Variable searchVariable)
 {
     foreach (ModelMetaClass model in this.SelectedScenario) {
         if (!model.Equals(referenceModel)) {
             SearchWithinCurrentModel(searchVariable, model);
         }
     }
 }
Esempio n. 3
0
        private void RunNextModel()
        {
            runningIndex++;
            ModelMetaClass modelToRun = this.Models[runningIndex];

            modelToRun.OnSimulationComplete += this.SimulationComplete;
            modelToRun.Write();
            modelToRun.Run();
        }
 void SearchUsingReferenceModel(ModelMetaClass referenceModel)
 {
     foreach (Variable searchVariable in referenceModel) {
         //this.Common[searchVariable.Name].Add(searchVariable);
         this.Common.Add(searchVariable.Name, new List<Variable>());
         this.Common[searchVariable.Name].Add(searchVariable);
         SearchAllModels(referenceModel, searchVariable);
         RemoveIfNoneFound(searchVariable);
     }
 }
Esempio n. 5
0
 void SearchAllModels(ModelMetaClass referenceModel, Variable searchVariable)
 {
     foreach (ModelMetaClass model in this.SelectedScenario)
     {
         if (!model.Equals(referenceModel))
         {
             SearchWithinCurrentModel(searchVariable, model);
         }
     }
 }
Esempio n. 6
0
        public override bool Equals(object obj)
        {
            ModelMetaClass other = obj as ModelMetaClass;

            if (other == null)
            {
                return(false);
            }
            return(this.fileName == other.fileName);
        }
Esempio n. 7
0
 //quit loop for current model;
 void SearchWithinCurrentModel(Variable searchVariable, ModelMetaClass model)
 {
     foreach (Variable currentVariable in model)
     {
         if (currentVariable.Equals(searchVariable))
         {
             this.Common[searchVariable.Name].Add(currentVariable);
             break;
         }
     }
 }
Esempio n. 8
0
 void SearchUsingReferenceModel(ModelMetaClass referenceModel)
 {
     foreach (Variable searchVariable in referenceModel)
     {
         //this.Common[searchVariable.Name].Add(searchVariable);
         this.Common.Add(searchVariable.Name, new List <Variable>());
         this.Common[searchVariable.Name].Add(searchVariable);
         SearchAllModels(referenceModel, searchVariable);
         RemoveIfNoneFound(searchVariable);
     }
 }
Esempio n. 9
0
 void SetOutputFileName(ModelMetaClass toUpdate)
 {
     string output = string.Concat(this.OutputDirectory, "\\", this.FilePrefix, "_");
     string name = toUpdate.FileName.Substring(toUpdate.FileName.LastIndexOf("\\") + 1);
     toUpdate.OutputFileName = string.Concat(output, name);
 }
Esempio n. 10
0
 public void RemoveModel(ModelMetaClass toRemove)
 {
     this.Models.Remove(toRemove);
 }
Esempio n. 11
0
 public void AddModel(ModelMetaClass toAdd)
 {
     this.Models.Add(toAdd);
     SetOutputFileName(toAdd);
 }
 //quit loop for current model;
 void SearchWithinCurrentModel(Variable searchVariable, ModelMetaClass model)
 {
     foreach (Variable currentVariable in model) {
         if (currentVariable.Equals(searchVariable)) {
             this.Common[searchVariable.Name].Add(currentVariable);
             break;
         }
     }
 }
Esempio n. 13
0
 public void RemoveModel(ModelMetaClass toRemove)
 {
     this.Models.Remove(toRemove);
 }
Esempio n. 14
0
 void BroadcastModelRemoved(ref int index, ModelMetaClass toRemove)
 {
     if (null != this.OnModelRemoved) {
         this.OnModelRemoved(this, new ModelSelectedEventArgs { SelectedModel = toRemove });
     }
 }
Esempio n. 15
0
 public void AddModel(ModelMetaClass toAdd)
 {
     this.Models.Add(toAdd);
     SetOutputFileName(toAdd);
 }
Esempio n. 16
0
 void BroadcastModelSelectedEvent(ModelMetaClass model)
 {
     if (null != this.OnModelSelected) {
         this.OnModelSelected(this, new ModelSelectedEventArgs { SelectedModel = model });
     }
 }
Esempio n. 17
0
        public void GetCommonVariables()
        {
            ModelMetaClass referenceModel = this.SelectedScenario[0];

            SearchUsingReferenceModel(referenceModel);
        }