public experimentTemplate MakeTemplate([Description("Name of the experiment to process")] experimentSetup experiment, [Description("Starting value for Stx")] Int32 start = 3, [Description("Ending value for Sts")] Int32 end = 8, [Description("3 or 4 letter code indicating how the settings are different then in other experiments")] String name = "", [Description("Comment line for experiment header")] String comment = "", experimentTemplateOption option = experimentTemplateOption.STX) { experimentTemplate output = new experimentTemplate(); output.DeriveBlueprint(experiment, name); output.comment = comment; semanticFVExtractor model = experiment.models.First() as semanticFVExtractor; experiment.RemoveAllModelsExcept(); String currentValue = ""; String xmlElementName = ""; switch (option) { case experimentTemplateOption.LPF: currentValue = model.settings.semanticCloudFilter.lowPassFilter.ToString(); xmlElementName = "lowPassFilter"; break; case experimentTemplateOption.none: break; case experimentTemplateOption.REPEAT: break; case experimentTemplateOption.STX: currentValue = model.settings.caseTermExpansionSteps.ToString(); xmlElementName = "caseTermExpansionSteps"; break; case experimentTemplateOption.TC: break; } for (int i = start; i < end; i++) { var exp = new experimentTemplateVariable(); exp.needle = "<" + xmlElementName + ">" + currentValue + "</" + xmlElementName + ">"; exp.replace = "<" + xmlElementName + ">" + i + "</" + xmlElementName + ">"; exp.i = i; output.replacements.Add(exp); } return(output); }
public void DeriveBlueprint(experimentTemplate _blueprint, String _name) { DeployBlueprint(_blueprint.blueprint); DerivedFromName = blueprint.name; DerivedFromType = derivedFromType.fromAnExperimentTemplate; UpdateDescription(); if (_name.isNullOrEmpty()) { _name = blueprint.name.getCleanFilepath() + "_child"; } }