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); } } }
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); } }
public override bool Equals(object obj) { ModelMetaClass other = obj as ModelMetaClass; if (other == null) { return(false); } return(this.fileName == other.fileName); }
//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; } } }
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); } }
public void RemoveModel(ModelMetaClass toRemove) { this.Models.Remove(toRemove); }
public void AddModel(ModelMetaClass toAdd) { this.Models.Add(toAdd); SetOutputFileName(toAdd); }
void BroadcastModelRemoved(ref int index, ModelMetaClass toRemove) { if (null != this.OnModelRemoved) { this.OnModelRemoved(this, new ModelSelectedEventArgs { SelectedModel = toRemove }); } }
void BroadcastModelSelectedEvent(ModelMetaClass model) { if (null != this.OnModelSelected) { this.OnModelSelected(this, new ModelSelectedEventArgs { SelectedModel = model }); } }
public void GetCommonVariables() { ModelMetaClass referenceModel = this.SelectedScenario[0]; SearchUsingReferenceModel(referenceModel); }