// 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 // 2006-11-12 Zmr Commentedunused variable // 2007-07-11 Wsl Created function Duplicate() //============================================================================= class SignalReportGrass extends SignalReport editinlinenew; var(SignalReport) GeoSizes LengthOfDamage; var(SignalReport) GeoSizes LengthOfDamageMax; var(SignalReport) GeoSizes WidthOfDamage; var(SignalReport) GeoSizes WidthOfDamageMax; //var(SignalReport) GeoSizes DepthOfDamage; //var(SignalReport) GeoSizes DepthOfDamageMax; //============================================================================= // Date Id Modification // 2007-07-11 Wsl Created //============================================================================= function SignalReport Duplicate(class type) { local SignalReportGrass returner; // get new SignalReport with duplicate values from SignalReport common properties returner = SignalReportGrass(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; 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 //============================================================================= 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(SignalReportGrass(ASignalReport).LengthOfDamageMax == SIZE_NONE ) { lmaxset = false; SignalReportGrass(ASignalReport).LengthOfDamageMax = SignalReportGrass(ASignalReport).LengthOfDamage; } if(SignalReportGrass(ASignalReport).WidthOfDamageMax == SIZE_NONE ) { wmaxset = false; SignalReportGrass(ASignalReport).WidthOfDamageMax = SignalReportGrass(ASignalReport).WidthOfDamage; } APossibleCount++; if ((LengthOfDamage >= SignalReportGrass(ASignalReport).LengthOfDamage) && (LengthOfDamage <= SignalReportGrass(ASignalReport).LengthOfDamageMax)) { ACorrectCount++; }; APossibleCount++; if ((WidthOfDamage >= SignalReportGrass(ASignalReport).WidthOfDamage) && (WidthOfDamage <= SignalReportGrass(ASignalReport).WidthOfDamageMax)) { ACorrectCount++; }; if(!lmaxset) { SignalReportGrass(ASignalReport).LengthOfDamageMax = SIZE_NONE; } if(!wmaxset) { SignalReportGrass(ASignalReport).WidthOfDamageMax = SIZE_NONE; } /* APossibleCount++; if ((DepthOfDamage >= SignalReportGrass(ASignalReport).DepthOfDamage) && (DepthOfDamage <= SignalReportGrass(ASignalReport).DepthOfDamageMax)) { ACorrectCount++; }; */ LIsEqual = LIsEqual && ((1.0 * ACorrectCount / APossibleCount) > AScoreFractionThreshold); Log("SignalReportGrass.IsEqual(): Correct = "$ACorrectCount$"; Possible = "$APossibleCount$"; Threshold = "$AScoreFractionThreshold); Log("SignalReportGrass.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 //DepthOfDamage=SIZE_NONE }