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

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

            SearchUsingReferenceModel(referenceModel);
        }