T O P I C R E V I E W |
Bill Rokos |
Posted - 26 Mar 2014 : 21:14:41 Hello,
I would like the ability to set my own Limits for my P-Chart Percent Defective Variable Sample Size. As a test I modified the SPCWebApplication1 to use the P-Chart VSS. It works fine with AutoCalculateControlLimits(). Now I would like to manually set the Control Limits.
1. I commented out AutoCalculateControlLimits(); 2. I set the ControlLineMode to CONTROL_LINE_VARIABLE. 3. I called SetControlimitValues() with 3 random values. 4. Just to be sure I also called SetControlLimitStrings().
For some reason I am unable to change the control limits. This seems to work fine on the Win Forms version, but does not seem to be working on my ASP.NET version. No matter what value I put in the limits array it always shows the same value.
Here is the function. Please let me know if you need anything else.
public void ProcessData(SPCBatchAttributeControlChart chart, List<SampleSubGroupRecord> ssgs, List<string> categories) { int batchCounter = 0; chart.PrimaryChart.ControlLineMode = SPCChartObjects.CONTROL_LINE_VARIABLE; Random rnd = new Random();
// add data to chart from temp store foreach (SampleSubGroupRecord sampleSubGroup in ssgs) { chart.ChartData.SampleSubgroupSize_VSS = sampleSubGroup.TotalSampleCount; double[] rawLimits = new double[] { rnd.Next(0, 30), rnd.Next(0, 30), rnd.Next(30, 60) }; DoubleArray limits = new DoubleArray(rawLimits);
chart.ChartData.SetControlLimitValues(rawLimits); chart.ChartData.SetControlLimitStrings(new string[] { "Target", "LCL", "UCL" }); // This uses the Max Sample Count chart.ChartData.AddNewSampleRecord(batchCounter, new ChartCalendar(sampleSubGroup.SampleDateTime), sampleSubGroup.SampleValues, sampleSubGroup.SampleSubGroupID.ToString()); // This uses the VSS Count // chart.ChartData.AddNewSampleRecord(batchCounter, new ChartCalendar(sampleSubGroup.SampleDateTime), sampleSubGroup.SampleValues); batchCounter++; } }
|
6 L A T E S T R E P L I E S (Newest First) |
Bill Rokos |
Posted - 27 Mar 2014 : 18:06:07 Hello,
Thank you for the quick reply and answer.
Best Regards. |
quinncurtis |
Posted - 27 Mar 2014 : 15:35:10 We looked at the underlying source, and it isn't valid to try and set an explicit control limit on any variable sample size chart (.Net Forms or Asp.Net). The only thing you can do is to set the process Mean and Sigma using something like:
this.ChartData.UpdateControlLimitsUsingMeanAndSigma(SPCChartObjects.PRIMARY_CHART, 19, 5);
And then let our software calculated the sample size adjusted control limit for each sample interval.
|
Bill Rokos |
Posted - 27 Mar 2014 : 12:39:49 Oh sorry. I will talk with my Users to see if that is what they are looking for in the calculation. Right now I'm doing a Proof of Technology to make sure it's possible to do what they want. |
quinncurtis |
Posted - 27 Mar 2014 : 12:27:47 Read the addition to my previous post, about UpdateControlLimitsUsingMeanAndSigma
You would send any examples to support@quinn-curtis.com.
I don't know what POT means.
|
Bill Rokos |
Posted - 27 Mar 2014 : 12:21:51 Hello,
Thank you for looking at my issue. I will send you the source code via e-mail to your forum response. Actually it doesn't look like attachments are possible. What is the best way to send you the source code?
In regards to calculating the value, I understand your concern regarding how to calculate the value and it's meaning, I am not certain what the formula I will use yet is. At this time this is a POT. |
quinncurtis |
Posted - 27 Mar 2014 : 11:37:50 First I, have no idea why it work under Winforms, but not ASP.Net, since exactly the same code is used. I would think that somehow there is a difference between your two test programs. If I can't reproduce the problem you will need to send us your own test programs.
But, more importantly, how do you intend to calculate the control limits for each sample interval update? Do you plan to use some formula for calculating the limits which takes into account variable sample size for each interval (which is what we do)? If you don't, the values are statistically meaningless.
It would be 100% better if you just set the mean and sigma that the control limits use in their calculation (rather than use the mean and sigma calculated from the data), and then let our software calculate the control limits. You do NOT use AutoCalculatePrimaryControlLimits in this case
this.ChartData.UpdateControlLimitsUsingMeanAndSigma(SPCChartObjects.PRIMARY_CHART, 19, 5);
What is the reason you wouldn't want to do that. |
|
|