From 476600b10d9ca716b090991ac8a3e6bc85af8543 Mon Sep 17 00:00:00 2001 From: dav-sonn <62243276+dav-sonn@users.noreply.github.com> Date: Mon, 1 Jun 2026 16:58:16 +0100 Subject: [PATCH 1/2] Restore integration tests with numeric tolerance Introduce a 1% numeric relative tolerance in RunSimPathsIntegrationTest and use numbersMatchWithTolerance for numeric comparisons. Adjust test_run.yml to run a single run (maxNumberOfRuns=1) with randomSeed=606 and popSize=50000. Regenerate expected CSV outputs to match the updated run (AlignmentAdjustmentFactors1.csv, EmploymentStatistics1.csv, HealthStatistics1.csv, Statistics1.csv, Statistics21.csv). --- config/test_run.yml | 6 ++-- .../RunSimPathsIntegrationTest.java | 15 +++++++- .../expected/AlignmentAdjustmentFactors1.csv | 12 +++---- .../expected/EmploymentStatistics1.csv | 12 +++---- .../expected/HealthStatistics1.csv | 36 +++++++------------ .../integrationtest/expected/Statistics1.csv | 12 +++---- .../integrationtest/expected/Statistics21.csv | 12 +++---- 7 files changed, 45 insertions(+), 60 deletions(-) diff --git a/config/test_run.yml b/config/test_run.yml index 92a0cf6a6..f5695ea6e 100644 --- a/config/test_run.yml +++ b/config/test_run.yml @@ -1,12 +1,12 @@ # This file can be used to override defaults for multirun arguments. # Arguments of the SimPathsMultiRun object overridden by the command-line -maxNumberOfRuns: 2 +maxNumberOfRuns: 1 executeWithGui: false -randomSeed: 100 +randomSeed: 606 startYear: 2019 endYear: 2022 -popSize: 20000 +popSize: 50000 integrationTest: true collector_args: diff --git a/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java b/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java index 313062a01..5df147d4f 100644 --- a/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java +++ b/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java @@ -17,6 +17,8 @@ @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class RunSimPathsIntegrationTest { + private static final double NUMERIC_RELATIVE_TOLERANCE = 0.01; + @Test @DisplayName("Initial database setup runs successfully") @Order(1) @@ -185,7 +187,7 @@ private boolean tokensMatchWithTolerance(String expectedToken, String actualToke Double actualNumber = tryParseDouble(actualTrimmed); if (expectedNumber != null && actualNumber != null) { - return true; + return numbersMatchWithTolerance(expectedNumber, actualNumber); } return expectedToken.equals(actualToken); @@ -199,6 +201,17 @@ private Double tryParseDouble(String value) { } } + private boolean numbersMatchWithTolerance(double expectedNumber, double actualNumber) { + if (!Double.isFinite(expectedNumber) || !Double.isFinite(actualNumber)) { + return Double.compare(expectedNumber, actualNumber) == 0; + } + + double absoluteDifference = Math.abs(expectedNumber - actualNumber); + double relativeDifferenceLimit = NUMERIC_RELATIVE_TOLERANCE * Math.max(Math.abs(expectedNumber), Math.abs(actualNumber)); + + return absoluteDifference <= relativeDifferenceLimit; + } + private void runCommand(String... args) { try { ProcessBuilder processBuilder = new ProcessBuilder(); diff --git a/src/test/java/simpaths/integrationtest/expected/AlignmentAdjustmentFactors1.csv b/src/test/java/simpaths/integrationtest/expected/AlignmentAdjustmentFactors1.csv index 3fedea31d..c83132436 100644 --- a/src/test/java/simpaths/integrationtest/expected/AlignmentAdjustmentFactors1.csv +++ b/src/test/java/simpaths/integrationtest/expected/AlignmentAdjustmentFactors1.csv @@ -1,9 +1,5 @@ run,time,id_AlignmentAdjustmentFactors1,empShareSimACFemales,empShareSimACMales,empShareSimCouples,empShareSimSingleDepFemales,empShareSimSingleDepMales,empShareSimSingleFemales,empShareSimSingleMales,empShareTgtACFemales,empShareTgtACMales,empShareTgtCouples,empShareTgtSingleDepFemales,empShareTgtSingleDepMales,empShareTgtSingleFemales,empShareTgtSingleMales,fertilityAdjFactor,fertilityRateSim,fertilityRateTgt,inSchoolAdjFactor,inSchoolShareSim,inSchoolShareTgt,partnershipAdjFactor,shareCohabitingSim,shareCohabitingTgt,utilityAdjACFemales,utilityAdjACMales,utilityAdjCouples,utilityAdjSingleDepFemales,utilityAdjSingleDepMales,utilityAdjSingleFemales,utilityAdjSingleMales -1,2019.0,1,0.5623931623931624,0.5619047619047619,0.8590878148400273,0.3333333333333333,0.44308943089430897,0.43822697265011,0.5445244410761653,0.5403293808853606,0.5311791259117856,0.8735970003111929,0.3943366638089926,0.46535641588110904,0.44388496690103335,0.4705375056413739,-0.279462622342386,0.05029585798816568,0.05113363440615968,0.0,0.281711358843025,0.3023858368396759,-0.613869665517935,0.5387792565396972,0.632472038269043,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -1,2020.0,1,0.45109780439121755,0.5709090909090909,0.9006958538706872,0.45714285714285713,0.4841628959276018,0.33030646992054485,0.4274735830931796,0.5501985392408713,0.5109522836960044,0.8754389771797882,0.3941959194429085,0.46203656399953613,0.44281420563924695,0.4648045911203806,-0.2659197918000082,0.04835164835164835,0.04996578478889472,0.0,0.28065967016491755,0.2760101854801178,1.594846751573303,0.6270179516983081,0.6234807968139648,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -1,2021.0,1,0.5,0.5580204778156996,0.9200058927519151,0.4869281045751634,0.4924812030075188,0.3886292834890966,0.4849699398797595,0.5382718801505548,0.5130523068280014,0.8776418122289941,0.39809788164553633,0.46415923362147143,0.4451259300414946,0.4776386065456221,-0.25543875103684177,0.04774931609052475,0.04833442666835588,0.0,0.29580911593759557,0.27926552295684814,0.5242473079548589,0.632084035793023,0.6310330629348755,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -1,2022.0,1,0.5407166123778502,0.5965417867435159,0.9326554671382258,0.49188311688311687,0.5,0.42600224803297115,0.5153256704980843,0.5382469728746202,0.5423248579660446,0.8712018643202526,0.4133664269810563,0.4635896862300199,0.45305412911862847,0.5097880138188646,-0.24930347300809638,0.04783875667799903,0.04938041570024613,0.0,0.27308507417499245,0.26489490270614624,-0.19554831088284996,0.614504544587809,0.6104874014854431,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -2,2019.0,1,0.5623931623931624,0.5625990491283677,0.8589656345695815,0.3341584158415842,0.4426229508196721,0.44052863436123346,0.5452823039029936,0.5403293808853606,0.5311791259117856,0.8735970003111929,0.3943366638089926,0.46535641588110904,0.44388496690103335,0.4705375056413739,-0.279462622342386,0.05025868440502587,0.05113363440615968,0.0,0.28154170430593195,0.3023858368396759,-0.613869665517935,0.5392124746118063,0.632472038269043,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -2,2020.0,1,0.4838709677419355,0.5262206148282098,0.8990526939017169,0.4548611111111111,0.49130434782608695,0.32677016281711474,0.41590800191662675,0.5501985392408713,0.5109522836960044,0.8754389771797882,0.3941959194429085,0.46203656399953613,0.44281420563924695,0.4648045911203806,-0.2659197918000082,0.04886475814412636,0.04996578478889472,0.0,0.283987915407855,0.2760101854801178,1.6228208239181277,0.6251378885211861,0.6234807968139648,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -2,2021.0,1,0.51,0.5457685664939551,0.9157973174366617,0.49032258064516127,0.49809160305343514,0.3954562957258375,0.47687717553455994,0.5382718801505548,0.5130523068280014,0.8776418122289941,0.39809788164553633,0.46415923362147143,0.4451259300414946,0.4776386065456221,-0.25543875103684177,0.047988002999250184,0.04833442666835588,0.0,0.2883906633906634,0.27926552295684814,0.5919873916392584,0.6303542411439714,0.6310330629348755,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -2,2022.0,1,0.5454545454545454,0.5729166666666666,0.9277628835269586,0.49226006191950467,0.5,0.4234034699150978,0.49310508796956726,0.5382469728746202,0.5423248579660446,0.8712018643202526,0.4133664269810563,0.4635896862300199,0.45305412911862847,0.5097880138188646,-0.24930347300809638,0.047920214059839455,0.04938041570024613,0.0,0.28468251579897685,0.26489490270614624,0.008759262125167755,0.6138374387371905,0.6104874014854431,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file +1,2019.0,1,0.5473484848484849,0.5792938360263316,0.8571240105540897,0.3613861386138614,0.45075757575757575,0.4463808675741,0.5457881057942211,0.5403293808853606,0.5311791259117856,0.8735970003111929,0.3943366638089926,0.46535641588110904,0.44388496690103335,0.4705375056413739,-0.279462622342386,0.05092236740968486,0.05113363440615968,0.0,0.28845030947097977,0.3023858368396759,-0.613869665517935,0.5508838865572937,0.632472038269043,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +1,2020.0,1,0.4481730052199851,0.527569775357386,0.9110823290911139,0.47388059701492535,0.49573378839590443,0.3173076923076923,0.40795559666975023,0.5501985392408713,0.5109522836960044,0.8754389771797882,0.3941959194429085,0.46203656399953613,0.44281420563924695,0.4648045911203806,-0.2659197918000082,0.04843439598902658,0.04996578478889472,0.0,0.3059328921397887,0.2760101854801178,1.5022466110530128,0.6261577252415308,0.6234807968139648,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +1,2021.0,1,0.4675141242937853,0.5346153846153846,0.9263714028776978,0.4893048128342246,0.4991922455573506,0.383004737887819,0.47518006618649017,0.5382718801505548,0.5130523068280014,0.8776418122289941,0.39809788164553633,0.46415923362147143,0.4451259300414946,0.4776386065456221,-0.25543875103684177,0.047591743119266054,0.04833442666835588,0.0,0.3269908386187456,0.27926552295684814,0.6372434247341834,0.6340757015879357,0.6310330629348755,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +1,2022.0,1,0.5352904434728295,0.5478455512031337,0.9328809306569343,0.49654218533886585,0.4975247524752475,0.4204396564274276,0.5049962990377498,0.5382469728746202,0.5423248579660446,0.8712018643202526,0.4133664269810563,0.4635896862300199,0.45305412911862847,0.5097880138188646,-0.24930347300809638,0.04749835727025251,0.04938041570024613,0.0,0.3176620076238882,0.26489490270614624,-0.1129759047239382,0.6148776589204475,0.6104874014854431,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file diff --git a/src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv b/src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv index dbdc9d645..d313b6bda 100644 --- a/src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv +++ b/src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv @@ -1,9 +1,5 @@ run,time,id_EmploymentStatistics1,labEmpShare,labEmpToNotEmpShare,labNotEmpToEmpShare,labUnempShare -1,2019.0,1,0.712445288628293,0.0,0.0,0.15533900404657694 -1,2020.0,1,0.7198201879852881,0.07584807844021188,0.40958832725377803,0.15243154883530854 -1,2021.0,1,0.7541834968263128,0.019022962629446194,0.39167556029882605,0.10963646855164455 -1,2022.0,1,0.7732375030283453,0.0258098223615465,0.3328488372093023,0.10078333198740208 -2,2019.0,1,0.7128238983330583,0.0,0.0,0.15514111239478462 -2,2020.0,1,0.7117235705471,0.0796871457719338,0.39155672823218995,0.15746606334841629 -2,2021.0,1,0.75,0.017728468489076978,0.37833675564681724,0.11656187954996691 -2,2022.0,1,0.7631877022653721,0.024775962045334738,0.3002754820936639,0.10582524271844661 \ No newline at end of file +1,2019.0,1,0.7135917645166479,0.0,0.0,0.15184172430432685 +1,2020.0,1,0.7168407723963279,0.08257598817237032,0.425625,0.1498258942703387 +1,2021.0,1,0.7525321479599937,0.015694287453264934,0.3779874213836478,0.10427051913002064 +1,2022.0,1,0.7654490868151114,0.024631142543592246,0.29690721649484536,0.09679134350763072 \ No newline at end of file diff --git a/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv b/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv index 229d12c93..1c2fcb174 100644 --- a/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv +++ b/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv @@ -1,25 +1,13 @@ run,time,id_HealthStatistics1,demLifeSatScore0to10Avg,demLifeSatScore0to10P10,demLifeSatScore0to10P25,demLifeSatScore0to10P50,demLifeSatScore0to10P75,demLifeSatScore0to10P90,demSex,healthLifeYearQualAdj,healthLifeYearWbAdj,healthMentalMcsAvg,healthMentalMcsP10,healthMentalMcsP25,healthMentalMcsP50,healthMentalMcsP75,healthMentalMcsP90,healthNObsSubGroup,healthPhysicalPcsAvg,healthPhysicalPcsP10,healthPhysicalPcsP25,healthPhysicalPcsP50,healthPhysicalPcsP75,healthPhysicalPcsP90,healthWbScore0to36Avg,healthWbScore0to36P10,healthWbScore0to36P25,healthWbScore0to36P50,healthWbScore0to36P75,healthWbScore0to36P90 -1,2019.0,1,6.798653101737303,3.33,5.0,8.0,8.33,8.33,Total,8313.63015908381,68496.43000000333,47.53391960297742,33.416,42.19,49.52,54.79,57.73,10075,51.020747394541296,36.17,47.59,54.51,57.49,59.64,11.50302729528536,6.0,8.0,10.0,13.0,19.0 -1,2019.0,1,6.82559311740912,3.33,5.0,8.0,8.33,8.33,Male,4178.113558218262,33718.430000001055,48.500955465587225,35.652,43.66,50.86,55.197500000000005,58.15,4940,51.79769838056671,39.08,49.0,54.77,57.49,59.31,10.857489878542511,6.0,8.0,10.0,12.0,17.0 -1,2019.0,1,6.77273612463507,3.33,5.0,8.0,8.33,8.33,Female,4135.516600865757,34778.000000001084,46.60360662122688,31.608,40.8,48.87,54.2,57.33,5135,50.27330087633859,34.18,45.74,54.03,57.49,59.89,12.124050632911393,6.0,8.0,11.0,14.0,21.0 -1,2020.0,1,6.568906195238606,3.7280345321936648,5.1573978456236915,6.694649618213386,8.15059638663807,9.394204110996757,Total,8218.824994156601,66996.27428523854,45.77913999332926,32.81715134888009,39.25280560946325,46.12554727169844,52.79793088536014,58.49922241641777,10199,51.331378886565744,37.999161680301796,45.530348453583485,52.294365442267704,58.36516460930966,63.364529715812715,12.715087198499903,5.6861670877116035,8.837566202384902,12.396694719727444,16.211421392067454,20.044244175828222 -1,2020.0,1,6.6343716746983805,3.795458596829506,5.194900740546059,6.758372698239147,8.205445249143672,9.46241568645686,Male,4131.434192875296,33138.68651511841,47.14848435035804,34.43356115312875,40.9744566726149,47.52023786180159,54.00821665132945,59.51107674022268,4995,51.97857490276504,39.286952297354716,46.645559471024974,52.78246097589111,58.51874578092821,63.4621577517758,11.933371889394637,5.2486799582150665,8.301151892075413,11.598209168010907,15.371764990571515,18.745220522068184 -1,2020.0,1,6.506069902021518,3.673854571626312,5.1208938555010945,6.629403711331793,8.110261002332628,9.335509205680513,Female,4087.390801281303,33857.58777011998,44.46479044233811,31.411211462584873,38.03043811141277,44.77349721338857,51.37524060073256,56.98748329623029,5204,50.710175177703746,36.79306286014092,44.53485220513723,51.70526516442504,58.2118243135553,63.278411868097876,13.465407715214232,6.137813631629358,9.501617102128497,13.159326374560248,17.082796625194714,21.140896103431686 -1,2021.0,1,6.613794192409188,3.8463282141063115,5.210249237311273,6.682739683389917,8.158902809900637,9.447323142674595,Total,8125.022769002852,66832.39031429484,45.53468859582486,32.18547360461642,38.64450086419309,45.71144876969965,52.48103910494709,58.55903640325659,10105,51.562299559225885,38.11657489776609,45.244192952394116,52.10605004786094,58.4248628014312,64.45412206022671,13.020476165037005,5.943166465818468,9.138355545316092,12.937320836316553,16.70946692779321,20.22064592877273 -1,2021.0,1,6.646009110361918,3.915322432233361,5.26621199427967,6.719696113964639,8.171758474667543,9.408459014238895,Male,4074.641199677886,32864.51505073968,46.99455277277545,33.74666146137077,40.3295900810582,47.142220019405585,53.788902545264946,59.90075661835038,4945,52.06361178476891,38.79420858185804,45.83212473374033,52.55338399794182,58.6016114945217,64.54716256439865,12.40564109788694,5.478566120867114,8.562305059263466,12.380171876363951,15.983807099876094,19.422832333091126 -1,2021.0,1,6.582921562704467,3.7839922185146726,5.165361839413469,6.64223909238078,8.134341535509124,9.477218049948089,Female,4050.38156932492,33967.87526355505,44.1356520929143,30.75097748691335,37.36499943142023,44.34461393252897,51.045326546489314,57.2171041239603,5160,51.08187534308021,37.28085341777665,44.67665017675078,51.65438687911177,58.24323724794006,64.32433412553291,13.60969310438915,6.413926333481789,9.694817004450192,13.554090530272937,17.354702982606543,20.843658383945645 -1,2022.0,1,6.580957533929906,3.8783415332734545,5.162722733790004,6.658377378527328,8.079567750822935,9.347815497019116,Total,8235.570533835424,68093.16760357274,45.488451176048216,32.349221473773476,38.758261022494175,45.48749469659377,52.320918331937186,58.58376675862219,10347,50.958826404937426,37.48448942733354,44.32090193446454,51.38303704120461,58.06689334141203,63.953657702377406,12.918295629533814,6.014607680777572,9.160764330536555,12.858077901887523,16.57069205143966,19.843032974427825 -1,2022.0,1,6.648257544468094,3.9367624980936773,5.244579203410486,6.711720799222085,8.178965148982513,9.411432800218192,Male,4135.7757382404725,33646.83143255302,46.69179962490331,33.910719867996846,40.065290819314995,46.71021698413794,53.292869655081866,59.42480199056996,5061,51.74897868918394,38.760432645234204,45.15203566250483,52.108564560295875,58.708533503770525,64.3897626085411,12.368557625489668,5.433218311987965,8.694432552768312,12.273524626876613,15.986044838280693,19.33313311971878 -1,2022.0,1,6.516522166292055,3.835535558101451,5.096347875931046,6.605524365941974,8.014934837398403,9.281673632389827,Female,4099.7947955949385,34446.3361710198,44.336323574902316,31.086923484686647,37.45930429900152,44.44551810693079,51.32396638551549,57.45668735423818,5286,50.20230716343714,36.61579287266246,43.597393832217385,50.479467270977864,57.41947445871641,63.530268900941294,13.444633888797346,6.57958875915759,9.700831241418284,13.416769961654007,17.06538235216716,20.276711344651503 -2,2019.0,1,6.799095596985654,3.33,5.0,8.0,8.33,8.33,Total,8323.349559890836,68562.08000000333,47.54007040856779,33.425,42.19,49.52,54.79,57.73,10084,51.027703292344626,36.18,47.605000000000004,54.51,57.49,59.64,11.495934153113843,6.0,8.0,10.0,13.0,19.0 -2,2019.0,1,6.828700485044678,3.33,5.0,8.0,8.33,8.33,Male,4185.2461878088,33788.410000001066,48.517956750202266,35.67,43.66,50.864999999999995,55.197500000000005,58.15,4948,51.791240905416245,39.079,49.0,54.77,57.49,59.31,10.851657235246565,6.0,8.0,10.0,12.0,17.0 -2,2019.0,1,6.770574376947251,3.33,5.0,8.0,8.33,8.33,Female,4138.103372082248,34773.67000000108,46.59797897196263,31.616000000000003,40.7925,48.835,54.2,57.33,5136,50.29211448598103,34.271,45.74,54.03,57.49,59.89,12.116627725856699,6.0,8.0,11.0,14.0,21.0 -2,2020.0,1,6.624915598904496,3.776489343404798,5.217146548747606,6.7536993849632125,8.217152005493473,9.473265693638094,Total,8170.864778124941,67044.1458609135,45.78122260706752,32.844438623354876,39.316447808525275,46.12132882799864,52.806521383056904,58.43138200670184,10120,51.43296375490332,38.04779001502157,45.632068088458354,52.32211138012006,58.42972775554907,63.36757565663351,12.939469171506065,5.922272212861546,9.098672596390028,12.624197699668247,16.424193941792623,20.254070718212233 -2,2020.0,1,6.722030079783013,3.891809713446567,5.287712240866176,6.841910579949203,8.300724237066408,9.556758530473209,Male,4090.371445649336,33361.435285963096,47.073154308531166,34.313572143864675,40.79290266063657,47.41073415987613,53.964035321038544,59.370472223664905,4963,51.81928370414118,38.95652203718212,46.539175021941254,52.622290740139604,58.36155725179692,63.20961565773363,12.112093335443365,5.4035666641459725,8.465723783356006,11.821562699980813,15.515381525423773,18.965605525376212 -2,2020.0,1,6.531454445404358,3.6914761840511385,5.136102686240959,6.653377558581718,8.130654759526987,9.373108942839785,Female,4080.4933324756075,33682.71057495027,44.53789178791599,31.422649858800177,38.12283089433704,44.80635410150461,51.46551666974245,57.14295728194734,5157,51.06117668721542,37.22627302617849,44.88791904989476,51.99793138917041,58.49515673057068,63.555292160050165,13.735720145789404,6.497813428081362,9.824309392793275,13.38704312861772,17.375096967390412,21.320499085102735 -2,2021.0,1,6.655099951792754,3.8937438055171696,5.273788111177874,6.724345322951498,8.185599306362782,9.463501389671691,Total,8087.315881806031,67023.51161450482,45.59598184765952,32.17350914982153,38.678902994363874,45.75144583830411,52.54523258606864,58.77594194580701,10071,51.456307407470234,38.02647588256498,45.12036431965614,52.00093517090513,58.35161035315186,64.32990408965814,13.228199686748749,6.117811310137299,9.304309079672429,13.124875389882307,16.86349586715943,20.530922109975194 -2,2021.0,1,6.7473840077218705,4.021043503519735,5.390400046060927,6.818811785089155,8.26913674698907,9.49059989427676,Male,4037.921425347276,33251.10839005338,46.96597567375093,33.59521049422269,40.30935506340731,47.140368531286164,53.784106613511284,60.071902858993234,4928,51.763276754087634,38.402597496459244,45.40713761771313,52.299273285772124,58.36753411917341,64.30393774346807,12.36876289350913,5.480068014950891,8.518489550694444,12.284890145400528,15.95881903587092,19.403608980481014 -2,2021.0,1,6.566673774927379,3.797705966572773,5.172730546642006,6.623284444865746,8.097530898095862,9.418877168053017,Female,4049.3944564587614,33772.40322445151,44.283259783693055,30.87366337945144,37.43008600593824,44.47611443562308,51.28343201689265,57.24434944439322,5143,51.162170728463494,37.507515208491576,44.731376294924814,51.70297774330306,58.307394463100465,64.33469622191046,14.05170824538853,6.866400567320482,10.169361435756306,14.011287387256003,17.75592559229638,21.329895393728222 -2,2022.0,1,6.615403631095151,3.8862514351969235,5.202216830818784,6.698550074637189,8.12646931634228,9.397811917523322,Total,8202.746648328868,68151.88820754224,45.47216187802264,32.2224132845585,38.72231422625332,45.44917950686405,52.42988549440548,58.576956305014434,10302,51.01294079094625,37.535328455558265,44.2339874606229,51.36583883035484,58.14748279495597,64.12339892954641,13.019963678974504,6.107181626579257,9.272589865911364,12.982414627681795,16.668472618229554,19.936741090996588 -2,2022.0,1,6.710812476945325,3.973644346695343,5.3046354426723985,6.79485113964944,8.236698393695502,9.483057599246404,Male,4102.165902055565,33795.651633896654,46.57849302231298,33.63335277950514,39.994618418989965,46.63806750287114,53.265646742059985,59.3418167138917,5036,51.658933731430935,38.586615378628125,44.91219231195396,51.97823949637993,58.66951437157549,64.49675505682671,12.275282693153917,5.377890642510175,8.61222153984142,12.15682633874466,15.972812372231669,19.17081689275878 -2,2022.0,1,6.524161901565848,3.8232942244681865,5.095337703664975,6.611134945881528,8.033478857305774,9.308698069719094,Female,4100.580746273328,34356.23657364576,44.41415131162535,31.133715957570526,37.5535898693926,44.43906110855374,51.42692396695702,57.73039353028882,5266,50.395162506046084,36.807416017170254,43.64037062758619,50.6069317097077,57.60659795704738,63.75917667197995,13.732119669212464,6.891693373683198,9.996048813604913,13.66565433842528,17.307676312170244,20.589574105572265 \ No newline at end of file +1,2019.0,1,6.7877918408418125,3.33,5.0,8.0,8.33,8.33,Total,21388.48135633042,175369.38999998907,47.56218106517993,33.61,42.2,49.44,54.79,57.93,25836,51.217823579501555,36.42,48.04,54.55,57.49,59.77599999999999,11.485098312432266,6.0,8.0,10.0,13.0,19.0 +1,2019.0,1,6.816047630313401,3.33,5.0,8.0,8.33,8.33,Male,10769.113602332875,86434.30000000424,48.650022080277445,35.63,43.69,51.0,55.37,58.23,12681,51.99034618720938,39.71,49.34,54.8,57.49,59.35,10.811923349893542,6.0,7.0,10.0,12.0,17.0 +1,2019.0,1,6.760554161915966,3.33,5.0,8.0,8.33,8.33,Female,10619.36775399707,88935.09000000454,46.513537058152465,32.18800000000001,40.82,48.53,54.2,57.33,13155,50.47313645001956,33.95,46.29,54.3,57.57,59.99,12.134017483846446,6.0,8.0,11.0,14.0,21.0 +1,2020.0,1,6.701766284897311,3.8401830351886805,5.286458924519426,6.828544614115597,8.300737014181053,9.566956194440772,Total,21330.21023599025,176504.41864534048,46.142364414000966,32.69940467549993,39.63852120790939,46.592661959037436,53.19022354969361,58.80519660507034,26337,51.46071633756074,37.91490368579426,45.69016279424652,52.574985934081596,58.544676752823165,63.45528219331468,12.59013724782269,5.721027318962799,8.719006591830656,12.231968092779862,16.017964592143628,19.931903121128137 +1,2020.0,1,6.7208371735058785,3.8873833556380046,5.325627538281179,6.839687646541547,8.286348986004839,9.554896989555917,Male,10716.413034351792,86860.09963038997,47.43276347122575,34.434499052628105,41.110094728214975,47.876229939481874,54.26967889355573,59.66233478546786,12924,51.96964855953861,39.440055858458436,46.4274627716552,52.93082654851512,58.62437823289849,63.45071964053251,11.789298342782075,5.182702620933735,8.107919757250704,11.44280124351518,15.08565503750675,18.685274921338728 +1,2020.0,1,6.683390666886689,3.779527733763709,5.24290683417464,6.818167888123205,8.313630051514044,9.583275551390665,Female,10613.797201638608,89644.31901495116,44.89900965253331,31.424571274726706,38.22522355206379,45.32084322386881,51.949279850372356,57.63118787248792,13413,50.97033834331271,36.418363070515326,45.002139432233456,52.17846691334944,58.43171963520046,63.464474512701855,13.361779834026002,6.297010498342713,9.40341518683007,13.044763448920968,16.874075047079987,20.807150641591814 +1,2021.0,1,6.7011167831169205,3.944302362849228,5.288865883605001,6.776511940139562,8.262308530272406,9.543108537625262,Total,21151.886225220504,175971.32672465034,45.716361639884276,32.3734140722189,38.71969624368392,45.87241024901067,52.797512685301186,58.77973850453179,26260,51.66778398743475,37.78544321937561,45.0976490908231,52.26455221837526,58.93783599359041,64.7165847786476,12.808554417923613,5.7327272217930805,8.933218042350072,12.698376812774534,16.497958151536718,19.950720489255456 +1,2021.0,1,6.723767195753481,3.9826012305885916,5.310573574197775,6.811305654212143,8.254970500177574,9.556324127257618,Male,10589.745249033345,86568.50264532607,47.07884340212797,34.07656099564574,40.35288561323175,47.14811867861577,54.00431039337622,59.84198411294865,12875,51.98794548902854,38.49262697956987,45.43879594661617,52.42049257687139,59.076562518631846,64.75537452687892,12.082463849605455,5.151053444648805,8.285365267997395,11.980119983997897,15.649714517703012,18.98359918240653 +1,2021.0,1,6.6793294045068565,3.8947837916798176,5.268040765792659,6.742266150238834,8.267198353984934,9.530000974547399,Female,10562.14097618714,89402.82407932427,44.40579363921979,31.171931396033965,37.37110039284121,44.51149426262158,51.52246929197595,57.648830038121474,13385,51.35982139251413,36.878548600697904,44.69464068180304,52.08295008918855,58.822354984237535,64.67768897274942,13.506979226821267,6.353964065394251,9.656667857186914,13.379815645963022,17.217799655778933,20.71645828893422 +1,2022.0,1,6.575229504834014,3.830384767112056,5.166076155009721,6.643677968106744,8.109137704573211,9.373617332789198,Total,21252.446999702323,175420.54795946667,45.551659885823916,32.2405882097169,38.64308670430218,45.555902548538285,52.57592879750717,58.8410367787242,26679,51.14595875385759,37.39106793887783,44.349745859615915,51.564012110123585,58.367202728167435,64.58948386519519,12.746150975973903,5.721451573958824,8.994759066278784,12.657366544423875,16.385219729226993,19.80917515916106 +1,2022.0,1,6.593382148522038,3.8568889060207607,5.190784077339975,6.6651974445466085,8.117212256735561,9.358873175269729,Male,10638.929041325895,86083.19733110373,46.89842584508911,34.06185247596065,40.2139508762302,46.95081218343542,53.7626522810527,59.95109486586963,13056,51.60155298422989,38.1839467388982,44.81485950898193,51.96227377101985,58.72763528598655,64.82478027352828,12.179170983380688,5.281928784710583,8.50873789528479,12.08529635787276,15.707140755095926,19.103978068806736 +1,2022.0,1,6.557832388487217,3.8081227827729234,5.147995443534185,6.6269097484900845,8.09822244119456,9.391489043633431,Female,10613.517958376635,89337.35062836135,44.26094738753654,30.86889312710784,37.29134857781348,44.18884045818346,51.31117475442121,57.691021802032026,13623,50.70932671453056,36.56105453658231,43.850637005660154,51.182507351886215,58.08683018188721,64.28274709154108,13.289532814283863,6.229620194814191,9.498388752128726,13.219449088432011,16.963510009687965,20.417145259591233 \ No newline at end of file diff --git a/src/test/java/simpaths/integrationtest/expected/Statistics1.csv b/src/test/java/simpaths/integrationtest/expected/Statistics1.csv index 87829eb5b..0559c9e46 100644 --- a/src/test/java/simpaths/integrationtest/expected/Statistics1.csv +++ b/src/test/java/simpaths/integrationtest/expected/Statistics1.csv @@ -1,9 +1,5 @@ run,time,id_Statistics1,edi_p50,sIndex_p50,statYHhDispEquivNatGini,statYMktNatGini,yHhDispEquivP50,yHhQuintilesC5P20,yHhQuintilesC5P40,yHhQuintilesC5P60,yHhQuintilesC5P80,yLabP20,yLabP40,yLabP60,yLabP80 -1,2019.0,1,15256.953965109053,0.0,0.0,0.0,15456.781759590931,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -1,2020.0,1,15494.33940839168,0.0,0.0,0.0,15494.33940839168,5.069328576701166,7.309558066126921,8.053784068849202,8.629647308681838,496.95130739470744,1329.786987235312,2245.633585018565,3702.082767834228 -1,2021.0,1,15795.98461666872,0.0,0.0,0.0,15801.592949392198,5.786759852654809,7.432914372241713,8.117165781544978,8.68839908031111,691.8380631103834,1441.4051308067535,2391.7198830795433,4020.259615974613 -1,2022.0,1,16176.124246500869,0.0,0.0,0.0,16182.763325113257,5.921345043614325,7.461136632914112,8.149552314896253,8.710796219928115,632.4099002222833,1440.3396796778472,2359.8435096547473,3975.898696861888 -2,2019.0,1,15256.926298340906,0.0,0.0,0.0,15450.417507924612,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -2,2020.0,1,16098.514888746395,0.0,0.0,0.0,16096.93059641256,4.769251305876071,7.3425239304769985,8.134276908628477,8.767225857306094,526.3499365600559,1517.2111935090763,2641.0746984931116,4495.057131940739 -2,2021.0,1,16623.39379793267,0.0,0.0,0.0,16623.59531070832,5.7104111946254985,7.490017765268533,8.240670492549269,8.8241653457063,740.0167668995036,1688.633193134877,2815.5377430189255,4774.736714969861 -2,2022.0,1,16869.07589913759,0.0,0.0,0.0,16869.07589913759,5.824447208207177,7.499192062689555,8.245555860954243,8.840353675418474,693.7979832467204,1654.1123172848331,2775.0120164178047,4654.001952345548 \ No newline at end of file +1,2019.0,1,15295.02539940983,0.0,0.0,0.0,15490.381656238715,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +1,2020.0,1,14855.758330056642,0.0,0.0,0.0,14873.36489466496,5.7186490359867115,7.291602867439664,7.928614289011746,8.478077201321138,529.3963344928553,1186.0620009142672,1917.0873691357885,3229.8845804698967 +1,2021.0,1,15154.277016239876,0.0,0.0,0.0,15157.447793085172,6.168505526210029,7.388923360307476,7.978673322585567,8.50696709242758,644.5231834138531,1252.2889664722493,1999.2293910082874,3286.447805259845 +1,2022.0,1,15011.112916230086,0.0,0.0,0.0,15013.137223190799,6.249703489781575,7.38893259261191,7.958155740737028,8.49085280069897,609.8778755105863,1205.6800989055366,1921.42705305321,3171.166561809515 \ No newline at end of file diff --git a/src/test/java/simpaths/integrationtest/expected/Statistics21.csv b/src/test/java/simpaths/integrationtest/expected/Statistics21.csv index 3d31e38b7..353ef42a4 100644 --- a/src/test/java/simpaths/integrationtest/expected/Statistics21.csv +++ b/src/test/java/simpaths/integrationtest/expected/Statistics21.csv @@ -1,9 +1,5 @@ run,time,id_Statistics21,demDsbl18to29Share,demDsbl30to54Share,demDsbl55to74Share,demMarried18to29Share,demMarried30to54Share,demMarried55to74Share,demNChild18to29Avg,demNChild30to54Avg,demNChild55to74Avg,demPop18to29N,demPop30to54N,demPop55to74N,healthScore18to29Avg,healthScore30to54Avg,healthScore55to74Avg,labNoWork18to29Share,labNoWork18to54Share,labNoWork30to54Share,labNoWork55to74Share,labWorkFullTime18to29Share,labWorkFullTime30to54Share,labWorkFullTime55to74Share,labWorkPartTime18to29Share,labWorkPartTime30to54Share,labWorkPartTime55to74Share,statInvestLoss18to29Avg,statInvestLoss30to54Avg,statInvestLoss55to74Avg,statYDisp18to29Avg,statYDisp30to54Avg,statYDisp55to74Avg,statYDispGrossOfLosses18to29Avg,statYDispGrossOfLosses30to54Avg,statYDispGrossOfLosses55to75Avg,statYInvest18to29Avg,statYInvest30to54Avg,statYInvest55to74Avg,statYLab18to29Avg,statYLab30to54Avg,statYLab55to74Avg,statYPens18to29Avg,statYPens30to54Avg,statYPens55to74Avg,wealth18to29Avg,wealth30to54Avg,wealth55to74Avg,x18to29Avg,x18to54Avg,x30to54Avg,x55to74Avg,xToLeisureRatio -1,2019.0,1,0.05811554332874828,0.09130434782608696,0.06236811254396248,0.2620357634112792,0.6720496894409937,0.5969519343493552,0.29332874828060523,0.9503105590062112,0.07409144196951935,2908.0,6440.0,4265.0,3.69050894085282,3.4482919254658384,3.092379835873388,0.0021834914718019127,-0.0201199603173437,-0.02022802981366459,0.036602920750293144,0.561554332874828,0.6751552795031056,0.2797186400937866,0.09353507565337002,0.140527950310559,0.08253223915592028,0.0,0.0,0.0,-220.98483429553175,-459.2130693789786,-563.0006789520651,1065.2273871330394,1640.3078493710213,1515.844915690792,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.34744375,-1108.3894350892856,-1343.6696142857143,-1403.9432562499999,NaN -1,2020.0,1,0.05670103092783505,0.07876923076923077,0.09542513863216266,0.42508591065292095,0.7641538461538462,0.6559611829944547,0.3436426116838488,0.9632307692307692,0.08086876155268022,2910.0,6500.0,4328.0,3.5814432989690723,3.348923076923077,3.0355822550831792,0.005039223024054962,-0.034611558800407616,-0.042544799999999994,0.020619049537892842,0.5034364261168385,0.7423076923076923,0.3200092421441775,0.14879725085910653,0.09569230769230769,0.05822550831792976,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.109781887632,-1107.8092946183485,-1342.906854946029,-1403.8502432182481,2.8910432170695533 -1,2021.0,1,0.043754410726887794,0.06522078327352161,0.07813211845102505,0.40578687367678196,0.7768762677484787,0.669248291571754,0.3405081157374735,0.9614604462474645,0.08610478359908884,2834.0,6409.0,4390.0,3.544107268877911,3.363863317210173,3.071753986332574,-0.014569019548341555,-0.06686049378713416,-0.08206079313465439,-0.016863739863325677,0.518348623853211,0.7913871118739273,0.3562642369020501,0.15349329569513057,0.0861288812607271,0.05945330296127563,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.0724367042129,-1107.7779481616933,-1342.8822879361044,-1403.8187668256835,-0.5089642681537601 -1,2022.0,1,0.05143456962911127,0.06444748442012464,0.09497964721845319,0.3460461861441568,0.7593859249126007,0.6702849389416553,0.33100069979006297,0.9554643562851497,0.09203980099502487,2858.0,6579.0,4422.0,3.412526242127362,3.292749658002736,2.9696969696969697,-0.037268737508747374,-0.08980236318637708,-0.10088162930536555,-0.04076628141112615,0.5255423372988104,0.8062015503875969,0.3817277250113071,0.16899930020993703,0.09013527891776865,0.05789235639981909,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.0535119014452,-1107.7658424396789,-1342.8777907378258,-1403.764139386643,-0.3635084069804372 -2,2019.0,1,0.05807560137457045,0.09109248913718188,0.0625732364659011,0.26082474226804125,0.6719428926132837,0.5978439184438715,0.2934707903780069,0.9497206703910615,0.07429107101007734,2910.0,6444.0,4267.0,3.689347079037801,3.450651769087523,3.089289899226623,0.0019464395189003336,-0.020478632743557712,-0.020652807448789584,0.036303999203187276,0.5618556701030928,0.675667287399131,0.28005624560581205,0.09347079037800687,0.1404407200496586,0.0824935551910007,0.0,0.0,0.0,-220.29699124714057,-458.1635502021104,-560.3573828031367,1065.9152301814306,1641.3573685478896,1518.4882118397204,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.34744375,-1108.3894350892856,-1343.6696142857143,-1403.9432562499999,NaN -2,2020.0,1,0.059231035677173534,0.0781055900621118,0.09787626962142197,0.4170419120193973,0.761335403726708,0.6574330563250231,0.33391063387599584,0.962111801242236,0.0840258541089566,2887.0,6440.0,4332.0,3.55975060616557,3.3436335403726707,3.0267774699907664,0.017162058295808802,-0.026532691368328587,-0.036687657142857155,0.026508462973222513,0.49393834430204364,0.7399068322981367,0.3183287165281625,0.14617249740214755,0.0922360248447205,0.054016620498614956,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.1227976163736,-1107.8144560713527,-1342.906595208822,-1403.855152358859,0.3748472749862686 -2,2021.0,1,0.04962779156327544,0.06609240407204385,0.084359325125399,0.39844026940801136,0.7757243539545811,0.6671226630186958,0.34420418291386035,0.9498825371965545,0.0898312813497492,2821.0,6385.0,4386.0,3.549805033676001,3.3580266249021142,3.059279525763794,-0.009511928075150666,-0.062234853090052944,-0.07768497227877838,-0.012910905882352885,0.5147110953562567,0.7899765074393109,0.34997720018239853,0.15207373271889402,0.08316366483946751,0.0617875056999544,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.0543503788643,-1107.7773936439316,-1342.8926506882299,-1403.8493327175618,-0.9308433118067843 -2,2022.0,1,0.05493741307371349,0.06498470948012232,0.09533514492753623,0.35048678720445064,0.7593272171253823,0.667572463768116,0.3410987482614743,0.9327217125382263,0.09329710144927536,2876.0,6540.0,4416.0,3.4113351877607787,3.291896024464832,2.957880434782609,-0.02040442962447847,-0.08041420092539037,-0.0927710996941896,-0.035702359420289764,0.5142559109874826,0.8021406727828746,0.37296195652173914,0.16342141863699583,0.08608562691131498,0.06159420289855073,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.0286754851826,-1107.7676383979426,-1342.8933862537576,-1403.808394859815,0.31595143246095514 \ No newline at end of file +1,2019.0,1,0.05455515539549153,0.09138317870353527,0.06602914389799636,0.27344271041750035,0.6669092232126614,0.6289617486338798,0.29825263438708816,0.9494269601600873,0.07231329690346083,7497.0,16491.0,10980.0,3.6808056555955715,3.456976532654175,3.093169398907104,0.009146982966519945,-0.021676254083733693,-0.030389199975744352,0.04074815336976323,0.5587568360677604,0.6840094597052938,0.274408014571949,0.08936908096571962,0.14183494027045054,0.0836976320582878,0.0,0.0,0.0,-239.6428395925377,-464.6937887966651,-556.7492423475169,1046.5693818360335,1634.8271299533349,1522.0963522953402,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.34744375,-1108.3894350892856,-1343.6696142857143,-1403.9432562499999,NaN +1,2020.0,1,0.054075652637187,0.09685879477856589,0.0670006261740764,0.41022908897176347,0.7581212374083567,0.6640128812952858,0.3195258391049547,0.9869464147344579,0.07880848018606315,7508.0,16777.0,11179.0,3.566595631326585,3.371282112415807,3.030861436622238,0.01941994315396911,-0.03247953796526054,-0.03913978122429518,0.012414941425887838,0.5003995737879595,0.7429814627168146,0.3307988192145988,0.1374533830580714,0.09161351850748048,0.05564003935951337,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.1286986426642,-1107.7646339986973,-1342.8216675317444,-1403.8338940034157,-0.2818097066589831 +1,2021.0,1,0.040714189097795214,0.08269819360259258,0.05199964686148142,0.4070066278912485,0.7726099741943228,0.6716694623466054,0.3281482483430272,0.9740142831422913,0.08484152908978547,7393.0,16663.0,11327.0,3.5620181252536183,3.389065594430775,3.0848415290897853,-0.005516224847829043,-0.06658590740751208,-0.0801374303786833,-0.022705306559547944,0.5249560394968213,0.7927744103702815,0.36461552043789175,0.13783308535100772,0.08281822000840185,0.05694358612165622,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.0937169052081,-1107.7335087035208,-1342.7961121774229,-1403.8462237108963,0.473215627983804 +1,2022.0,1,0.04590818363273453,0.09656029838375466,0.053246639135401105,0.3507651363938789,0.7547806524184477,0.6705034706967753,0.3324018629407851,0.9586762181043159,0.08672348651260874,7515.0,16891.0,11381.0,3.439787092481703,3.287371973240187,2.956945786837712,-0.014716454624085162,-0.08279135496688739,-0.0898683450831804,-0.050843063193040994,0.5164337990685296,0.7993014031140844,0.3904753536596081,0.15555555555555556,0.08602214196909597,0.059221509533432914,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.0620900915467,-1107.7204272199017,-1342.7949338310398,-1403.8189541897889,-0.10158894241665184 \ No newline at end of file From 76f92f7b38ca2a4b45814714e9ff53400295b325 Mon Sep 17 00:00:00 2001 From: dav-sonn <62243276+dav-sonn@users.noreply.github.com> Date: Tue, 2 Jun 2026 11:47:01 +0100 Subject: [PATCH 2/2] Align integration tests to the EU variant Increase integration runs in test config (maxNumberOfRuns 1->2), adjust randomSeed and popSize, and update the numeric comparison in RunSimPathsIntegrationTest to use combined absolute+relative epsilons with proper NaN/Infinity handling (remove old tolerance method). Update expected integration output CSVs to include results for the additional runs and reflect the seed/population changes (AlignmentAdjustmentFactors1.csv, EmploymentStatistics1.csv, HealthStatistics1.csv, Statistics1.csv, Statistics21.csv). --- config/test_run.yml | 6 ++-- .../RunSimPathsIntegrationTest.java | 31 +++++++++------- .../expected/AlignmentAdjustmentFactors1.csv | 12 ++++--- .../expected/EmploymentStatistics1.csv | 12 ++++--- .../expected/HealthStatistics1.csv | 36 ++++++++++++------- .../integrationtest/expected/Statistics1.csv | 12 ++++--- .../integrationtest/expected/Statistics21.csv | 12 ++++--- 7 files changed, 77 insertions(+), 44 deletions(-) diff --git a/config/test_run.yml b/config/test_run.yml index f5695ea6e..92a0cf6a6 100644 --- a/config/test_run.yml +++ b/config/test_run.yml @@ -1,12 +1,12 @@ # This file can be used to override defaults for multirun arguments. # Arguments of the SimPathsMultiRun object overridden by the command-line -maxNumberOfRuns: 1 +maxNumberOfRuns: 2 executeWithGui: false -randomSeed: 606 +randomSeed: 100 startYear: 2019 endYear: 2022 -popSize: 50000 +popSize: 20000 integrationTest: true collector_args: diff --git a/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java b/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java index 5df147d4f..04f57fbe6 100644 --- a/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java +++ b/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java @@ -17,7 +17,10 @@ @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class RunSimPathsIntegrationTest { - private static final double NUMERIC_RELATIVE_TOLERANCE = 0.01; + /** Absolute epsilon for numeric comparison. */ + private static final double ABS_EPSILON = 1e-9; + /** Relative epsilon for numeric comparison. */ + private static final double REL_EPSILON = 1e-6; @Test @DisplayName("Initial database setup runs successfully") @@ -187,7 +190,20 @@ private boolean tokensMatchWithTolerance(String expectedToken, String actualToke Double actualNumber = tryParseDouble(actualTrimmed); if (expectedNumber != null && actualNumber != null) { - return numbersMatchWithTolerance(expectedNumber, actualNumber); + double e = expectedNumber; + double a = actualNumber; + if (Double.isNaN(e) && Double.isNaN(a)) { + return true; + } + if (Double.isNaN(e) || Double.isNaN(a)) { + return false; + } + if (Double.isInfinite(e) || Double.isInfinite(a)) { + return Double.compare(e, a) == 0; + } + double diff = Math.abs(e - a); + double tolerance = Math.max(ABS_EPSILON, REL_EPSILON * Math.max(Math.abs(e), Math.abs(a))); + return diff <= tolerance; } return expectedToken.equals(actualToken); @@ -201,17 +217,6 @@ private Double tryParseDouble(String value) { } } - private boolean numbersMatchWithTolerance(double expectedNumber, double actualNumber) { - if (!Double.isFinite(expectedNumber) || !Double.isFinite(actualNumber)) { - return Double.compare(expectedNumber, actualNumber) == 0; - } - - double absoluteDifference = Math.abs(expectedNumber - actualNumber); - double relativeDifferenceLimit = NUMERIC_RELATIVE_TOLERANCE * Math.max(Math.abs(expectedNumber), Math.abs(actualNumber)); - - return absoluteDifference <= relativeDifferenceLimit; - } - private void runCommand(String... args) { try { ProcessBuilder processBuilder = new ProcessBuilder(); diff --git a/src/test/java/simpaths/integrationtest/expected/AlignmentAdjustmentFactors1.csv b/src/test/java/simpaths/integrationtest/expected/AlignmentAdjustmentFactors1.csv index c83132436..6d1cb2fca 100644 --- a/src/test/java/simpaths/integrationtest/expected/AlignmentAdjustmentFactors1.csv +++ b/src/test/java/simpaths/integrationtest/expected/AlignmentAdjustmentFactors1.csv @@ -1,5 +1,9 @@ run,time,id_AlignmentAdjustmentFactors1,empShareSimACFemales,empShareSimACMales,empShareSimCouples,empShareSimSingleDepFemales,empShareSimSingleDepMales,empShareSimSingleFemales,empShareSimSingleMales,empShareTgtACFemales,empShareTgtACMales,empShareTgtCouples,empShareTgtSingleDepFemales,empShareTgtSingleDepMales,empShareTgtSingleFemales,empShareTgtSingleMales,fertilityAdjFactor,fertilityRateSim,fertilityRateTgt,inSchoolAdjFactor,inSchoolShareSim,inSchoolShareTgt,partnershipAdjFactor,shareCohabitingSim,shareCohabitingTgt,utilityAdjACFemales,utilityAdjACMales,utilityAdjCouples,utilityAdjSingleDepFemales,utilityAdjSingleDepMales,utilityAdjSingleFemales,utilityAdjSingleMales -1,2019.0,1,0.5473484848484849,0.5792938360263316,0.8571240105540897,0.3613861386138614,0.45075757575757575,0.4463808675741,0.5457881057942211,0.5403293808853606,0.5311791259117856,0.8735970003111929,0.3943366638089926,0.46535641588110904,0.44388496690103335,0.4705375056413739,-0.279462622342386,0.05092236740968486,0.05113363440615968,0.0,0.28845030947097977,0.3023858368396759,-0.613869665517935,0.5508838865572937,0.632472038269043,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -1,2020.0,1,0.4481730052199851,0.527569775357386,0.9110823290911139,0.47388059701492535,0.49573378839590443,0.3173076923076923,0.40795559666975023,0.5501985392408713,0.5109522836960044,0.8754389771797882,0.3941959194429085,0.46203656399953613,0.44281420563924695,0.4648045911203806,-0.2659197918000082,0.04843439598902658,0.04996578478889472,0.0,0.3059328921397887,0.2760101854801178,1.5022466110530128,0.6261577252415308,0.6234807968139648,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -1,2021.0,1,0.4675141242937853,0.5346153846153846,0.9263714028776978,0.4893048128342246,0.4991922455573506,0.383004737887819,0.47518006618649017,0.5382718801505548,0.5130523068280014,0.8776418122289941,0.39809788164553633,0.46415923362147143,0.4451259300414946,0.4776386065456221,-0.25543875103684177,0.047591743119266054,0.04833442666835588,0.0,0.3269908386187456,0.27926552295684814,0.6372434247341834,0.6340757015879357,0.6310330629348755,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -1,2022.0,1,0.5352904434728295,0.5478455512031337,0.9328809306569343,0.49654218533886585,0.4975247524752475,0.4204396564274276,0.5049962990377498,0.5382469728746202,0.5423248579660446,0.8712018643202526,0.4133664269810563,0.4635896862300199,0.45305412911862847,0.5097880138188646,-0.24930347300809638,0.04749835727025251,0.04938041570024613,0.0,0.3176620076238882,0.26489490270614624,-0.1129759047239382,0.6148776589204475,0.6104874014854431,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file +1,2019.0,1,0.5623931623931624,0.5619047619047619,0.8590878148400273,0.3333333333333333,0.44308943089430897,0.43822697265011,0.5445244410761653,0.5403293808853606,0.5311791259117856,0.8735970003111929,0.3943366638089926,0.46535641588110904,0.44388496690103335,0.4705375056413739,-0.279462622342386,0.05029585798816568,0.05113363440615968,0.0,0.281711358843025,0.3023858368396759,-0.613869665517935,0.5387792565396972,0.632472038269043,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +1,2020.0,1,0.4572025052192067,0.5439252336448598,0.9011560693641618,0.4639175257731959,0.4928571428571429,0.3284644194756554,0.42614440773949974,0.5501985392408713,0.5109522836960044,0.8754389771797882,0.3941959194429085,0.46203656399953613,0.44281420563924695,0.4648045911203806,-0.2659197918000082,0.04826913700633837,0.04996578478889472,0.0,0.29220583809810413,0.2760101854801178,1.5824384150734823,0.6261676222379695,0.6234807968139648,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +1,2021.0,1,0.4908722109533469,0.5415162454873647,0.9236131280859715,0.4889589905362776,0.5,0.39237581825182904,0.47211350293542076,0.5382718801505548,0.5130523068280014,0.8776418122289941,0.39809788164553633,0.46415923362147143,0.4451259300414946,0.4776386065456221,-0.25543875103684177,0.04734895191122072,0.04833442666835588,0.0,0.31303030303030305,0.27926552295684814,0.6108032645394403,0.6330322580645161,0.6310330629348755,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +1,2022.0,1,0.4772344013490725,0.5787037037037037,0.9318777292576419,0.4968051118210863,0.49166666666666664,0.4214630523579651,0.4913023037141514,0.5382469728746202,0.5423248579660446,0.8712018643202526,0.4133664269810563,0.4635896862300199,0.45305412911862847,0.5097880138188646,-0.24930347300809638,0.047469879518072286,0.04938041570024613,0.0,0.3028588445503276,0.26489490270614624,-0.08224154272219575,0.6154919748778785,0.6104874014854431,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2,2019.0,1,0.5623931623931624,0.5625990491283677,0.8589656345695815,0.3341584158415842,0.4426229508196721,0.44052863436123346,0.5452823039029936,0.5403293808853606,0.5311791259117856,0.8735970003111929,0.3943366638089926,0.46535641588110904,0.44388496690103335,0.4705375056413739,-0.279462622342386,0.05025868440502587,0.05113363440615968,0.0,0.28154170430593195,0.3023858368396759,-0.613869665517935,0.5392124746118063,0.632472038269043,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2,2020.0,1,0.4978813559322034,0.515828677839851,0.8992361927144535,0.4641638225255973,0.4933920704845815,0.32093198045847426,0.4190655969797074,0.5501985392408713,0.5109522836960044,0.8754389771797882,0.3941959194429085,0.46203656399953613,0.44281420563924695,0.4648045911203806,-0.2659197918000082,0.048672566371681415,0.04996578478889472,0.0,0.29518619436875565,0.2760101854801178,1.6128880808812671,0.6256224535989136,0.6234807968139648,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2,2021.0,1,0.522633744855967,0.5334538878842676,0.9188473978241694,0.49050632911392406,0.5,0.3835774865073246,0.4631992149165849,0.5382718801505548,0.5130523068280014,0.8776418122289941,0.39809788164553633,0.46415923362147143,0.4451259300414946,0.4776386065456221,-0.25543875103684177,0.05064870259481038,0.04833442666835588,0.0,0.30357688780189546,0.27926552295684814,0.6260778621212384,0.6321115796302303,0.6310330629348755,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2,2022.0,1,0.4809688581314879,0.5720930232558139,0.9282768777614139,0.495253164556962,0.492156862745098,0.42316176470588235,0.4920856610800745,0.5382469728746202,0.5423248579660446,0.8712018643202526,0.4133664269810563,0.4635896862300199,0.45305412911862847,0.5097880138188646,-0.24930347300809638,0.04760753987433543,0.04938041570024613,0.0,0.3075771188978736,0.26489490270614624,-0.030286161899442665,0.6137847948766724,0.6104874014854431,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file diff --git a/src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv b/src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv index d313b6bda..19826eaf1 100644 --- a/src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv +++ b/src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv @@ -1,5 +1,9 @@ run,time,id_EmploymentStatistics1,labEmpShare,labEmpToNotEmpShare,labNotEmpToEmpShare,labUnempShare -1,2019.0,1,0.7135917645166479,0.0,0.0,0.15184172430432685 -1,2020.0,1,0.7168407723963279,0.08257598817237032,0.425625,0.1498258942703387 -1,2021.0,1,0.7525321479599937,0.015694287453264934,0.3779874213836478,0.10427051913002064 -1,2022.0,1,0.7654490868151114,0.024631142543592246,0.29690721649484536,0.09679134350763072 \ No newline at end of file +1,2019.0,1,0.712445288628293,0.0,0.0,0.15533900404657694 +1,2020.0,1,0.7192882213696841,0.07632730946234145,0.4062992125984252,0.15141621092155744 +1,2021.0,1,0.7567169069462647,0.016856441169903997,0.3763955342902711,0.10468545216251639 +1,2022.0,1,0.7671254930371086,0.024914356898162567,0.29037149355572406,0.09820494244546406 +2,2019.0,1,0.7128238983330583,0.0,0.0,0.15514111239478462 +2,2020.0,1,0.712516404199475,0.07951725693661177,0.38656795346377576,0.15616797900262466 +2,2021.0,1,0.7503300330033004,0.018074343526202113,0.36666666666666664,0.1117986798679868 +2,2022.0,1,0.7626559356136821,0.02367235780873573,0.29466192170818506,0.09995975855130784 \ No newline at end of file diff --git a/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv b/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv index 1c2fcb174..bc7752b22 100644 --- a/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv +++ b/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv @@ -1,13 +1,25 @@ run,time,id_HealthStatistics1,demLifeSatScore0to10Avg,demLifeSatScore0to10P10,demLifeSatScore0to10P25,demLifeSatScore0to10P50,demLifeSatScore0to10P75,demLifeSatScore0to10P90,demSex,healthLifeYearQualAdj,healthLifeYearWbAdj,healthMentalMcsAvg,healthMentalMcsP10,healthMentalMcsP25,healthMentalMcsP50,healthMentalMcsP75,healthMentalMcsP90,healthNObsSubGroup,healthPhysicalPcsAvg,healthPhysicalPcsP10,healthPhysicalPcsP25,healthPhysicalPcsP50,healthPhysicalPcsP75,healthPhysicalPcsP90,healthWbScore0to36Avg,healthWbScore0to36P10,healthWbScore0to36P25,healthWbScore0to36P50,healthWbScore0to36P75,healthWbScore0to36P90 -1,2019.0,1,6.7877918408418125,3.33,5.0,8.0,8.33,8.33,Total,21388.48135633042,175369.38999998907,47.56218106517993,33.61,42.2,49.44,54.79,57.93,25836,51.217823579501555,36.42,48.04,54.55,57.49,59.77599999999999,11.485098312432266,6.0,8.0,10.0,13.0,19.0 -1,2019.0,1,6.816047630313401,3.33,5.0,8.0,8.33,8.33,Male,10769.113602332875,86434.30000000424,48.650022080277445,35.63,43.69,51.0,55.37,58.23,12681,51.99034618720938,39.71,49.34,54.8,57.49,59.35,10.811923349893542,6.0,7.0,10.0,12.0,17.0 -1,2019.0,1,6.760554161915966,3.33,5.0,8.0,8.33,8.33,Female,10619.36775399707,88935.09000000454,46.513537058152465,32.18800000000001,40.82,48.53,54.2,57.33,13155,50.47313645001956,33.95,46.29,54.3,57.57,59.99,12.134017483846446,6.0,8.0,11.0,14.0,21.0 -1,2020.0,1,6.701766284897311,3.8401830351886805,5.286458924519426,6.828544614115597,8.300737014181053,9.566956194440772,Total,21330.21023599025,176504.41864534048,46.142364414000966,32.69940467549993,39.63852120790939,46.592661959037436,53.19022354969361,58.80519660507034,26337,51.46071633756074,37.91490368579426,45.69016279424652,52.574985934081596,58.544676752823165,63.45528219331468,12.59013724782269,5.721027318962799,8.719006591830656,12.231968092779862,16.017964592143628,19.931903121128137 -1,2020.0,1,6.7208371735058785,3.8873833556380046,5.325627538281179,6.839687646541547,8.286348986004839,9.554896989555917,Male,10716.413034351792,86860.09963038997,47.43276347122575,34.434499052628105,41.110094728214975,47.876229939481874,54.26967889355573,59.66233478546786,12924,51.96964855953861,39.440055858458436,46.4274627716552,52.93082654851512,58.62437823289849,63.45071964053251,11.789298342782075,5.182702620933735,8.107919757250704,11.44280124351518,15.08565503750675,18.685274921338728 -1,2020.0,1,6.683390666886689,3.779527733763709,5.24290683417464,6.818167888123205,8.313630051514044,9.583275551390665,Female,10613.797201638608,89644.31901495116,44.89900965253331,31.424571274726706,38.22522355206379,45.32084322386881,51.949279850372356,57.63118787248792,13413,50.97033834331271,36.418363070515326,45.002139432233456,52.17846691334944,58.43171963520046,63.464474512701855,13.361779834026002,6.297010498342713,9.40341518683007,13.044763448920968,16.874075047079987,20.807150641591814 -1,2021.0,1,6.7011167831169205,3.944302362849228,5.288865883605001,6.776511940139562,8.262308530272406,9.543108537625262,Total,21151.886225220504,175971.32672465034,45.716361639884276,32.3734140722189,38.71969624368392,45.87241024901067,52.797512685301186,58.77973850453179,26260,51.66778398743475,37.78544321937561,45.0976490908231,52.26455221837526,58.93783599359041,64.7165847786476,12.808554417923613,5.7327272217930805,8.933218042350072,12.698376812774534,16.497958151536718,19.950720489255456 -1,2021.0,1,6.723767195753481,3.9826012305885916,5.310573574197775,6.811305654212143,8.254970500177574,9.556324127257618,Male,10589.745249033345,86568.50264532607,47.07884340212797,34.07656099564574,40.35288561323175,47.14811867861577,54.00431039337622,59.84198411294865,12875,51.98794548902854,38.49262697956987,45.43879594661617,52.42049257687139,59.076562518631846,64.75537452687892,12.082463849605455,5.151053444648805,8.285365267997395,11.980119983997897,15.649714517703012,18.98359918240653 -1,2021.0,1,6.6793294045068565,3.8947837916798176,5.268040765792659,6.742266150238834,8.267198353984934,9.530000974547399,Female,10562.14097618714,89402.82407932427,44.40579363921979,31.171931396033965,37.37110039284121,44.51149426262158,51.52246929197595,57.648830038121474,13385,51.35982139251413,36.878548600697904,44.69464068180304,52.08295008918855,58.822354984237535,64.67768897274942,13.506979226821267,6.353964065394251,9.656667857186914,13.379815645963022,17.217799655778933,20.71645828893422 -1,2022.0,1,6.575229504834014,3.830384767112056,5.166076155009721,6.643677968106744,8.109137704573211,9.373617332789198,Total,21252.446999702323,175420.54795946667,45.551659885823916,32.2405882097169,38.64308670430218,45.555902548538285,52.57592879750717,58.8410367787242,26679,51.14595875385759,37.39106793887783,44.349745859615915,51.564012110123585,58.367202728167435,64.58948386519519,12.746150975973903,5.721451573958824,8.994759066278784,12.657366544423875,16.385219729226993,19.80917515916106 -1,2022.0,1,6.593382148522038,3.8568889060207607,5.190784077339975,6.6651974445466085,8.117212256735561,9.358873175269729,Male,10638.929041325895,86083.19733110373,46.89842584508911,34.06185247596065,40.2139508762302,46.95081218343542,53.7626522810527,59.95109486586963,13056,51.60155298422989,38.1839467388982,44.81485950898193,51.96227377101985,58.72763528598655,64.82478027352828,12.179170983380688,5.281928784710583,8.50873789528479,12.08529635787276,15.707140755095926,19.103978068806736 -1,2022.0,1,6.557832388487217,3.8081227827729234,5.147995443534185,6.6269097484900845,8.09822244119456,9.391489043633431,Female,10613.517958376635,89337.35062836135,44.26094738753654,30.86889312710784,37.29134857781348,44.18884045818346,51.31117475442121,57.691021802032026,13623,50.70932671453056,36.56105453658231,43.850637005660154,51.182507351886215,58.08683018188721,64.28274709154108,13.289532814283863,6.229620194814191,9.498388752128726,13.219449088432011,16.963510009687965,20.417145259591233 \ No newline at end of file +1,2019.0,1,6.798653101737303,3.33,5.0,8.0,8.33,8.33,Total,8313.63015908381,68496.43000000333,47.53391960297742,33.416,42.19,49.52,54.79,57.73,10075,51.020747394541296,36.17,47.59,54.51,57.49,59.64,11.50302729528536,6.0,8.0,10.0,13.0,19.0 +1,2019.0,1,6.82559311740912,3.33,5.0,8.0,8.33,8.33,Male,4178.113558218262,33718.430000001055,48.500955465587225,35.652,43.66,50.86,55.197500000000005,58.15,4940,51.79769838056671,39.08,49.0,54.77,57.49,59.31,10.857489878542511,6.0,8.0,10.0,12.0,17.0 +1,2019.0,1,6.77273612463507,3.33,5.0,8.0,8.33,8.33,Female,4135.516600865757,34778.000000001084,46.60360662122688,31.608,40.8,48.87,54.2,57.33,5135,50.27330087633859,34.18,45.74,54.03,57.49,59.89,12.124050632911393,6.0,8.0,11.0,14.0,21.0 +1,2020.0,1,6.620750547143055,3.779919704698525,5.233206491021548,6.733308823057603,8.17063065506178,9.463024707239343,Total,8241.253820548856,67657.44984125489,45.95746762744464,32.83866992060202,39.425043675855456,46.37967471166754,52.93963038300623,58.81271290479315,10219,51.32172181435569,37.55516937775139,45.46289011822666,52.356086919490465,58.475042153950085,63.4339470157204,12.651926134337847,5.742782402250355,8.792122676148566,12.293970728316063,16.168501560117733,19.98785436940258 +1,2020.0,1,6.637606389576152,3.8184159451999298,5.299490015381481,6.749271748246258,8.150940414570025,9.466586308302135,Male,4153.954529668203,33267.68322455567,47.22862141983931,34.82339955801986,40.98349218982254,47.500410694881445,53.82660919879816,59.649314701163064,5012,52.05924889391922,39.16596672669863,46.19784549832359,52.808808045992805,58.89288736674495,63.85178400872757,11.919314795782537,5.278346567220785,8.195301759955324,11.639061952083665,15.323831964540638,18.948287966714712 +1,2020.0,1,6.604525949049183,3.7542909938761984,5.1612627475354165,6.712398015040273,8.190313687617444,9.459183136562523,Female,4087.2992908806623,34389.7666166991,44.73391801970805,31.3476775575153,38.126890509817606,45.16529691023474,51.830234772441926,57.698535261855284,5207,50.61181481939273,35.91486366889823,44.48667591974852,51.869378728424245,58.05999020625031,63.01298089104152,13.357101480763502,6.210797928803866,9.446619909682243,12.963159237168462,16.860786748427394,21.025972100196174 +1,2021.0,1,6.6269972645495825,3.872785671703136,5.226815865514426,6.713893639675902,8.166991834156136,9.457425069064628,Total,8194.164909285311,67409.81617499836,45.74228623248273,32.53388035232254,38.892834838175816,45.95678792383191,52.824583617119444,58.78592521668164,10172,51.59268885368547,37.9972442656076,44.988351045396506,52.14065321741188,58.85053984429855,64.54634729536629,12.860204717103832,5.848003945874805,9.003305960423488,12.724569872084416,16.525955667284457,19.905573091843863 +1,2021.0,1,6.65743428786115,3.9339645954492277,5.2730625289337905,6.717911971166861,8.20030266767493,9.462800031747925,Male,4107.772422075325,33147.365319260665,47.02083785166053,34.221479171102594,40.321473982257515,47.17192009825044,53.82705386726819,59.92116744196057,4979,52.17181541274111,39.26479218156785,45.717031248619406,52.55715634693674,58.998310648441596,64.76510379088934,12.266392568855066,5.275596437408333,8.557966496254549,12.142337404754137,15.857702137053412,19.3437473150315 +1,2021.0,1,6.597814530278737,3.8109663091051518,5.187076069817955,6.704770968536875,8.128114341609681,9.452951245078125,Female,4086.392487209991,34262.45085573748,44.516422856421826,31.118223339069093,37.25605973916984,44.65695056624028,51.74427010165252,57.710507660536265,5193,51.03742770646095,36.73480487734666,44.181194483190296,51.72496882010549,58.69069723278915,64.36287632817056,13.42954627037387,6.460683568402761,9.51011717079545,13.316232401572057,17.13494143192364,20.379365691565873 +1,2022.0,1,6.463388875563361,3.61869315523015,5.083590332734711,6.53162184831892,8.01705285177274,9.328581977354725,Total,8221.169154325702,66934.85519533417,45.479729912361705,32.25386622000384,38.61747074724565,45.4728742243383,52.44997236735041,58.59908141364181,10356,50.94191931500898,37.117052142304914,44.12608111089164,51.33013529495807,58.17365919336333,64.32526055080689,12.804724585074235,5.774628865325765,9.070629036602275,12.741704993229549,16.37520856817555,19.901719612403255 +1,2022.0,1,6.488635306137396,3.6474819413170954,5.116505257360913,6.549077057656427,8.037805809374863,9.341827591201206,Male,4117.727933767086,32851.96055497364,46.60486430376953,33.36678552973327,39.730041617343645,46.56902885675077,53.43240892312547,59.78449012951627,5063,51.64737006019959,38.12239994895629,44.90136516847476,51.957597094541036,58.54307918449458,64.87917754397607,12.25063538973118,5.4263415053653095,8.612676774591522,12.20062915985358,15.725921033523093,19.287329450318488 +1,2022.0,1,6.439239493739054,3.595767918371492,5.057154809892923,6.518604906559031,7.993041249797759,9.324963022690959,Female,4103.441220558604,34082.89464036081,44.403486680980784,31.042863698751333,37.61149192938774,44.441778079501596,51.34218571819926,57.42456228308562,5293,50.26712295700777,36.106539444890245,43.332547976170645,50.71093495042631,57.74165888778904,64.04083423085133,13.334736600192674,6.193124577589115,9.60853723978057,13.31729385072847,16.94653394398081,20.452875566930782 +2,2019.0,1,6.799095596985654,3.33,5.0,8.0,8.33,8.33,Total,8323.349559890836,68562.08000000333,47.54007040856779,33.425,42.19,49.52,54.79,57.73,10084,51.027703292344626,36.18,47.605000000000004,54.51,57.49,59.64,11.495934153113843,6.0,8.0,10.0,13.0,19.0 +2,2019.0,1,6.828700485044678,3.33,5.0,8.0,8.33,8.33,Male,4185.2461878088,33788.410000001066,48.517956750202266,35.67,43.66,50.864999999999995,55.197500000000005,58.15,4948,51.791240905416245,39.079,49.0,54.77,57.49,59.31,10.851657235246565,6.0,8.0,10.0,12.0,17.0 +2,2019.0,1,6.770574376947251,3.33,5.0,8.0,8.33,8.33,Female,4138.103372082248,34773.67000000108,46.59797897196263,31.616000000000003,40.7925,48.835,54.2,57.33,5136,50.29211448598103,34.271,45.74,54.03,57.49,59.89,12.116627725856699,6.0,8.0,11.0,14.0,21.0 +2,2020.0,1,6.652348986342871,3.78863137067592,5.254495597644885,6.770027881654459,8.224565036291214,9.489608230818108,Total,8214.300443033942,67621.12744617529,45.9735889365658,32.8474628554956,39.43959062433013,46.33133378105401,52.961344842917555,58.80778673810136,10165,51.41441529851103,37.53280079418867,45.47243442152702,52.4481399546413,58.535546429689035,63.527991555228496,12.883073203739853,5.937607180853644,9.01641609162973,12.551675493916262,16.39027902745431,20.212246019316662 +2,2020.0,1,6.710193102304532,3.8834311428201187,5.369686180379435,6.8306410942688744,8.24132342434648,9.515741996635677,Male,4127.600955208361,33517.41454601114,47.19097513648826,34.722472930143326,41.003509230546115,47.49037709363454,53.802015026063486,59.673187364086395,4995,51.88622861446534,38.953557109399824,45.96518375485177,52.68506730517995,58.699011277649504,63.685346528739075,12.093742540403184,5.457704255587799,8.402857952227029,11.838114263466492,15.410292944239545,19.137582698541845 +2,2020.0,1,6.596462843358648,3.740802670708417,5.155075236317794,6.7132761558207275,8.198811331111852,9.46929589738788,Female,4086.699487825556,34103.71290016421,44.797410199890514,31.354448740837604,38.28101586829355,45.245863319452084,51.93415242684019,57.74577386521147,5170,50.9585724526326,36.17194245135745,44.80500584020315,52.17644471214091,58.32869026730736,63.34610429350056,13.64568571116098,6.486751867713098,9.751246494204764,13.281973246048455,17.169523696603456,21.23954038168728 +2,2021.0,1,6.640260009994773,3.8779221157658164,5.23329763836543,6.735854141167473,8.177425505101422,9.47016828986768,Total,8129.132364073368,67026.78454088724,45.83751179563051,32.52808735848124,38.95669200124223,46.07284161082353,52.849323591295466,58.91538000484853,10094,51.5025041176782,37.788926308663136,44.88364038462232,52.01659711287732,58.725263108022475,64.51192028069534,13.063388505165873,5.990420527625142,9.2075696779696,12.932194695284505,16.728005573918075,20.171354646424714 +2,2021.0,1,6.742878846223155,3.9930259314847087,5.348908868135866,6.8271048183916845,8.30087764274258,9.558016469248763,Male,4057.8016165100757,33343.5358945735,47.00196965532995,34.13338323472363,40.28857306358945,47.23824174539338,53.78807421825695,59.87609872973616,4945,51.81662506636827,38.76405717816392,45.377762681200466,52.24493701243166,58.6378816800496,64.47522357209857,12.255938754128634,5.171235908239521,8.564665985303037,12.120307251952784,15.870534215812711,19.312599169499148 +2,2021.0,1,6.541706864694839,3.7639876606935605,5.130422411763632,6.64829644677062,8.064951990033641,9.33913800529912,Female,4071.3307475633223,33683.248646313725,44.71918899193769,31.2803511448533,37.5957363916055,44.912579953240275,51.898686522979574,57.85979236986111,5149,51.200828434774365,36.99961967207335,44.35608454702074,51.82512134323664,58.791433680004545,64.53761228725341,13.838847627107837,6.93931249991858,9.975973415774536,13.718488268006896,17.529341841271048,20.84187547639379 +2,2022.0,1,6.485204962796243,3.6326483005023005,5.105649087006172,6.563705869888347,8.014347250908436,9.395243689677375,Total,8247.825908320072,67251.57546419704,45.54443113884584,32.282609882735684,38.64560066226272,45.59142972473724,52.51077814570169,58.65087991340941,10370,51.05726729214477,37.22045875891165,44.23207027933084,51.36430214239873,58.25304657127107,64.51913322105771,12.986700357542968,5.911931606843135,9.248907543220431,12.860617456152859,16.61711748456339,20.094263931900397 +2,2022.0,1,6.5591784383944685,3.742290416341691,5.17770725500086,6.6078832151322455,8.106775685489513,9.465095873082413,Male,4116.450082967318,33255.034682659956,46.576861703858896,33.24300787244653,39.69683696637759,46.63598747509423,53.41405606726437,59.77576265178582,5070,51.60385236475749,38.124757256212845,44.943056835638565,51.95198988742004,58.5086432976995,64.81874657875066,12.243248736196588,5.328131729220268,8.519061622540747,12.17114934348253,15.788434581443228,19.326331609397798 +2,2022.0,1,6.414441656893826,3.5558456961928493,5.038573411236054,6.522354784859681,7.936437424727948,9.296924060146125,Female,4131.375825352753,33996.540781537275,44.55680416438925,31.246614669735084,37.7579616916335,44.575675008891764,51.55897670316021,57.67769691479481,5300,50.53440194909847,36.20747382791068,43.54543336178553,50.809633861292035,58.06155098193838,64.28151495755468,13.697888984000695,6.551844577312786,9.926515456965506,13.654476403134396,17.340366063748217,20.78926458712023 \ No newline at end of file diff --git a/src/test/java/simpaths/integrationtest/expected/Statistics1.csv b/src/test/java/simpaths/integrationtest/expected/Statistics1.csv index 0559c9e46..b9345e9cb 100644 --- a/src/test/java/simpaths/integrationtest/expected/Statistics1.csv +++ b/src/test/java/simpaths/integrationtest/expected/Statistics1.csv @@ -1,5 +1,9 @@ run,time,id_Statistics1,edi_p50,sIndex_p50,statYHhDispEquivNatGini,statYMktNatGini,yHhDispEquivP50,yHhQuintilesC5P20,yHhQuintilesC5P40,yHhQuintilesC5P60,yHhQuintilesC5P80,yLabP20,yLabP40,yLabP60,yLabP80 -1,2019.0,1,15295.02539940983,0.0,0.0,0.0,15490.381656238715,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -1,2020.0,1,14855.758330056642,0.0,0.0,0.0,14873.36489466496,5.7186490359867115,7.291602867439664,7.928614289011746,8.478077201321138,529.3963344928553,1186.0620009142672,1917.0873691357885,3229.8845804698967 -1,2021.0,1,15154.277016239876,0.0,0.0,0.0,15157.447793085172,6.168505526210029,7.388923360307476,7.978673322585567,8.50696709242758,644.5231834138531,1252.2889664722493,1999.2293910082874,3286.447805259845 -1,2022.0,1,15011.112916230086,0.0,0.0,0.0,15013.137223190799,6.249703489781575,7.38893259261191,7.958155740737028,8.49085280069897,609.8778755105863,1205.6800989055366,1921.42705305321,3171.166561809515 \ No newline at end of file +1,2019.0,1,15256.953965109053,0.0,0.0,0.0,15456.781759590931,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +1,2020.0,1,16063.269391569822,0.0,0.0,0.0,16074.565454914327,5.994758780381151,7.393700990590142,8.080801266076895,8.647537996276645,556.0535903919002,1428.2782103203886,2373.567367252097,3959.9436655449053 +1,2021.0,1,16428.42766481459,0.0,0.0,0.0,16431.272736785475,6.25454813251385,7.492572994709025,8.141351120715449,8.669003250539848,716.125815409487,1505.2342817986791,2451.031208467749,4124.458288347928 +1,2022.0,1,16723.86865429823,0.0,0.0,0.0,16722.553361865073,6.329422830421304,7.517117357847595,8.159016824608619,8.69947177213025,704.6141664880955,1518.971317922587,2499.3043286329507,4143.906309315343 +2,2019.0,1,15256.926298340906,0.0,0.0,0.0,15450.417507924612,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2,2020.0,1,16484.3464161893,0.0,0.0,0.0,16504.430774297536,5.8284256265137735,7.420502937428444,8.169331124198012,8.778179962472056,598.4566969501215,1620.7426405262938,2731.4687649871457,4702.10565861142 +2,2021.0,1,16980.04396706059,0.0,0.0,0.0,16987.577552444032,6.20543568557222,7.53915907289091,8.242021677242038,8.815072330677403,816.4011963231156,1795.5075463740689,2956.5802957669907,4955.626343431599 +2,2022.0,1,17212.881002112896,0.0,0.0,0.0,17212.881002112896,6.305398764736624,7.573593988143731,8.260899811129066,8.84388227052596,773.083379156368,1780.5441979089017,2971.307912479575,5004.688012048182 \ No newline at end of file diff --git a/src/test/java/simpaths/integrationtest/expected/Statistics21.csv b/src/test/java/simpaths/integrationtest/expected/Statistics21.csv index 353ef42a4..b7bea2fdc 100644 --- a/src/test/java/simpaths/integrationtest/expected/Statistics21.csv +++ b/src/test/java/simpaths/integrationtest/expected/Statistics21.csv @@ -1,5 +1,9 @@ run,time,id_Statistics21,demDsbl18to29Share,demDsbl30to54Share,demDsbl55to74Share,demMarried18to29Share,demMarried30to54Share,demMarried55to74Share,demNChild18to29Avg,demNChild30to54Avg,demNChild55to74Avg,demPop18to29N,demPop30to54N,demPop55to74N,healthScore18to29Avg,healthScore30to54Avg,healthScore55to74Avg,labNoWork18to29Share,labNoWork18to54Share,labNoWork30to54Share,labNoWork55to74Share,labWorkFullTime18to29Share,labWorkFullTime30to54Share,labWorkFullTime55to74Share,labWorkPartTime18to29Share,labWorkPartTime30to54Share,labWorkPartTime55to74Share,statInvestLoss18to29Avg,statInvestLoss30to54Avg,statInvestLoss55to74Avg,statYDisp18to29Avg,statYDisp30to54Avg,statYDisp55to74Avg,statYDispGrossOfLosses18to29Avg,statYDispGrossOfLosses30to54Avg,statYDispGrossOfLosses55to75Avg,statYInvest18to29Avg,statYInvest30to54Avg,statYInvest55to74Avg,statYLab18to29Avg,statYLab30to54Avg,statYLab55to74Avg,statYPens18to29Avg,statYPens30to54Avg,statYPens55to74Avg,wealth18to29Avg,wealth30to54Avg,wealth55to74Avg,x18to29Avg,x18to54Avg,x30to54Avg,x55to74Avg,xToLeisureRatio -1,2019.0,1,0.05455515539549153,0.09138317870353527,0.06602914389799636,0.27344271041750035,0.6669092232126614,0.6289617486338798,0.29825263438708816,0.9494269601600873,0.07231329690346083,7497.0,16491.0,10980.0,3.6808056555955715,3.456976532654175,3.093169398907104,0.009146982966519945,-0.021676254083733693,-0.030389199975744352,0.04074815336976323,0.5587568360677604,0.6840094597052938,0.274408014571949,0.08936908096571962,0.14183494027045054,0.0836976320582878,0.0,0.0,0.0,-239.6428395925377,-464.6937887966651,-556.7492423475169,1046.5693818360335,1634.8271299533349,1522.0963522953402,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.34744375,-1108.3894350892856,-1343.6696142857143,-1403.9432562499999,NaN -1,2020.0,1,0.054075652637187,0.09685879477856589,0.0670006261740764,0.41022908897176347,0.7581212374083567,0.6640128812952858,0.3195258391049547,0.9869464147344579,0.07880848018606315,7508.0,16777.0,11179.0,3.566595631326585,3.371282112415807,3.030861436622238,0.01941994315396911,-0.03247953796526054,-0.03913978122429518,0.012414941425887838,0.5003995737879595,0.7429814627168146,0.3307988192145988,0.1374533830580714,0.09161351850748048,0.05564003935951337,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.1286986426642,-1107.7646339986973,-1342.8216675317444,-1403.8338940034157,-0.2818097066589831 -1,2021.0,1,0.040714189097795214,0.08269819360259258,0.05199964686148142,0.4070066278912485,0.7726099741943228,0.6716694623466054,0.3281482483430272,0.9740142831422913,0.08484152908978547,7393.0,16663.0,11327.0,3.5620181252536183,3.389065594430775,3.0848415290897853,-0.005516224847829043,-0.06658590740751208,-0.0801374303786833,-0.022705306559547944,0.5249560394968213,0.7927744103702815,0.36461552043789175,0.13783308535100772,0.08281822000840185,0.05694358612165622,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.0937169052081,-1107.7335087035208,-1342.7961121774229,-1403.8462237108963,0.473215627983804 -1,2022.0,1,0.04590818363273453,0.09656029838375466,0.053246639135401105,0.3507651363938789,0.7547806524184477,0.6705034706967753,0.3324018629407851,0.9586762181043159,0.08672348651260874,7515.0,16891.0,11381.0,3.439787092481703,3.287371973240187,2.956945786837712,-0.014716454624085162,-0.08279135496688739,-0.0898683450831804,-0.050843063193040994,0.5164337990685296,0.7993014031140844,0.3904753536596081,0.15555555555555556,0.08602214196909597,0.059221509533432914,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.0620900915467,-1107.7204272199017,-1342.7949338310398,-1403.8189541897889,-0.10158894241665184 \ No newline at end of file +1,2019.0,1,0.05811554332874828,0.09130434782608696,0.06236811254396248,0.2620357634112792,0.6720496894409937,0.5969519343493552,0.29332874828060523,0.9503105590062112,0.07409144196951935,2908.0,6440.0,4265.0,3.69050894085282,3.4482919254658384,3.092379835873388,0.0021834914718019127,-0.0201199603173437,-0.02022802981366459,0.036602920750293144,0.561554332874828,0.6751552795031056,0.2797186400937866,0.09353507565337002,0.140527950310559,0.08253223915592028,0.0,0.0,0.0,-220.98483429553175,-459.2130693789786,-563.0006789520651,1065.2273871330394,1640.3078493710213,1515.844915690792,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.34744375,-1108.3894350892856,-1343.6696142857143,-1403.9432562499999,NaN +1,2020.0,1,0.05762594893029676,0.09580012262415696,0.0698478561549101,0.4392684610075914,0.7633353770692827,0.6456892577224528,0.3233264320220842,0.9668914776210914,0.0818349469801752,2898.0,6524.0,4338.0,3.587646652864044,3.391937461679951,3.0518672199170123,0.008549642581090422,-0.03472901860465116,-0.0414546712446352,0.016650019455970555,0.5024154589371981,0.743408951563458,0.32134624250806826,0.14630779848171152,0.09350091968117719,0.06085753803596127,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.138119366421,-1107.7977115375543,-1342.8712716121024,-1403.8462604199615,-2.0815536320511017 +1,2021.0,1,0.05276030747728861,0.08489542989930286,0.05090909090909091,0.4437456324248777,0.7755228505034857,0.6552272727272728,0.3413696715583508,0.9660728117738188,0.08431818181818182,2862.0,6455.0,4400.0,3.5628930817610063,3.364058869093726,3.0770454545454546,-0.021273570999301217,-0.0695849455566086,-0.08030002850503486,-0.022282563636363606,0.5377358490566038,0.7931835786212239,0.3584090909090909,0.14081062194269742,0.082571649883811,0.06272727272727273,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.0780379012871,-1107.7644214116592,-1342.8565545145082,-1403.8442920330176,-1.0425592600559874 +1,2022.0,1,0.05803571428571429,0.09431092181320352,0.05558076225045372,0.39663461538461536,0.7588986918162458,0.654491833030853,0.33413461538461536,0.9637967751749316,0.0852994555353902,2912.0,6574.0,4408.0,3.4330357142857144,3.3002738059020382,2.9593920145190564,-0.017864462637362633,-0.08477753795883114,-0.09502243918466687,-0.04601915825771319,0.5267857142857143,0.8024034073623365,0.3797640653357532,0.14835164835164835,0.08807423182233039,0.06510889292196008,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.065033286826,-1107.7773722038787,-1342.8856261992355,-1403.8065814263734,1.2594818265071412 +2,2019.0,1,0.05807560137457045,0.09109248913718188,0.0625732364659011,0.26082474226804125,0.6719428926132837,0.5978439184438715,0.2934707903780069,0.9497206703910615,0.07429107101007734,2910.0,6444.0,4267.0,3.689347079037801,3.450651769087523,3.089289899226623,0.0019464395189003336,-0.020478632743557712,-0.020652807448789584,0.036303999203187276,0.5618556701030928,0.675667287399131,0.28005624560581205,0.09347079037800687,0.1404407200496586,0.0824935551910007,0.0,0.0,0.0,-220.29699124714057,-458.1635502021104,-560.3573828031367,1065.9152301814306,1641.3573685478896,1518.4882118397204,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.34744375,-1108.3894350892856,-1343.6696142857143,-1403.9432562499999,NaN +2,2020.0,1,0.05974296630774575,0.0965952857803112,0.07161007161007162,0.43730461965960404,0.7610537667539671,0.6474936474936475,0.323723515109413,0.9707287012786936,0.08316008316008316,2879.0,6491.0,4329.0,3.5800625217089266,3.377753812971807,3.0353430353430353,0.018856783292809987,-0.028078123614862394,-0.03446314848251425,0.019551420697620725,0.49947898575894406,0.7410260360499152,0.32155232155232155,0.13893713094824592,0.08889231243259899,0.05775005775005775,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.1170947628652,-1107.7944102659778,-1342.8799505205716,-1403.8486159631293,-0.9360064047972398 +2,2021.0,1,0.05324400564174894,0.08503986243551664,0.0570324926153147,0.43582510578279265,0.7755197748944818,0.6555328334469439,0.33180535966149505,0.9624824136313898,0.09088843444671665,2836.0,6397.0,4401.0,3.558885754583921,3.3732999843676725,3.060668029993183,-0.0144478334273625,-0.0625561035939563,-0.07557809685790215,-0.014234134560327183,0.5405500705218618,0.7897451930592465,0.35219268348102706,0.1311706629055007,0.08128810379865561,0.06089525107930016,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.0676462766917,-1107.7466491884177,-1342.8345306930705,-1403.8575419191038,-0.7311082040563939 +2,2022.0,1,0.05986159169550173,0.09063306512828298,0.06067466606293865,0.3813148788927336,0.758463640504023,0.6565542223228436,0.3391003460207612,0.9544557461666919,0.0912383971021055,2890.0,6587.0,4417.0,3.4283737024221455,3.3113708820403827,2.9470228661987776,-0.012623293771626298,-0.08009925956527997,-0.0918986788522848,-0.039226344894724874,0.5128027681660899,0.8000607256717778,0.37740547883178627,0.15709342560553632,0.08729315318050707,0.06067466606293865,0.0,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,0.0,0.0,0.0,NaN,NaN,NaN,0.0,0.0,0.0,0.0,0.0,0.0,-720.0491006748614,-1107.774090616804,-1342.891780357179,-1403.8187757545545,1.7696141582517548 \ No newline at end of file