public Model(ProModelInterface model, InParamsExt inParams, OutParams previewParams, OptionParams optionParams) { this.model = model; this.inParams = inParams; this.previewParams = previewParams; this.optionParams = optionParams; }
public OutSet(InParamsExt inParams) { int ncomps = inParams.comps.Count; for (int compi = 0; compi < ncomps; compi++) { comps.Add(new OutComp(inParams.comps[compi])); } }
public TransCon(TransCon con) { Clear(); foreach (float x in con) { Add(x); } inParams = con.inParams; }
public CCDCells(CCDCells ccdCells) { int len = ccdCells.Count; this.Clear(); for (int i = 0; i < len; i++) { this.Add(new Cell(ccdCells[i].m, ccdCells[i].zone)); } inParams = ccdCells.inParams; }
public override void updatePreview(InParamsExt inParams, ViewParams viewParams, OptionParams optionParams) { if (preview == null) { preview = new PreviewModel(this, inParams, optionParams); } preview.update(inParams, null); preview.updateOut(viewParams); preview.stats.start(); updatePreviewObservers(); preview.stats.storeDrawviewTime(); }
public void update(InParamsExt inParams, OutParams previewParams) { outParams = new OutParams(); this.inParams = inParams; this.previewParams = previewParams; if (this.previewParams == null) { this.previewParams = outParams; } stats.start(); run(); stats.storeModelTime(); }
public void writeOutRaw(string fileName, ViewParams viewParams, InParamsExt inParams, OutParams outParams) { // *** obsolete; can re-use writeOut instead? TextWriter file; OutCell[][] rawOutCells; string unitsLabel = ""; string label; string addlabel; int nphases; int ncomps; int nseries; int ncells; bool dispDual = (viewParams.phaseDisplay == PhaseDisplayType.UpperLower); bool first; if (dispDual) { nphases = 2; } else { nphases = 1; } ncomps = inParams.comps.Count; if (viewParams.peaksDisplay != PeaksDisplayType.Peaks) { ncomps++; } nseries = ncomps * nphases; if (inParams.natUnits == QuantityType.Steps) { unitsLabel = "Step"; } else if (inParams.natUnits == QuantityType.Volume) { unitsLabel = "Volume"; } else if (inParams.natUnits == QuantityType.Time) { unitsLabel = "Time"; } else if (inParams.natUnits == QuantityType.ReS) { unitsLabel = "ReS"; } file = new StreamWriter(fileName); // labels first = true; for (int c = 0; c < ncomps; c++) { if (c < inParams.comps.Count) { label = inParams.comps[c].label; } else { label = "Sum"; } for (int i = 0; i < nphases; i++) { if (!first) { file.Write(","); } file.Write(unitsLabel); file.Write(","); if (nphases > 1 && (PhaseType)(i + 1) == PhaseType.Upper) { addlabel = "(UP)"; } else if (nphases > 1 && (PhaseType)(i + 1) == PhaseType.Lower) { addlabel = "(LP)"; } else { addlabel = ""; } file.Write(label + addlabel); first = false; } } file.WriteLine(); // data rawOutCells = outParams.outSet.rawOutCells; ncells = rawOutCells[0].Length; for (int i = 0; i < ncells; i++) { first = true; for (int s = 0; s < nseries; s++) { if (!first) { file.Write(","); } file.Write(string.Format(CultureInfo.InvariantCulture, "{0},{1}", rawOutCells[s][i].pos, rawOutCells[s][i].con)); first = false; } file.WriteLine(); } file.Close(); }
public CCDCells(InParamsExt inParams) { this.inParams = inParams; }
public LCCDCells(InParamsExt inparams) : base(inparams) { }
public TransCon(InParamsExt inparams) { this.inParams = inparams; }
public override void updateModel(InParamsExt inParams, ViewParams viewParams, OptionParams optionParams, ViewType viewType, bool updateModelReq, bool updateOutReq) { modelThread = new Thread(new ParameterizedThreadStart(updateModelThreadFunction)); modelThread.Start(new ModelRunParams(inParams, viewParams, optionParams, viewType, updateModelReq, updateOutReq)); }
public abstract void updateModel(InParamsExt inParams, ViewParams viewParams, OptionParams optionParams, ViewType viewType, bool updateModelReq, bool updateOutReq);
public abstract void updatePreview(InParamsExt inParams, ViewParams viewParams, OptionParams optionParams);
public TransModel(ProModelInterface model, InParamsExt inParams, OutParams previewParams, OptionParams optionParams) : base(model, inParams, previewParams, optionParams) { mincon = 0.001f; }
public PreviewModel(ProModelInterface model, InParamsExt inParams, OptionParams optionParams) : base(model, inParams, null, optionParams) { }