// 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-03 The Fixed wrong typecast // 2006-10-25 The Implemented fraction threshold for report scoring // 2007-07-11 Wsl Created function Duplicate() //============================================================================= class SignalReportRipPitching extends SignalReport editinlinenew; var(SignalReport) GeoSizes LengthOfDamage; var(SignalReport) GeoSizes LengthOfDamageMax; var(SignalReport) GeoSizes WidthOfDamage; var(SignalReport) GeoSizes WidthOfDamageMax; var(SignalReport) GeoYesNo ElementsMissingOrMoved; var(SignalReport) GeoYesNo FlushingSoil; var(SignalReport) Quantity FlushingSoilQuantity; var(SignalReport) GeoYesNo ElementsLoose; //============================================================================= // Date Id Modification // 2007-07-11 Wsl Created //============================================================================= function SignalReport Duplicate(class type) { local SignalReportRipPitching returner; // get new SignalReport with duplicate values from SignalReport common properties returner = SignalReportRipPitching(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.ElementsMissingOrMoved = self.ElementsMissingOrMoved; returner.FlushingSoil = self.FlushingSoil; returner.FlushingSoilQuantity = self.FlushingSoilQuantity; returner.ElementsLoose = self.ElementsLoose; return returner; } //============================================================================= // Date Id Modification // 2006-08-11 The Created // 2006-10-03 The Implemented Max values for GeoSizes properties // 2006-10-03 The Fixed wrong typecast // 2006-12-11 zmr When one FlushingSoilQuantityor ElementsLoose 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(SignalReportRipPitching(ASignalReport).LengthOfDamageMax == SIZE_NONE ) { lmaxset = false; SignalReportRipPitching(ASignalReport).LengthOfDamageMax = SignalReportRipPitching(ASignalReport).LengthOfDamage; } if(SignalReportRipPitching(ASignalReport).WidthOfDamageMax == SIZE_NONE ) { wmaxset = false; SignalReportRipPitching(ASignalReport).WidthOfDamageMax = SignalReportRipPitching(ASignalReport).WidthOfDamage; } APossibleCount++; if ((LengthOfDamage >= SignalReportRipPitching(ASignalReport).LengthOfDamage) && (LengthOfDamage <= SignalReportRipPitching(ASignalReport).LengthOfDamageMax)) { ACorrectCount++; }; APossibleCount++; if ((WidthOfDamage >= SignalReportRipPitching(ASignalReport).WidthOfDamage) && (WidthOfDamage <= SignalReportRipPitching(ASignalReport).WidthOfDamageMax)) { ACorrectCount++; }; APossibleCount++; if ((ElementsMissingOrMoved == SignalReportRipPitching(ASignalReport).ElementsMissingOrMoved)) { ACorrectCount++; }; APossibleCount++; if ((FlushingSoil == SignalReportRipPitching(ASignalReport).FlushingSoil)) { ACorrectCount++; }; if(FlushingSoilQuantity !=QUA_NONE && SignalReportRipPitching(ASignalReport).FlushingSoilQuantity!=QUA_NONE) { APossibleCount++; if ((FlushingSoilQuantity == SignalReportRipPitching(ASignalReport).FlushingSoilQuantity)) { ACorrectCount++; }; } if(ElementsLoose != GEO_NONE&& SignalReportRipPitching(ASignalReport).ElementsLoose!= GEO_NONE) { APossibleCount++; if ((ElementsLoose == SignalReportRipPitching(ASignalReport).ElementsLoose)) { ACorrectCount++; }; } if(!lmaxset) { SignalReportRipPitching(ASignalReport).LengthOfDamageMax = SIZE_NONE; } if(!wmaxset) { SignalReportRipPitching(ASignalReport).WidthOfDamageMax = SIZE_NONE; } LIsEqual = LIsEqual && ((1.0 * ACorrectCount / APossibleCount) > AScoreFractionThreshold); Log("SignalReportRipPitching.IsEqual(): Correct = "$ACorrectCount$"; Possible = "$APossibleCount$"; Threshold = "$AScoreFractionThreshold); Log("SignalReportRipPitching.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 ElementsMissingOrMoved=GEO_NONE FlushingSoil=GEO_NONE FlushingSoilQuantity=QUA_NONE ElementsLoose=GEO_NONE }