DX ROM Builder
DX ROM Builder
This container holds data for the Rom Builder.
Methods
GetModel
Get the DataReference of the Model. An exception is thrown if the entity is not found.
-
Return
The DataReference of the Model. - Type DataReference
- Example
The following example shows how the user can get a Model to change one of its properties.
system1 = GetSystem(Name="RSO") designofExperiment1 = system1.GetContainer(ComponentName="Design of Experiment") dOEModel1 = designofExperiment1.GetModel() dOEModel1.DOEType = "eDOETYPE_OSFD"
Data Entities
OutputParameter
Output parameter entity for DesignXplorer.
Properties
DisplayText
The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.
- Type string
- Read Only No
EnableAutoRefinement
Determines whether the Auto Refinement is applicable to the output parameter.
- Type bool
- Read Only No
IgnoreForFiltering
Determines whether the parameter filtering is not applicable to the output parameter in the correlation context.
- Type bool
- Read Only No
InheritFromModelSettings
Determines whether the Maximum Predicted Relative Error defined at the Model level is applicable to the output parameter.
- Type bool
- Read Only No
LowerBound
Minimum value extracted from existing design points and/or sample sets.
- Type double
- Read Only Yes
MaximumPredictedError
Maximum Predicted Error for an output parameter with the GARS algorithm. This is the maximum predicted error for the selected output parameter.
- Type double
- Read Only Yes
MaxPredictedRelativeError
Maximum Relative Error targeted for an output parameter when refining with the Kriging algorithm. This is the maximum predicted relative error that is acceptable for the selected output parameter.
- Type double
- Read Only No
PredictedRelativeError
Current value of the Predicted Relative Error when refining with the Kriging algorithm
- Type double
- Read Only Yes
Tolerance
Maximum Error targeted for an output parameter when refining with the GARS algorithm. This is the maximum predicted error that is acceptable for the selected output parameter.
- Type double
- Read Only No
UpperBound
Maximum value extracted from existing design points and/or sample sets.
- Type double
- Read Only Yes
Methods
CreateOptimizationCriterion
Creates an OptimizationCriterion entity associated to a parameter.
-
Return
The DataReference of the OptimizationCriterion. - Type DataReference
Required Arguments
- Parameter The parameter on which the criterion is created.
- Type DataReference
- Example
The following example shows how to create an OptimizationCriterion entity.
container = system1.GetContainer(ComponentName="Optimization") model = container.GetModel() parameter1 = model.GetParameter(Name="P1") optimizationCriterion = parameter1.CreateOptimizationCriterion()
GetOptimizationCriterion
Get the DataReference of the OptimizationCriterion associated with a Parameter. An exception is thrown if the entity is not found.
-
Return
The DataReference of the OptimizationCriterion. - Type DataReference
Required Arguments
- Parameter Parent Parameter.
- Type DataReference
- Example
The following example shows how the user can get a OptimizationCriterion to change one of its properties.
system1 = GetSystem(Name="RSO") optimization1 = system1.GetContainer(ComponentName="Optimization") optimizationModel1 = optimization1.GetModel() parameter3 = optimizationModel1.GetParameter(Name="P3") optimizationCriterion = parameter3.GetOptimizationCriterion() optimizationCriterion.ObjectiveType = "eGT_MinimumPossible"
GetParameterStatistics
Get the DataReference of the ParameterStatistics entity associated with a Parameter.
-
Return
The DataReference of the ParameterStatistics entity. - Type DataReference
- Example
The following example shows how the user can get a ParameterStatistics entity and examine its Mean property.
system1 = GetSystem(Name="SSA") sixSigmaAnalysis1 = system1.GetContainer(ComponentName="Six Sigma Analysis") sixSigmaModel1 = sixSigmaAnalysis1.GetModel() parameter4 = sixSigmaModel1.GetParameter(Name="P4") parameterStatistics1 = parameter4.GetParameterStatistics() mean = parameterStatistics1.Mean
RomBuilder
Entity that performs and manages the DesignXplorer RomBuilder component
Properties
DisplayText
The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.
- Type string
- Read Only No
ExportDesignPoints
If True and PreserveDesignPoints is True as well, export project for each preserved Design Point.
- Type bool
- Read Only No
NumberOfRetries
Indicates the number of times DX will try to update the failed design points.
- Type int
- Read Only No
PreserveDesignPoints
If True, preserve the Design Points at the project level after the component Update.
- Type bool
- Read Only No
RetainDesignPoints
If True and PreserveDesignPoints is True as well, retain data for each preserved Design Point.
- Type bool
- Read Only No
RetryDelay
Indicates how much time will elapse between tries. This option is only applicable when NumberOfRetries is greater than 0, otherwise it has no effect.
- Type Quantity
- Read Only No
Methods
CreateChart
Creates a Chart entity. The chart must be updated once after its creation by invoking its Update method. Then changes to its properties will update the chart automatically.
-
Return
The DataReference of the Chart. - Type DataReference
Required Arguments
- ChartType Type of chart to be created. The possible values depend on the type of Model. For instance, a ResponseSurface model accepts Spider, LocalSensitivity and Response chart while a CorrelationModel accepts CorrelationMatrix, DeterminationMatrix and CorrelationScatter charts.
- Type ChartType
Optional Arguments
- DisplayText Displayed name of the chart. If not specified, a default name is applied, depending on the value of ChartType.
- Type string
- Example
The following example shows how to create a chart.
container = system1.GetContainer(ComponentName="Optimization") model = container.GetModel() TradeoffChart = model.CreateChart(ChartType="eChartTradeoff") TradeoffChart.Update()
CreateGoodnessOfFit
Creates a GoodnessOfFit. The ParameterValues dictionary can be used to specify a value for some or all of the discrete input parameters.
-
Return
The created entity. - Type DataReference
Optional Arguments
- DisplayText DisplayText of the created entity. If not specified, a default name of the form "Goodness Of Fit [#]" is used.
- Type string
- ForceUpdate Update the created entity if true.
- Type bool
- Default Value True
- ParameterValues The values for each discrete input parameter. If not specified, each parameter is initialized to the current level.
- Type Dictionary<DataReference, string>
- Example
The following example shows how to create a GoodnessOfFit from an existing ResponseSurface model. The code retrieves the parameters P1 and P2 and then creates the response point by assigning a value to each of these parameters.
container = system1.GetContainer(ComponentName="Response Surface") model = container.GetModel() inputParameter1 = model.GetParameter(Name="P1") inputParameter2 = model.GetParameter(Name="P2") goodnessOfFit = model.CreateGoodnessOfFit( DisplayText="GOF1", ParameterValues={inputParameter1: "2", inputParameter2: "15"})
CreateRomErrorSnapshot
Create a Rom Snapshot file containing the prediction errors generated by a ROM Model for a row of a ParametricTable.
Required Arguments
- ParametricTable ParametricTable.
- Type DataReference
- RowIndex Zero-based row index of the cell.
- Type int
- SnapshotPath Destination of the ROM snapshot file.
- Type string
- Example
The following example shows how to create a Rom Snapshot containing the prediction errors generated by a ROM Model for a verification point and for a design of experiments point.
system1 = GetSystem(Name="RBU") romBuilder1 = system1.GetContainer(ComponentName="Rom Builder") romBuilderModel1 = romBuilder1.GetModel() parametricTable1 = romBuilderModel1.GetParametricTable(Name="VerificationPoints") romBuilderModel1.CreateRomErrorSnapshot(ParametricTable=parametricTable1,RowIndex=6,SnapshotPath="C:/Temp/romerror_VP6.romsnp") designofExperiment1 = system1.GetContainer(ComponentName="Design of Experiment") dOEModel1 = designofExperiment1.GetModel() parametricTable2 = dOEModel1.GetParametricTable(Name="DesignPoints") romBuilderModel1.CreateRomErrorSnapshot(ParametricTable=parametricTable2,RowIndex=9,SnapshotPath="C:/Temp/romerror_DP9.romsnp")
CreateRomPredictionSnapshot
Create a Rom Snapshot file containing the values predicted by a ROM Model for a row of a ParametricTable.
Required Arguments
- ParametricTable ParametricTable.
- Type DataReference
- RowIndex Zero-based row index of the cell.
- Type int
- SnapshotPath Destination of the ROM snapshot file.
- Type string
- Example
The following example shows how to create a Rom Snapshot containing the predicted values based on ROM Model for a verification point and for a design of experiments point.
system1 = GetSystem(Name="RBU") romBuilder1 = system1.GetContainer(ComponentName="Rom Builder") romBuilderModel1 = romBuilder1.GetModel() parametricTable1 = romBuilderModel1.GetParametricTable(Name="VerificationPoints") romBuilderModel1.CreateRomPredictionSnapshot(ParametricTable=parametricTable1,RowIndex=6,SnapshotPath="C:/Temp/romprediction_VP6.romsnp") designofExperiment1 = system1.GetContainer(ComponentName="Design of Experiment") dOEModel1 = designofExperiment1.GetModel() parametricTable2 = dOEModel1.GetParametricTable(Name="DesignPoints") romBuilderModel1.CreateRomPredictionSnapshot(ParametricTable=parametricTable2,RowIndex=9,SnapshotPath="C:/Temp/romprediction_DP9.romsnp")
DeleteGoodnessOfFit
Deletes a list of GoodnessOfFit entities and all the depending Chart entities.
Required Arguments
- GoodnessOfFit DataReferences of the entities to delete
- Type List<DataReference>
- Example
The following example shows how to delete existing GoodnessOfFit.
container = system1.GetContainer(ComponentName="Response Surface") model = container.GetModel() gof1 = model.GetGoodnessOfFit(Name="GOF 1") gof5 = model.GetGoodnessOfFit(Name="GOF 5") gof6 = model.GetGoodnessOfFit(Name="GOF 6") model.DeleteGoodnessOfFit(GoodnessOfFit=[gof1, gof5, gof6])
DuplicateGoodnessOfFit
Duplicates a GoodnessOfFit.
-
Return
The created entity. - Type DataReference
Required Arguments
- GoodnessOfFit DataReference of the GoodnessOfFit.
- Type DataReference
Optional Arguments
- DisplayText DisplayText of the created entity. If not specified, a default name of the form "Goodness Of Fit [#]" is used.
- Type string
- ForceUpdate Update the created entity if true.
- Type bool
- Default Value True
- TargetModel The ResponseSurface model on which the goodness of fit is created. If this parameter is not set, the model of the source goodness of fit is used.
- Type DataReference
- Example
The following example shows how to duplicate a GoodnessOfFit from an existing ResponseSurface model. The code retrieves the parameters P1 and P2 and then creates the response point by assigning a value to each of these parameters.
container = system1.GetContainer(ComponentName="Response Surface") responseSurfaceModel1 = container.GetModel() gof = responseSurfaceModel1.GetGoodnessOfFit(Name="GoodnessOfFit") goodnessOfFit2 = model.DuplicateGoodnessOfFit(GoodnessOfFit=gof, DisplayText="GOF2") goodnessOfFit2.Update()
ExportFmu2
Export a ROM in a .fmu file. The file can then be opened in any FMU consuming application. Applications such as TwinBuilder can also provide visualization of the ROM.
Required Arguments
- FilePath Destination of the ROM archive file.
- Type string
ExportRomArchive
Export a ROM in a .romz archive. The file can then be opened in a ROM consuming application such as ROM Viewer.
Required Arguments
- FilePath Destination of the ROM archive file.
- Type string
GetChart
Query to return the chart reference for a given model and chart name.
-
Return
The DataReference of the chart. - Type DataReference
Required Arguments
- Name Name of the chart.
- Type string
GetDesignPointReportSetting
Get the DataReference of a DesignPointReportSetting entity associated with a Model. An exception is thrown if the entity is not found.
-
Return
The DataReference of the DesignPointReportSetting. - Type DataReference
- Example
The following example shows how the user can get a DesignPointReportSetting to change one of its properties.
system1 = GetSystem(Name="GDO") designofExperiment1 = system1.GetContainer(ComponentName="Design of Experiment") dOEModel1 = designofExperiment1.GetModel() designPointReportSettingEntity1 = dOEModel1.GetDesignPointReportSetting() designPointReportSettingEntity1.DesignPointReportImage = "FFF-Results:Figure001.png"
GetGoodnessOfFit
Get the DataReference of a GoodnessOfFit entity associated with a Model. An exception is thrown if the entity is not found.
-
Return
The DataReference of the GoodnessOfFit. - Type DataReference
Required Arguments
- Name Name of the GoodnessOfFit.
- Type string
- Example
The following example shows how the user can get a GoodnessOfFit.
system1 = GetSystem(Name="RSO") responseSurface1 = system1.GetContainer(ComponentName="Response Surface") responseSurfaceModel1 = responseSurface1.GetModel() gof = responseSurfaceModel1.GetGoodnessOfFit(Name="GoodnessOfFit")
GetGoodnessOfFits
Get the DataReferences of the GoodnessOfFit entities associated with a Model.
-
Return
The DataReferences of the GoodnessOfFits. - Type DataReferenceSet
- Example
The following example shows how to retrieve the GoodnessOfFit entities of a response surface model.
system1 = GetSystem(Name="RSO") responseSurface1 = system1.GetContainer(ComponentName="Response Surface") responseSurfaceModel1 = responseSurface1.GetModel() gof = responseSurfaceModel1.GetGoodnessOfFits()
GetParameter
Get the DataReference of a Parameter. An exception is thrown if the entity is not found.
-
Return
The DataReference of the Parameter. - Type DataReference
Required Arguments
- Name Name of the Parameter.
- Type string
- Example
The following example shows how the user can get a parameter of a model to change one of its properties.
system1 = GetSystem(Name="RSO") designofExperiment1 = system1.GetContainer(ComponentName="Design of Experiment") dOEModel1 = designofExperiment1.GetModel() inputParameter1 = dOEModel1.GetParameter(Name="P1") inputParameter1.LowerBound = 1
GetParameters
Get the DataReferences of the InputParameter and OutputParameter of the model. If the optional argument InputParameters is not specified, the query returns all parameters. If it is specified and True, the query returns only input parameters. If it is False, the query returns only output parameters.
-
Return
The DataReferences of the Parameters - Type DataReferenceSet
Optional Arguments
- InputParameters If True, the query returns only input parameters. If False, the query returns only output parameters. If the argument is ommitted, the query returns all parameters.
- Type bool
- Example
The following example shows how the user can get the parameters of a model.
system1 = GetSystem(Name="RSO") designofExperiment1 = system1.GetContainer(ComponentName="Design of Experiment") dOEModel1 = designofExperiment1.GetModel() parameters = dOEModel1.GetParameters()
GetParametricTable
Get the DataReference of ParametricTable. An exception is thrown if the entity is not found. Names of the tables generated internally are: "DesignPoints", "CorrelationMatrix", "CorrelationScatter", "MinDesignPoints", "MaxDesignPoints", "ResponsePoints", "DeterminationMatrix".
-
Return
The DataReference of the ParametricTable - Type DataReference
Required Arguments
- Name Name of the ParametricTable
- Type string
- Example
The following example shows how the user can get a ParametricTable to add a new row and set values.
system1 = GetSystem(Name="RSO") designofExperiment1 = system1.GetContainer(ComponentName="Design of Experiment") dOEModel1 = designofExperiment1.GetModel() parametricTable = dOEModel1.GetParametricTable(Name="DesignPoints") parametricTable.AddRow() parametricTable.SetCellValue(RowIndex=9,ColumnIndex=0,Value="2.1")
ImportRefinementPointsFromArchive
Import Refinement Point values in the manual refinement table of a Rom Builder from an archive file.
Required Arguments
- ArchivePath The archive path.
- Type string
- ReuseSnapshotFiles If true, reuse existing snapshot files of ROM production folder when they correspond to referenced snapshots of the archive. If false, copy all the snapshot files referenced in the archive (and rename them when they exist already in the ROM production folder).
- Type bool
- Example
The following example shows how the user can import refinement points from a valid archive file.
system = GetSystem(Name="RBU") romBuilder = system.GetContainer(ComponentName="Rom Builder") romBuilderModel = romBuilder.GetModel() romBuilderModel.ImportRefinementPointsFromArchiveCommand(FileName="E:/temp/doesnapshots2.snpz",OverwriteSnapshotFile=False)
ImportRefinementPointsFromDps
Import Refinement Point values in the manual refinement table of a Response Surface model with a query to the DPS.
Required Arguments
- QueryString The query.
- Type string
- Example
The following example shows how the user can import the design point with the ID equal to 1.
container = system1.GetContainer(ComponentName="Response Surface") model = container.GetModel() model.ImportRefinementPointsFromDps(QueryString="?id=1")
ImportRefinementPointsFromFile
Import Refinement Point values in the manual refinement table of a Response Surface model from a csv file.
Required Arguments
- FileName The imported file name.
- Type string
- Example
The following example shows how the user can import refinement points from a valid csv file.
container = system1.GetContainer(ComponentName="Response Surface") model = container.GetModel() model.ImportRefinementPointsFromFile(FilePath="designs.csv")
ImportVerificationPointsFromArchive
Import Verification Point values in the verification table of a Rom Builder from an archive file.
Required Arguments
- ArchivePath The archive path.
- Type string
- ReuseSnapshotFiles If true, reuse existing snapshot files of ROM production folder when they correspond to referenced snapshots of the archive. If false, copy all the snapshot files referenced in the archive (and rename them when they exist already in the ROM production folder).
- Type bool
- Example
The following example shows how the user can import verification points from a valid archive file.
system = GetSystem(Name="RBU") romBuilder = system.GetContainer(ComponentName="Rom Builder") romBuilderModel = romBuilder.GetModel() romBuilderModel.ImportVerificationPointsFromArchiveCommand(FileName="E:/temp/doesnapshots2.snpz",OverwriteSnapshotFile=False)
ImportVerificationPointsFromDps
Import Verification Point values in the verification table of a Response Surface model with a query to the DPS.
Required Arguments
- QueryString The query.
- Type string
- Example
The following example shows how the user can import verification points with a query to the DPS.
container = system1.GetContainer(ComponentName="Response Surface") model = container.GetModel() model.ImportVerificationPointsFromDps(QueryString="?id=1")
ImportVerificationPointsFromFile
Import Verification Point values in the verification table of a Response Surface model from a csv file.
Required Arguments
- FileName The imported file name.
- Type string
- Example
The following example shows how the user can import verification points from a valid csv file.
container = system1.GetContainer(ComponentName="Response Surface") model = container.GetModel() model.ImportVerificationPointsFromFile(FilePath="designs.csv")
UpdateAllGoodnessOfFit
Updates all goodness of fit and the results which depend on them. If the goodness of fit are already uptodate, nothing is done.
- Example
The following example shows how to update all existing GoodnessOfFit.
system1 = GetSystem(Name="RBU") romBuilder1 = system2.GetContainer(ComponentName="Rom Builder") romBuilderModel1 = romBuilder1.GetModel() romBuilderModel1.UpdateAllGoodnessOfFit()