// 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 SignalReportSettlement extends SignalReport editinlinenew; var(SignalReport) GeoSizes LengthOfDamage; var(SignalReport) GeoSizes LengthOfDamageMax; var(SignalReport) GeoSizes WidthOfDamage; var(SignalReport) GeoSizes WidthOfDamageMax; var(SignalReport) GeoSizes HeightDifference; var(SignalReport) GeoSizes HeightDifferenceMax; //============================================================================= // Date Id Modification // 2007-07-11 Wsl Created //============================================================================= function SignalReport Duplicate(class type) { local SignalReportSettlement returner; // get new SignalReport with duplicate values from SignalReport common properties returner = SignalReportSettlement(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.HeightDifference = self.HeightDifference; returner.HeightDifferenceMax = self.HeightDifferenceMax; 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 HeightDifference 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,hmaxset; LIsEqual = Super.IsEqual(ASignalReport, AScoreFractionThreshold, ACorrectCount, APossibleCount); lmaxset = true; wmaxset = true; hmaxset = true; LIsEqual = Super.IsEqual(ASignalReport, AScoreFractionThreshold, ACorrectCount, APossibleCount); if(SignalReportSettlement(ASignalReport).LengthOfDamageMax == SIZE_NONE ) { lmaxset = false; SignalReportSettlement(ASignalReport).LengthOfDamageMax = SignalReportSettlement(ASignalReport).LengthOfDamage; } if(SignalReportSettlement(ASignalReport).WidthOfDamageMax == SIZE_NONE ) { wmaxset = false; SignalReportSettlement(ASignalReport).WidthOfDamageMax = SignalReportSettlement(ASignalReport).WidthOfDamage; } if(SignalReportSettlement(ASignalReport).HeightDifferenceMax == SIZE_NONE ) { hmaxset = false; SignalReportSettlement(ASignalReport).HeightDifferenceMax = SignalReportSettlement(ASignalReport).HeightDifference; } LIsEqual = Super.IsEqual(ASignalReport, AScoreFractionThreshold, ACorrectCount, APossibleCount); APossibleCount++; if ((LengthOfDamage >= SignalReportSettlement(ASignalReport).LengthOfDamage) && (LengthOfDamage <= SignalReportSettlement(ASignalReport).LengthOfDamageMax)) { ACorrectCount++; }; if(WidthOfDamage != SIZE_NONE&&SignalReportSettlement(ASignalReport).WidthOfDamage != SIZE_NONE) { APossibleCount++; if ((WidthOfDamage >= SignalReportSettlement(ASignalReport).WidthOfDamage) && (WidthOfDamage <= SignalReportSettlement(ASignalReport).WidthOfDamageMax)) { ACorrectCount++; }; } APossibleCount++; if ((HeightDifference >= SignalReportSettlement(ASignalReport).HeightDifference) && (HeightDifference <= SignalReportSettlement(ASignalReport).HeightDifferenceMax)) { ACorrectCount++; }; if(!lmaxset) { SignalReportSettlement(ASignalReport).LengthOfDamageMax = SIZE_NONE; } if(!wmaxset) { SignalReportSettlement(ASignalReport).WidthOfDamageMax = SIZE_NONE; } if(!hmaxset) { SignalReportSettlement(ASignalReport).HeightDifferenceMax = SIZE_NONE; } LIsEqual = LIsEqual && ((1.0 * ACorrectCount / APossibleCount) > AScoreFractionThreshold); Log("SignalReportSettlement.IsEqual(): Correct = "$ACorrectCount$"; Possible = "$APossibleCount$"; Threshold = "$AScoreFractionThreshold); Log("SignalReportSettlement.IsEqual(): LIsEqual = "$LIsEqual); return (LIsEqual); } //============================================================================= // Date Id Modification // 2006-08-11 The Created //============================================================================= defaultproperties { LengthOfDamage = SIZE_NONE WidthOfDamage = SIZE_NONE HeightDifference = SIZE_NONE LengthOfDamageMax = SIZE_NONE WidthOfDamageMax = SIZE_NONE HeightDifferenceMax = SIZE_NONE }