// 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-03 The Implemented Max values for GeoSizes properties // 2006-10-25 The Implemented fraction threshold for report scoring // 2007-07-11 Wsl Created function Duplicate() //============================================================================= class SignalReportCrack extends SignalReport editinlinenew; var(SignalReport) GeoSizes LengthOfDamage; var(SignalReport) GeoSizes LengthOfDamageMax; var(SignalReport) GeoSizes WidthOfDamage; var(SignalReport) GeoSizes WidthOfDamageMax; var(SignalReport) GeoYesNo MultipleCracks; var(SignalReport) GeoYesNo FlushingSoil; var(SignalReport) Quantity FlushingSoilQuantity; //============================================================================= // Date Id Modification // 2007-07-11 Wsl Created //============================================================================= function SignalReport Duplicate(class type) { local SignalReportCrack returner; // get new SignalReport with duplicate values from SignalReport common properties returner = SignalReportCrack(GetSignalReportDuplicate(type)); // put in all properties specific to this SignalReport type returner.LengthOfDamage = self.LengthOfDamage; returner.LengthOfDamageMax = self.LengthOfDamageMax; returner.WidthOfDamage = self.WidthOfDamage; returner.WidthOfDamageMax = self.WidthOfDamageMax; returner.MultipleCracks = self.MultipleCracks; returner.FlushingSoil = self.FlushingSoil; returner.FlushingSoilQuantity = self.FlushingSoilQuantity; return returner; } //============================================================================= // Date Id Modification // 2006-08-11 The Created // 2006-10-03 The Implemented Max values for GeoSizes properties // 2006-12-11 zmr When one FlushingSoilQuantity is none, don't account for it. //============================================================================= function bool IsEqual(SignalReport ASignalReport, float AScoreFractionThreshold, out int ACorrectCount, out int APossibleCount) { local bool LIsEqual; local bool lmaxset,wmaxset; // is the lenght/width max value set? LIsEqual = Super.IsEqual(ASignalReport, AScoreFractionThreshold, ACorrectCount, APossibleCount); lmaxset = true; wmaxset = true; if(SignalReportCrack(ASignalReport).LengthOfDamageMax == SIZE_NONE ) { lmaxset = false; SignalReportCrack(ASignalReport).LengthOfDamageMax = SignalReportCrack(ASignalReport).LengthOfDamage; } if(SignalReportCrack(ASignalReport).WidthOfDamageMax == SIZE_NONE ) { wmaxset = false; SignalReportCrack(ASignalReport).WidthOfDamageMax = SignalReportCrack(ASignalReport).WidthOfDamage; } APossibleCount++; if ((LengthOfDamage >= SignalReportCrack(ASignalReport).LengthOfDamage) && (LengthOfDamage <= SignalReportCrack(ASignalReport).LengthOfDamageMax)) { ACorrectCount++; }; APossibleCount++; if ((WidthOfDamage >= SignalReportCrack(ASignalReport).WidthOfDamage) && (WidthOfDamage <= SignalReportCrack(ASignalReport).WidthOfDamageMax)) { ACorrectCount++; }; APossibleCount++; if ((MultipleCracks == SignalReportCrack(ASignalReport).MultipleCracks)) { ACorrectCount++; }; APossibleCount++; if ((FlushingSoil == SignalReportCrack(ASignalReport).FlushingSoil)) { ACorrectCount++; }; //SignalReportCrack(ASignalReport).FlushingSoilQuantity != none && if(FlushingSoilQuantity != QUA_NONE &&SignalReportCrack(ASignalReport).FlushingSoilQuantity != QUA_NONE) { APossibleCount++; if ((FlushingSoilQuantity == SignalReportCrack(ASignalReport).FlushingSoilQuantity)) { ACorrectCount++; }; } if(!lmaxset) { SignalReportCrack(ASignalReport).LengthOfDamageMax = SIZE_NONE; } if(!wmaxset) { SignalReportCrack(ASignalReport).WidthOfDamageMax = SIZE_NONE; } LIsEqual = LIsEqual && ((1.0 * ACorrectCount / APossibleCount) > AScoreFractionThreshold); Log("SignalReportCrack.IsEqual(): Correct = "$ACorrectCount$"; Possible = "$APossibleCount$"; Threshold = "$AScoreFractionThreshold); Log("SignalReportCrack.IsEqual(): LIsEqual = "$LIsEqual); return (LIsEqual); } //============================================================================= // Date Id Modification // 2006-08-11 The Created //============================================================================= defaultproperties { LengthOfDamage=SIZE_NONE LengthOfDamageMax=SIZE_NONE WidthOfDamage=SIZE_NONE WidthOfDamageMax=SIZE_NONE FlushingSoil=GEO_NONE MultipleCracks=GEO_NONE FlushingSoilQuantity=QUA_NONE }