Evaluation of Results.Entities.TestRslt.TestDone, Results.Entities.Batch.Buoyancy() etc. fixed, ver. 2.14.599

This commit is contained in:
Milan Hanajik 2017-07-04 11:19:05 +02:00
parent 34ad6f040d
commit 00a2289e92
14 changed files with 70 additions and 33 deletions

View File

@ -48,9 +48,12 @@ namespace Results.Entities
foreach (var tr in TestRslts)
{
double time = (tr.EndTime - tr.StartTime).TotalSeconds;
timeSum += time;
sum += (tr.AmbTempMean * time);
if (tr.TestDone)
{
double duration = (tr.EndTime - tr.StartTime).TotalSeconds;
timeSum += duration;
sum += (tr.AmbTempMean * duration);
}
}
return (timeSum == 0) ? 0 : (sum / timeSum);
@ -63,9 +66,12 @@ namespace Results.Entities
foreach (var tr in TestRslts)
{
double time = (tr.EndTime - tr.StartTime).TotalSeconds;
timeSum += time;
sum += (tr.AmbPressMean * time);
if (tr.TestDone)
{
double duration = (tr.EndTime - tr.StartTime).TotalSeconds;
timeSum += duration;
sum += (tr.AmbPressMean * duration);
}
}
return (timeSum == 0) ? 0 : (sum / timeSum);
@ -78,9 +84,12 @@ namespace Results.Entities
foreach (var tr in TestRslts)
{
double time = (tr.EndTime - tr.StartTime).TotalSeconds;
timeSum += time;
sum += (tr.AmbHumiMean * time);
if (tr.TestDone)
{
double duration = (tr.EndTime - tr.StartTime).TotalSeconds;
timeSum += duration;
sum += (tr.AmbHumiMean * duration);
}
}
return (timeSum == 0) ? 0 : (sum / timeSum);
@ -93,9 +102,12 @@ namespace Results.Entities
foreach (var tr in TestRslts)
{
double time = (tr.EndTime - tr.StartTime).TotalSeconds;
timeSum += time;
sum += (tr.Buoyancy * time);
if (tr.TestDone)
{
double duration = (tr.EndTime - tr.StartTime).TotalSeconds;
timeSum += duration;
sum += (tr.Buoyancy * duration);
}
}
return (timeSum == 0) ? 0 : (sum / timeSum);

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.14.598.0")]
[assembly: AssemblyFileVersion("2.14.598.0")]
[assembly: AssemblyVersion("2.14.599.0")]
[assembly: AssemblyFileVersion("2.14.599.0")]

View File

@ -1066,7 +1066,7 @@ namespace TBF.BenchControl.Sequences
if (tstRslt == null) return; /// Prevent program crash in certain cases
tstRslt.StartTime = DateTime.Now;
tstRslt.EndTime = DateTime.Now;
tstRslt.EndTime = DateTime.Now + new TimeSpan(0,0,1);
tstRslt.FlowSetTime = 10;
tstRslt.TestTime = tstRslt.TargetTime();
/// TODO: Verify whether 'ltrPerRefPulse' is up to date
@ -1143,7 +1143,8 @@ namespace TBF.BenchControl.Sequences
meterRslt.Passed = (errorPct >= tstRslt.ErrLimLo() + tstRslt.Uncertainty())
&& (errorPct <= tstRslt.ErrLimHi() - tstRslt.Uncertainty());
meterRslt.TestDone = true;
}
tstRslt.TestDone = true;
}
}
tstRslt.Components = Results.Entities.Components
@ -1170,8 +1171,8 @@ namespace TBF.BenchControl.Sequences
Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(fullTestName, part);
tstRslt.StartTime = DateTime.Now;
tstRslt.EndTime = DateTime.Now;
tstRslt.FlowSetTime = 10;
tstRslt.EndTime = DateTime.Now + new TimeSpan(0, 0, 1);
tstRslt.FlowSetTime = 10;
tstRslt.TestTime = tstRslt.TargetTime();
/// TODO: Verify whether 'ltrPerRefPulse' is up to date
tstRslt.PulsesMaster = (LtrPerRefPulse > 1E-6) ? (tstRslt.TargetVolume() / LtrPerRefPulse) : 1;
@ -1256,7 +1257,7 @@ namespace TBF.BenchControl.Sequences
meterRslt.Passed = (errorPct >= tstRslt.ErrLimLo() + tstRslt.Uncertainty())
&& (errorPct <= tstRslt.ErrLimHi() - tstRslt.Uncertainty());
meterRslt.TestDone = true;
}
}
}
compoundRslt.VolumeRef = tstRslt.VolumeCTV; /// [l] must be calculated before main & aux. meter error
@ -1268,7 +1269,8 @@ namespace TBF.BenchControl.Sequences
compoundRslt.Passed = (compoundRslt.Error >= tstRslt.ErrLimLo() + tstRslt.Uncertainty())
&& (compoundRslt.Error <= tstRslt.ErrLimHi() - tstRslt.Uncertainty());
compoundRslt.TestDone = true;
}
tstRslt.TestDone = true;
}
tstRslt.Components = Results.Entities.Components
.UpdateList(BatchRslts.ComponentsList,
@ -1294,7 +1296,7 @@ namespace TBF.BenchControl.Sequences
Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(fullTestName, part);
tstRslt.StartTime = DateTime.Now;
tstRslt.EndTime = DateTime.Now;
tstRslt.EndTime = DateTime.Now + new TimeSpan(0, 0, 1);
tstRslt.FlowSetTime = 10;
tstRslt.TestTime = tstRslt.TargetTime();
/// TODO: Verify whether 'ltrPerRefPulse' is up to date
@ -1376,6 +1378,7 @@ namespace TBF.BenchControl.Sequences
((errorPct >= tstRslt.ErrLimLo() + tstRslt.Uncertainty()) &&
(errorPct <= tstRslt.ErrLimHi() - tstRslt.Uncertainty()));
volumeRslt.TestDone = true;
tstRslt.TestDone = true;
}
if (energyRslt != null && energyRegReader != null)
@ -1394,6 +1397,7 @@ namespace TBF.BenchControl.Sequences
energyRslt.Error = Formulas.ErrorFromVolumes(energyMeter, energy);
energyRslt.Passed = (errorPct >= energyErrLimLo) && (errorPct <= energyErrLimHi);
energyRslt.TestDone = true;
tstRslt.TestDone = true;
}
}

View File

@ -360,8 +360,9 @@ namespace TBF.BenchControl.TestMethods.Adjustment
meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty)
&& (meterRslt.Error <= test.ErrLimHi - test.Uncertainty);
meterRslt.TestDone = meterRslt.Passed;
}
meterRslt.TestDone = true;
tstRslt.TestDone = true;
}
}
tstRslt.Components = Results.Entities.Components

View File

@ -675,6 +675,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
&& (compoundMeterRslt.Error <= test.ErrLimHi - test.Uncertainty);
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
tstRslt.TestDone = true;
if (Qrise != 0) BatchRslts.WaterMeters[i].QRise = Qrise;
if (Qfall != 0) BatchRslts.WaterMeters[i].QFall = Qfall;

View File

@ -399,6 +399,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty)
&& (meterRslt.Error <= test.ErrLimHi - test.Uncertainty);
meterRslt.TestDone = true;
tstRslt.TestDone = true;
if (iPerl != null)
{

View File

@ -547,7 +547,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty)
&& (meterRslt.Error <= test.ErrLimHi - test.Uncertainty);
meterRslt.TestDone = true;
}
tstRslt.TestDone = true;
}
}
tstRslt.Components = Results.Entities.Components

View File

@ -848,6 +848,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
&& (compoundMeterRslt.Error <= test.ErrLimHi - test.Uncertainty);
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
tstRslt.TestDone = true;
}
}
}
@ -898,7 +899,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
((volumeRslt.Error >= test.ErrLimLo + test.Uncertainty) &&
(volumeRslt.Error <= test.ErrLimHi - test.Uncertainty));
volumeRslt.TestDone = true;
}
tstRslt.TestDone = true;
}
if (energyRslt != null && energyRegReader != null && dataEntryCmpnt is GenericDevices.IHasHeatMtrStatesForm)
{
@ -914,6 +916,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo)
&& (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi);
energyRslt.TestDone = true;
tstRslt.TestDone = true;
}
}
}
@ -943,6 +946,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty)
&& (meterRslt.Error <= test.ErrLimHi - test.Uncertainty);
meterRslt.TestDone = true;
tstRslt.TestDone = true;
}
}
}

View File

@ -519,6 +519,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
((volumeRslt.Error >= test.ErrLimLo + test.Uncertainty) &&
(volumeRslt.Error <= test.ErrLimHi - test.Uncertainty));
volumeRslt.TestDone = true;
tstRslt.TestDone = true;
}
if (energyRslt != null && energyRegReader != null)
@ -536,6 +537,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo)
&& (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi);
energyRslt.TestDone = true;
tstRslt.TestDone = true;
}
}
}
@ -595,6 +597,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty)
&& (meterRslt.Error <= test.ErrLimHi - test.Uncertainty);
meterRslt.TestDone = true;
tstRslt.TestDone = true;
if (iPerl != null)
{

View File

@ -824,6 +824,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
&& (compoundMeterRslt.Error <= test.ErrLimHi - test.Uncertainty);
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
tstRslt.TestDone = true;
}
}
}
@ -874,6 +875,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
((volumeRslt.Error >= test.ErrLimLo + test.Uncertainty) &&
(volumeRslt.Error <= test.ErrLimHi - test.Uncertainty));
volumeRslt.TestDone = true;
tstRslt.TestDone = true;
}
if (energyRslt != null && energyRegReader != null)
@ -891,6 +893,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo)
&& (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi);
energyRslt.TestDone = true;
tstRslt.TestDone = true;
}
}
}
@ -951,6 +954,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty)
&& (meterRslt.Error <= test.ErrLimHi - test.Uncertainty);
meterRslt.TestDone = true;
tstRslt.TestDone = true;
if (iPerl != null)
{

View File

@ -317,7 +317,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest
meterRslt.Error = 0;
meterRslt.Passed = true;
meterRslt.TestDone = true;
}
tstRslt.TestDone = true;
}
}
else
{
@ -344,7 +345,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest
compoundMeterRslt.Error = 0;
compoundMeterRslt.Passed = true;
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
}
tstRslt.TestDone = true;
}
}
}

View File

@ -228,7 +228,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
meterRslt.Error = 0;
meterRslt.Passed = true;
meterRslt.TestDone = true;
}
tstRslt.TestDone = true;
}
}
else
{
@ -255,7 +256,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
compoundMeterRslt.Error = 0;
compoundMeterRslt.Passed = true;
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
}
tstRslt.TestDone = true;
}
}
}

View File

@ -318,7 +318,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
meterRslt.Error = oriMeterRslt.Error;
meterRslt.Passed = oriMeterRslt.Passed;
meterRslt.TestDone = true;
}
tstRslt.TestDone = true;
}
else
{
/// corrected iPerl
@ -328,7 +329,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
meterRslt.Error = 0;
meterRslt.Passed = true;
meterRslt.TestDone = true;
}
tstRslt.TestDone = true;
}
}
}
}

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.14.598.1")]
[assembly: AssemblyFileVersion("2.14.598.1")]
[assembly: AssemblyVersion("2.14.599.1")]
[assembly: AssemblyFileVersion("2.14.599.1")]