// 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-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 SignalReportLiquefaction extends SignalReport editinlinenew; var(SignalReport) GeoSizes LengthOfDamage; var(SignalReport) GeoSizes LengthOfDamageMax; var(SignalReport) GeoSizes WidthOfDamage; var(SignalReport) GeoSizes WidthOfDamageMax; //is temp veriable var(SignalReport) GeoYesNo SoilPartsMoving; var(SignalReport) GeoYesNo FlushingSoil; var(SignalReport) Quantity FlushingSoilQuantity; //============================================================================= // Date Id Modification // 2007-07-11 Wsl Created //============================================================================= function SignalReport Duplicate(class type) { local SignalReportLiquefaction returner; // get new SignalReport with duplicate values from SignalReport common properties returner = SignalReportLiquefaction(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.SoilPartsMoving = self.SoilPartsMoving; 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-10-03 The Fixed wrong typecast // 2006-10-30 Zmr Added the two new variables and commented the old one //============================================================================= 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(SignalReportLiquefaction(ASignalReport).LengthOfDamageMax == SIZE_NONE ) { lmaxset = false; SignalReportLiquefaction(ASignalReport).LengthOfDamageMax = SignalReportLiquefaction(ASignalReport).LengthOfDamage; } if(SignalReportLiquefaction(ASignalReport).WidthOfDamageMax == SIZE_NONE ) { wmaxset = false; SignalReportLiquefaction(ASignalReport).WidthOfDamageMax = SignalReportLiquefaction(ASignalReport).WidthOfDamage; } APossibleCount++; if ((LengthOfDamage >= SignalReportLiquefaction(ASignalReport).LengthOfDamage) && (LengthOfDamage <= SignalReportLiquefaction(ASignalReport).LengthOfDamageMax)) { ACorrectCount++; }; APossibleCount++; if ((WidthOfDamage >= SignalReportLiquefaction(ASignalReport).WidthOfDamage) && (WidthOfDamage <= SignalReportLiquefaction(ASignalReport).WidthOfDamageMax)) { ACorrectCount++; }; /*Not nescecary any more dummy variable APossibleCount++; if ((SoilPartsMoving == SignalReportLiquefaction(ASignalReport).SoilPartsMoving)) { ACorrectCount++; };*/ //added zmr APossibleCount++; if ((FlushingSoil == SignalReportLiquefaction(ASignalReport).FlushingSoil)) { ACorrectCount++; }; //added zmr if(FlushingSoilQuantity != QUA_NONE &&SignalReportLiquefaction(ASignalReport).FlushingSoilQuantity != QUA_NONE) { APossibleCount++; if ((FlushingSoilQuantity == SignalReportLiquefaction(ASignalReport).FlushingSoilQuantity)) { ACorrectCount++; }; } if(!lmaxset) { SignalReportLiquefaction(ASignalReport).LengthOfDamageMax = SIZE_NONE; } if(!wmaxset) { SignalReportLiquefaction(ASignalReport).WidthOfDamageMax = SIZE_NONE; } LIsEqual = LIsEqual && ((1.0 * ACorrectCount / APossibleCount) > AScoreFractionThreshold); Log("SignalReportLiquefaction.IsEqual(): Correct = "$ACorrectCount$"; Possible = "$APossibleCount$"; Threshold = "$AScoreFractionThreshold); Log("SignalReportLiquefaction.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 SoilPartsMoving=GEO_NONE FlushingSoil=GEO_NONE FlushingSoilQuantity=QUA_NONE }