// September 2015 // Levee Patroller / Dijk Patrouille // This source file is (c) by Deltares. This source file is open source but only available to select users. Do not redistribute without written permission of Stichting Deltares, Delft, The Netherlands. // This header has been automatically generated. //============================================================================= // Object that contains informations of signal seen // See sub classes for more information // ------------------------------------------------------------ // Created by Rui Guimaraes // © 2006, Geodelft // // Date Id Modification // 2006-08-11 The Implemented IsEqual // 2006-10-25 The Implemented fraction threshold for report scoring // 2006-10-27 Zmr Added 2 new variables. // 2006-10-30 Zmr changed isEqual. (Added the two new variables and deleted the old one) // 2007-07-11 Wsl Created function Duplicate() //============================================================================= class SignalReportOverToppingWash extends SignalReport editinlinenew; var(SignalReport) GeoYesNo IsAccessible; var(SignalReport) GeoYesNo InfiltrateTopInner; var(SignalReport) Quantity WaterFlowQuantity; var(SignalReport) WaveStrength WavesDescription; var(SignalReport) GeoYesNo FlushingSoil; var(SignalReport) Quantity FlushingSoilQuantity; //temp var //var(SignalReport) GeoYesNo SoilPartsMoving; //============================================================================= // Date Id Modification // 2007-07-11 Wsl Created //============================================================================= function SignalReport Duplicate(class type) { local SignalReportOverToppingWash returner; // get new SignalReport with duplicate values from SignalReport common properties returner = SignalReportOverToppingWash(GetSignalReportDuplicate(type)); // put in all properties specific to this SignalReport type returner.IsAccessible = self.IsAccessible; returner.InfiltrateTopInner = self.InfiltrateTopInner; returner.WaterFlowQuantity = self.WaterFlowQuantity; returner.WavesDescription = self.WavesDescription; returner.FlushingSoil = self.FlushingSoil; returner.FlushingSoilQuantity = self.FlushingSoilQuantity; return returner; } //============================================================================= // Date Id Modification // 2006-08-11 The Created // 2006-10-30 Zmr Added the two new variables and commented the old one // 2006-12-11 zmr When one FlushingSoilQuantity or WavesDescription is none, don't account for it. //============================================================================= function bool IsEqual(SignalReport ASignalReport, float AScoreFractionThreshold, out int ACorrectCount, out int APossibleCount) { local bool LIsEqual; LIsEqual = Super.IsEqual(ASignalReport, AScoreFractionThreshold, ACorrectCount, APossibleCount); APossibleCount++; if ((IsAccessible == SignalReportOverToppingWash(ASignalReport).IsAccessible)) { ACorrectCount++; }; APossibleCount++; if ((InfiltrateTopInner == SignalReportOverToppingWash(ASignalReport).InfiltrateTopInner)) { ACorrectCount++; }; APossibleCount++; if ((WaterFlowQuantity == SignalReportOverToppingWash(ASignalReport).WaterFlowQuantity)) { ACorrectCount++; }; /* Not nescecary any more dummy variable APossibleCount++; if ((SoilPartsMoving == SignalReportOverToppingWash(ASignalReport).SoilPartsMoving)) { ACorrectCount++; };*/ if(WavesDescription != WAVE_NONE &&SignalReportOverToppingWash(ASignalReport).WavesDescription != WAVE_NONE) { APossibleCount++; if ((WavesDescription == SignalReportOverToppingWash(ASignalReport).WavesDescription)) { ACorrectCount++; }; } //added zmr APossibleCount++; if ((FlushingSoil == SignalReportOverToppingWash(ASignalReport).FlushingSoil)) { ACorrectCount++; }; //added zmr if(FlushingSoilQuantity !=QUA_NONE && SignalReportOverToppingWash(ASignalReport).FlushingSoilQuantity!=QUA_NONE ) { APossibleCount++; if ((FlushingSoilQuantity == SignalReportOverToppingWash(ASignalReport).FlushingSoilQuantity)) { ACorrectCount++; }; } LIsEqual = LIsEqual && ((1.0 * ACorrectCount / APossibleCount) > AScoreFractionThreshold); Log("SignalReportOverToppingWash.IsEqual(): Correct = "$ACorrectCount$"; Possible = "$APossibleCount$"; Threshold = "$AScoreFractionThreshold); Log("SignalReportOverToppingWash.IsEqual(): LIsEqual = "$LIsEqual); return (LIsEqual); } //============================================================================= // Date Id Modification // 2006-08-11 The Created //============================================================================= defaultproperties { IsAccessible=GEO_NONE InfiltrateTopInner=GEO_NONE WaterFlowQuantity=QUA_None //SoilPartsMoving=GEO_NONE WavesDescription=WAVE_NONE FlushingSoil=GEO_NONE FlushingSoilQuantity=QUA_NONE }