예제 #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);
         }
     }
 }
예제 #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);
     }
 }
예제 #5
0
 void SearchAllModels(ModelMetaClass referenceModel, Variable searchVariable)
 {
     foreach (ModelMetaClass model in this.SelectedScenario)
     {
         if (!model.Equals(referenceModel))
         {
             SearchWithinCurrentModel(searchVariable, model);
         }
     }
 }
예제 #6
0
        public override bool Equals(object obj)
        {
            ModelMetaClass other = obj as ModelMetaClass;

            if (other == null)
            {
                return(false);
            }
            return(this.fileName == other.fileName);
        }
예제 #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;
         }
     }
 }
예제 #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);
     }
 }
예제 #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);
 }
예제 #10
0
 public void RemoveModel(ModelMetaClass toRemove)
 {
     this.Models.Remove(toRemove);
 }
예제 #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;
         }
     }
 }
예제 #13
0
 public void RemoveModel(ModelMetaClass toRemove)
 {
     this.Models.Remove(toRemove);
 }
예제 #14
0
 void BroadcastModelRemoved(ref int index, ModelMetaClass toRemove)
 {
     if (null != this.OnModelRemoved) {
         this.OnModelRemoved(this, new ModelSelectedEventArgs { SelectedModel = toRemove });
     }
 }
예제 #15
0
 public void AddModel(ModelMetaClass toAdd)
 {
     this.Models.Add(toAdd);
     SetOutputFileName(toAdd);
 }
예제 #16
0
 void BroadcastModelSelectedEvent(ModelMetaClass model)
 {
     if (null != this.OnModelSelected) {
         this.OnModelSelected(this, new ModelSelectedEventArgs { SelectedModel = model });
     }
 }
예제 #17
0
        public void GetCommonVariables()
        {
            ModelMetaClass referenceModel = this.SelectedScenario[0];

            SearchUsingReferenceModel(referenceModel);
        }