User:Kate Racaza/test page2: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:API}}
=DRAFT=
{{Template:API}}{{Template:BacktoPrevPage}}


Welcome to the official documentation of the ReliaSoft Synthesis API! The Synthesis API can be used to programmatically read and write data to Synthesis repositories, making it easy for you to connect Synthesis applications and data with other systems and tools used within your organization.  
With the Synthesis API, you can leverage the Weibull++ analysis engine to perform life data analysis on an external data source. In this tutorial, you will learn how to use the API to create and analyze a data set, and then estimate the probability of failure.


The Synthesis API has been developed for Visual Basic for Applications (VBA) and Visual Basic.NET. This gives you the ability to create automated solutions using popular Microsoft Office applications, such as Excel and PowerPoint, as well as create custom applications for your organization.


==Tutorial: Life Data Analysis==
The following example demonstrates how to define a Weibull++ data set, fit a life distribution to the data and obtain analysis results from the model. A discussion of the example follows.


{{APIOverviewBox
The following table shows the data set used in this example.
|image=
{|{{table}}
|title=Life Data Analysis
|Number in State||State||Time to F or S
|links=
|-
{{TitleBoxLink|link=Life Data Analysis Reference|text=Reference Book}}
|1||F||16
{{TitleBoxLink|link=Weibull++_Examples|text=Weibull++ Software Examples}}
|-
}}
|1||F||34
|-
|1||F||53
|-
|1||F||75
|-
|1||F||93
|-
|5||S||120
|}


{{APIOverviewBox
'''VB.NET'''
|image=
|title=Accelarated Life Data Testing Analysis
{{APIPrefix|Imports}} SynthesisAPI
|links=
{{TitleBoxLink|link=Accelarated Life Data Testing Analysis_Reference|text=Reference}}
{{APIPrefix|Module}} Module1
{{TitleBoxLink|link=ALTA_Examples|text=ALTA Software Examples}}
    {{APIPrefix|Sub}} Main()
}}
  {{APIComment|'Declare a new WeibullDataSet object.}}
    {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
 
  {{APIComment|'Add failure times to the data set.}}
    WDS.AddFailure(16, 1)
    WDS.AddFailure(34, 1)
    WDS.AddFailure(53, 1) 
    WDS.AddFailure(75, 1)
    WDS.AddFailure(93, 1)
 
  {{APIComment|'Add five suspensions to the data set.}}
    WDS.AddSuspension(120, 5) 
  {{APIComment|'Use the 2-parameter Weibull distribution and the rank regression on X (RRX) analysis method.}}
  {{APIComment|'Keep all other analysis settings at default.}}
    WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
    WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
    WDS.AnalysisSettings.Analysis = WeibullSolverMethod.RRX
 
  {{APIComment|'Analyze the data set.}}
    WDS.Calculate()
  {{APIComment|'Calculate the probability of failure at 226 hrs and display the result.}}
    {{APIPrefix|Dim}} r {{APIPrefix|As}} Double
    r = WDS.FittedModel.unreliability(226)
    MsgBox({{APIString|"Prob. Fail: "}} & r)
    {{APIPrefix|End Sub}}
{{APIPrefix|End Module}}


{{APIOverviewBox
|image=
|title=System Analysis
|links=
{{TitleBoxLink|link=System_Analysis_Reference|text=Reference}}
{{TitleBoxLink|link=BlockSim_Examples|text=BlockSim Software Examples}}
}}


{{APIOverviewBox
==Discussion==
|image=
|title=Experiment Design and Analysis
|links=
{{TitleBoxLink|link=Experiment_Design_and_Analysis_Reference|text=Reference}}
{{TitleBoxLink|link=DOE_Reference_Examples|text=DOE++ Software Examples}}
}}


{{APIOverviewBox
The [[WeibullDataSet Class|WeibullDataSet]] class represents a Weibull++ standard folio data sheet. The class contains all the methods and properties that allow you to define a data set and fit a statistical distribution to the data.
|image=
|title=Reliability Growth and Repairable System Analysis
|links=
{{TitleBoxLink|link=Reliability_Growth_and_Repairable_System_Analysis_Reference|text=Reference}}
{{TitleBoxLink|link=RGA_Examples|text=RGA Software Examples}}
}}


{{APIOverviewBox
  {{APIComment|'Declare a new WeibullDataSet object.}}
|image=
    {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
|title=FMEA - Failure Modes & Effects Analysis
|links=
{{TitleBoxLink|link=Xfmea_Examples|text=Xfmea Software Examples}}
<div style="float:left; padding-left:40px;"><font style="font-size:16px;">&bull; [http://www.weibull.com/hotwire/fmea_corner.htm Articles]</font></div>
}}


{{APIOverviewBox
The data set can contain failures, suspensions, interval data or free-form data. The following example shows how to use the [[WeibullDataSet.AddFailure|AddFailure]] method to define failures and the [[WeibullDataSet.AddSuspension|AddSuspension]] method to define suspensions.
|image=
|title=RCM - Reliability Centered Maintenance
|links=
{{TitleBoxLink|link=RCM%2B%2B_Examples|text=RCM++ Software Examples}}
}}


{{APIOverviewBox
{{APIComment|'Add failure times to the data set.}}
|image=
  WDS.AddFailure(16, 1)
|title=Synthesis API
  WDS.AddFailure(34, 1)
|links=
  WDS.AddFailure(53, 1) 
{{TitleBoxLink|link=APIQuickStartGuide|text=Quick Start Guide}}
  WDS.AddFailure(75, 1)
{{TitleBoxLink|link=APIExamples|text=Examples}}
  WDS.AddFailure(93, 1)
{{TitleBoxLink|link=Full_Synthesis_API|text=Reference}}
 
}}
{{APIComment|'Add five suspensions to the data set.}}
  WDS.AddSuspension(120, 5)


The AnalysisSetting property returns a [[WeibullAnalysisOptions Class|WeibullAnalysisOptions]] object, which represents the analysis settings of the WeibullDataSet object. In the following example, we use the <code>Distribution</code>, <code>Parameters</code> and <code>Analysis</code> properties of the WeibullAnalysisOptions class to specify the life distribution and analysis method.


{{APIComment|'Use the 2-parameter Weibull distribution and the rank regression on X (RRX) analysis method.}}
{{APIComment|'Keep all other analysis settings at default.}}
  WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
  WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
  WDS.AnalysisSettings.Analysis = WeibullSolverMethod.RRX


To analyze the data set, use the [[WeibullDataSet.Calculate|Calculate]] method. The method returns a message box that shows the estimated parameters of the life distribution, based on the settings specified in the AnalysisSettings property.


<!---WRAPPER--->
{{APIComment|'Analyze the data set.}}
<div style="float:left; width:48%; margin:5px; border: 1px solid; border-color:#C8D4E0;">
  WDS.Calculate()
<!--BOX TITLE -->
<div style="position:relative; display:table; width:100%; background-color: white;">
<div style="height:35px; width:35px; background-image:; float:left;"></div>
<font style="font-size:16px; font-weight:bold; padding-top:5px; margin-left:15px; margin-bottom:0px;">Life Data Analysis</font>
</div>
<div style="height:1px; width:100%; background:; margin:0px; padding:0px;"></div>
<!--- WRAPPER FOR BOX OF LINKS--->
<div style="position:relative; display:table; width:100%; padding:10px 0px 10px 0px; background-color:#dae5f0">
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
</div>
</div>


<!---WRAPPER--->
The FittedModel property gets a [[CModel Class|cModel]] object that represents the fitted model of the life data analysis. From the model, you can calculate useful metrics such as reliability, failure rate, mean time, etc. In this example, we calculate for the probability of failure (unreliability).
<div style="float:left; width:48%; margin:5px; border: 1px solid; border-color:#C8D4E0;">
<!--BOX TITLE -->
<div style="position:relative; display:table; width:100%; background-color: white;">
<div style="height:35px; width:35px; background-image:; float:left;"></div>
<font style="font-size:16px; font-weight:bold; padding-top:5px; margin-left:15px; margin-bottom:0px;">Life Data Analysis</font>
</div>
<div style="height:1px; width:100%; background:; margin:0px; padding:0px;"></div>
<!--- WRAPPER FOR BOX OF LINKS--->
<div style="position:relative; display:table; width:100%; padding:10px 0px 10px 0px; background-color:#dae5f0">
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
</div>
</div>


<!---WRAPPER--->
  {{APIComment|'Calculate the probability of failure at 226 hrs and display the result.}}
<div style="float:left; width:48%; margin:5px; border: 1px solid; border-color:#C8D4E0;">
    {{APIPrefix|Dim}} r {{APIPrefix|As}} Double
<!--BOX TITLE -->
    r = WDS.FittedModel.unreliability(226)
<div style="position:relative; display:table; width:100%; background-color: white;">
    MsgBox({{APIString|"Prob. Fail: "}} & r)
<div style="height:35px; width:35px; background-image:; float:left;"></div>
<font style="font-size:16px; font-weight:bold; padding-top:5px; margin-left:15px; margin-bottom:0px;">Life Data Analysis</font>
</div>
<div style="height:1px; width:100%; background:; margin:0px; padding:0px;"></div>
<!--- WRAPPER FOR BOX OF LINKS--->
<div style="position:relative; display:table; width:100%; padding:10px 0px 10px 0px; background-color:#dae5f0">
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
</div>
</div>


<!---WRAPPER--->
<div style="float:left; width:48%; margin:5px; border: 1px solid; border-color:#C8D4E0;">
<!--BOX TITLE -->
<div style="position:relative; display:table; width:100%; background-color: white;">
<div style="height:35px; width:35px; background-image:; float:left;"></div>
<font style="font-size:16px; font-weight:bold; padding-top:5px; margin-left:15px; margin-bottom:0px;">Life Data Analysis</font>
</div>
<div style="height:1px; width:100%; background:; margin:0px; padding:0px;"></div>
<!--- WRAPPER FOR BOX OF LINKS--->
<div style="position:relative; display:table; width:100%; padding:10px 0px 10px 0px; background-color:#dae5f0">
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
</div>
</div>


<!---WRAPPER--->
==References==
<div style="float:left; width:48%; margin:5px; border: 1px solid; border-color:#C8D4E0;">
*[[WeibullDataSet Class]]
<!--BOX TITLE -->
*[[WeibullDataSet.AddFailure|WeibullDataSet.AddFailure Method]]
<div style="position:relative; display:table; width:100%; background-color: white;">
*[[WeibullDataSet.AddSuspension| WeibullDataSet.AddSuspension Method]]
<div style="height:35px; width:35px; background-image:; float:left;"></div>
*[[WeibullDataSet.Calculate|WeibullDataSet.Calculate Method]]
<font style="font-size:16px; font-weight:bold; padding-top:5px; margin-left:15px; margin-bottom:0px;">Life Data Analysis</font>
*[[WeibullAnalysisOptions Class]]
</div>
*[[CModel Class|cModel Class]]
<div style="height:1px; width:100%; background:; margin:0px; padding:0px;"></div>
<!--- WRAPPER FOR BOX OF LINKS--->
<div style="position:relative; display:table; width:100%; padding:10px 0px 10px 0px; background-color:#dae5f0">
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
</div>
</div>
 
<!---WRAPPER--->
<div style="float:left; width:48%; margin:5px; border: 1px solid; border-color:#C8D4E0;">
<!--BOX TITLE -->
<div style="position:relative; display:table; width:100%; background-color: white;">
<div style="height:35px; width:35px; background-image:; float:left;"></div>
<font style="font-size:16px; font-weight:bold; padding-top:5px; margin-left:15px; margin-bottom:0px;">Life Data Analysis</font>
</div>
<div style="height:1px; width:100%; background:; margin:0px; padding:0px;"></div>
<!--- WRAPPER FOR BOX OF LINKS--->
<div style="position:relative; display:table; width:100%; padding:10px 0px 10px 0px; background-color:#dae5f0">
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
</div>
</div>
 
<!---WRAPPER--->
<div style="float:left; width:48%; margin:5px; border: 1px solid; border-color:#C8D4E0;">
<!--BOX TITLE -->
<div style="position:relative; display:table; width:100%; background-color: white;">
<div style="height:35px; width:35px; background-image:; float:left;"></div>
<font style="font-size:16px; font-weight:bold; padding-top:5px; margin-left:15px; margin-bottom:0px;">Life Data Analysis</font>
</div>
<div style="height:1px; width:100%; background:; margin:0px; padding:0px;"></div>
<!--- WRAPPER FOR BOX OF LINKS--->
<div style="position:relative; display:table; width:100%; padding:10px 0px 10px 0px; background-color:#dae5f0">
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
</div>
</div>
 
<!---WRAPPER--->
<div style="float:left; width:48%; margin:5px; border: 1px solid; border-color:#C8D4E0;">
<!--BOX TITLE -->
<div style="position:relative; display:table; width:100%; background-color: white;">
<div style="height:35px; width:35px; background-image:; float:left;"></div>
<font style="font-size:16px; font-weight:bold; padding-top:5px; margin-left:15px; margin-bottom:0px;">Life Data Analysis</font>
</div>
<div style="height:1px; width:100%; margin:0px; padding:0px;"></div>
<!--- WRAPPER FOR BOX OF LINKS--->
<div style="position:relative; display:table; width:100%; padding:10px 0px 10px 0px; background-color:#dae5f0">
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
<div style="float:left; padding-left:40px;"><font style="font-size:14px;">&bull; [[Life Data Analysis Reference]]</font></div>
</div>
</div>

Latest revision as of 22:01, 11 May 2016

DRAFT

APIWiki.png


<< Back to Tutorials Main Page

With the Synthesis API, you can leverage the Weibull++ analysis engine to perform life data analysis on an external data source. In this tutorial, you will learn how to use the API to create and analyze a data set, and then estimate the probability of failure.


Tutorial: Life Data Analysis

The following example demonstrates how to define a Weibull++ data set, fit a life distribution to the data and obtain analysis results from the model. A discussion of the example follows.

The following table shows the data set used in this example.

Number in State State Time to F or S
1 F 16
1 F 34
1 F 53
1 F 75
1 F 93
5 S 120
VB.NET

Imports SynthesisAPI 

Module Module1
   Sub Main()

  'Declare a new WeibullDataSet object.  
   Dim WDS As New WeibullDataSet
  
  'Add failure times to the data set. 
   WDS.AddFailure(16, 1)
   WDS.AddFailure(34, 1)
   WDS.AddFailure(53, 1)  
   WDS.AddFailure(75, 1)
   WDS.AddFailure(93, 1)
  
  'Add five suspensions to the data set. 
   WDS.AddSuspension(120, 5)   

  'Use the 2-parameter Weibull distribution and the rank regression on X (RRX) analysis method. 
  'Keep all other analysis settings at default. 
   WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
   WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
   WDS.AnalysisSettings.Analysis = WeibullSolverMethod.RRX
 
  'Analyze the data set. 
   WDS.Calculate()

  'Calculate the probability of failure at 226 hrs and display the result. 
   Dim r As Double
   r = WDS.FittedModel.unreliability(226)
   MsgBox("Prob. Fail: " & r)

   End Sub
End Module


Discussion

The WeibullDataSet class represents a Weibull++ standard folio data sheet. The class contains all the methods and properties that allow you to define a data set and fit a statistical distribution to the data.

  'Declare a new WeibullDataSet object.  
   Dim WDS As New WeibullDataSet

The data set can contain failures, suspensions, interval data or free-form data. The following example shows how to use the AddFailure method to define failures and the AddSuspension method to define suspensions.

 'Add failure times to the data set. 
  WDS.AddFailure(16, 1)
  WDS.AddFailure(34, 1)
  WDS.AddFailure(53, 1)  
  WDS.AddFailure(75, 1)
  WDS.AddFailure(93, 1)
  
 'Add five suspensions to the data set. 
  WDS.AddSuspension(120, 5) 

The AnalysisSetting property returns a WeibullAnalysisOptions object, which represents the analysis settings of the WeibullDataSet object. In the following example, we use the Distribution, Parameters and Analysis properties of the WeibullAnalysisOptions class to specify the life distribution and analysis method.

 'Use the 2-parameter Weibull distribution and the rank regression on X (RRX) analysis method. 
 'Keep all other analysis settings at default. 
  WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
  WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
  WDS.AnalysisSettings.Analysis = WeibullSolverMethod.RRX

To analyze the data set, use the Calculate method. The method returns a message box that shows the estimated parameters of the life distribution, based on the settings specified in the AnalysisSettings property.

 'Analyze the data set. 
  WDS.Calculate()

The FittedModel property gets a cModel object that represents the fitted model of the life data analysis. From the model, you can calculate useful metrics such as reliability, failure rate, mean time, etc. In this example, we calculate for the probability of failure (unreliability).

  'Calculate the probability of failure at 226 hrs and display the result. 
   Dim r As Double
   r = WDS.FittedModel.unreliability(226)
   MsgBox("Prob. Fail: " & r)


References