From b9e4384e4a74e72ca68f3d1cfcda5812a7d6c7f0 Mon Sep 17 00:00:00 2001 From: dav-sonn <62243276+dav-sonn@users.noreply.github.com> Date: Tue, 31 Mar 2026 10:55:42 +0100 Subject: [PATCH] Remove all the code/references to IT --- config/default.yml | 2 +- .../java/simpaths/data/ComboBoxCountry.java | 7 +- src/main/java/simpaths/data/Parameters.java | 61 +++-------- .../simpaths/experiment/SimPathsMultiRun.java | 9 +- .../simpaths/experiment/SimPathsStart.java | 25 ++--- src/main/java/simpaths/model/BenefitUnit.java | 41 ++------ src/main/java/simpaths/model/Person.java | 95 +++--------------- .../java/simpaths/model/SimPathsModel.java | 7 +- src/main/java/simpaths/model/Validator.java | 60 ----------- .../java/simpaths/model/enums/Country.java | 1 - .../java/simpaths/model/enums/Region.java | 8 -- src/main/resources/images/IT.png | Bin 161 -> 0 bytes 12 files changed, 56 insertions(+), 260 deletions(-) delete mode 100644 src/main/resources/images/IT.png diff --git a/config/default.yml b/config/default.yml index ca449ce17..1aea261a8 100644 --- a/config/default.yml +++ b/config/default.yml @@ -10,7 +10,7 @@ randomSeed: 606 # seed for the first run; incremented automatically if startYear: 2019 # first year of simulation (must have matching input/donor data) endYear: 2022 # last year of simulation (inclusive) popSize: 50000 # simulated population size (larger = more accurate, slower) -# countryString: "United Kingdom" # "United Kingdom" or "Italy" (auto-detected from donor DB if omitted) +# countryString: "United Kingdom" # Auto-detected from donor DB if omitted # integrationTest: false # true = write output to a fixed folder for comparison in CI tests diff --git a/src/main/java/simpaths/data/ComboBoxCountry.java b/src/main/java/simpaths/data/ComboBoxCountry.java index 758c1a2b2..577930b25 100644 --- a/src/main/java/simpaths/data/ComboBoxCountry.java +++ b/src/main/java/simpaths/data/ComboBoxCountry.java @@ -59,13 +59,12 @@ public void updateUI() { // generate combo-box int numCountries = Country.values().length; - // numCountries = 1; //Overrides the above to only allow selection of Italy String[] countryNames = new String[numCountries]; for(int i = 0; i < numCountries; i++) { countryNames[i] = Country.values()[i].getCountryName(); } JComboBox countryList = new JComboBox(countryNames); - countryList.setSelectedIndex(Country.IT.ordinal()); + countryList.setSelectedIndex(Country.UK.ordinal()); countryList.addActionListener(this); // set-up display for country flag @@ -108,7 +107,7 @@ public void actionPerformed(ActionEvent e) { * */ protected void updateLabel(String countryName) { - Country country = Country.IT.getCountryFromNameString(countryName); + Country country = Country.UK.getCountryFromNameString(countryName); ImageIcon icon = createImageIcon("/images/" + country + ".png"); String text = "You have selected " + countryName; picture.setText(text); @@ -143,5 +142,5 @@ protected static ImageIcon createImageIcon(String path) { * @return * */ - public Country getCountryEnum() { return Country.IT.getCountryFromNameString(this.countryName); } + public Country getCountryEnum() { return Country.UK.getCountryFromNameString(this.countryName); } } diff --git a/src/main/java/simpaths/data/Parameters.java b/src/main/java/simpaths/data/Parameters.java index 6986ad11b..114eb468c 100644 --- a/src/main/java/simpaths/data/Parameters.java +++ b/src/main/java/simpaths/data/Parameters.java @@ -558,9 +558,6 @@ else if(numberOfChildren <= 5) { // private static MultiKeyCoefficientMap coeffCovariancePartnershipU1b; //Probit enter partnership if not in continuous education private static MultiKeyCoefficientMap coeffCovariancePartnershipU2; //Probit exit partnership (females) - //Partnership for Italy - private static MultiKeyCoefficientMap coeffCovariancePartnershipITU1; //Probit enter partnership for Italy - private static MultiKeyCoefficientMap coeffCovariancePartnershipITU2; //Probit exit partnership for Italy //Fertility private static MultiKeyCoefficientMap coeffCovarianceFertilityF1; //Probit fertility if in continuous education @@ -794,8 +791,6 @@ else if(numberOfChildren <= 5) { private static BinomialRegression regPartnershipU1b; private static BinomialRegression regPartnershipU2; - private static BinomialRegression regPartnershipITU1; - private static BinomialRegression regPartnershipITU2; //Fertility private static BinomialRegression regFertilityF1; @@ -936,12 +931,7 @@ public static void loadParameters(Country country, int maxAgeModel, boolean enab loadTimeSeriesFactorMaps(country); instantiateAlignmentMaps(); - // scenario parameters - if (country.equals(Country.IT)) { - SAVINGS_RATE = 0.056; - } else { - SAVINGS_RATE = 0.056; - } + SAVINGS_RATE = 0.056; saveImperfectTaxDBMatches = taxDBMatches; flagDefaultToTimeSeriesAverages = defaultToTimeSeriesAverages; @@ -1287,8 +1277,6 @@ public static void loadParameters(Country country, int maxAgeModel, boolean enab {"coeffCovarianceChildcareC1b", coeffCovarianceChildcareC1b}, {"coeffCovariancePartnershipU1", coeffCovariancePartnershipU1}, {"coeffCovariancePartnershipU2", coeffCovariancePartnershipU2}, - //{"coeffCovariancePartnershipITU1", coeffCovariancePartnershipITU1}, - //{"coeffCovariancePartnershipITU2", coeffCovariancePartnershipITU2}, {"coeffCovarianceFertilityF1", coeffCovarianceFertilityF1}, }); } @@ -1408,16 +1396,10 @@ public static void loadParameters(Country country, int maxAgeModel, boolean enab coeffCovarianceChildcareC1b = bootstrapWithTrace("coeffCovarianceChildcareC1b", coeffCovarianceChildcareC1b); //Specification of some processes depends on the country: - if (country.equals(Country.UK)) { - coeffCovariancePartnershipU1 = bootstrapWithTrace("coeffCovariancePartnershipU1", coeffCovariancePartnershipU1); - // coeffCovariancePartnershipU1b = RegressionUtils.bootstrap(coeffCovariancePartnershipU1b); - coeffCovariancePartnershipU2 = bootstrapWithTrace("coeffCovariancePartnershipU2", coeffCovariancePartnershipU2); - coeffCovarianceFertilityF1 = bootstrapWithTrace("coeffCovarianceFertilityF1", coeffCovarianceFertilityF1); - } else if (country.equals(Country.IT)) { - coeffCovariancePartnershipITU1 = bootstrapWithTrace("coeffCovariancePartnershipITU1", coeffCovariancePartnershipITU1); - coeffCovariancePartnershipITU2 = bootstrapWithTrace("coeffCovariancePartnershipITU2", coeffCovariancePartnershipITU2); - coeffCovarianceFertilityF1 = bootstrapWithTrace("coeffCovarianceFertilityF1", coeffCovarianceFertilityF1); - } + coeffCovariancePartnershipU1 = bootstrapWithTrace("coeffCovariancePartnershipU1", coeffCovariancePartnershipU1); + // coeffCovariancePartnershipU1b = RegressionUtils.bootstrap(coeffCovariancePartnershipU1b); + coeffCovariancePartnershipU2 = bootstrapWithTrace("coeffCovariancePartnershipU2", coeffCovariancePartnershipU2); + coeffCovarianceFertilityF1 = bootstrapWithTrace("coeffCovarianceFertilityF1", coeffCovarianceFertilityF1); } @@ -1498,25 +1480,16 @@ public static void loadParameters(Country country, int maxAgeModel, boolean enab regEducationE2 = new GeneralisedOrderedRegression<>(RegressionType.GenOrderedLogit, EducationLevel.class, coeffCovarianceEducationE2); //Partnership - if (country.equals(Country.UK)) { - MultiKeyCoefficientMap coeffPartnershipU1Appended = appendCoefficientMaps(coeffCovariancePartnershipU1, partnershipTimeAdjustment, "Year"); - // MultiKeyCoefficientMap coeffPartnershipU1bAppended = appendCoefficientMaps(coeffCovariancePartnershipU1b, partnershipTimeAdjustment, "Year"); - MultiKeyCoefficientMap coeffPartnershipU2Appended = appendCoefficientMaps(coeffCovariancePartnershipU2, partnershipTimeAdjustment, "Year", true); - regPartnershipU1 = new BinomialRegression(RegressionType.Probit, Indicator.class, coeffPartnershipU1Appended); - // regPartnershipU1b = new BinomialRegression(RegressionType.Probit, Indicator.class, coeffPartnershipU1bAppended); - regPartnershipU2 = new BinomialRegression(RegressionType.Probit, ReversedIndicator.class, coeffPartnershipU2Appended); - } else if (country.equals(Country.IT)) { - regPartnershipITU1 = new BinomialRegression(RegressionType.Probit, Indicator.class, coeffCovariancePartnershipITU1); - regPartnershipITU2 = new BinomialRegression(RegressionType.Probit, Indicator.class, coeffCovariancePartnershipITU2); - } + MultiKeyCoefficientMap coeffPartnershipU1Appended = appendCoefficientMaps(coeffCovariancePartnershipU1, partnershipTimeAdjustment, "Year"); + // MultiKeyCoefficientMap coeffPartnershipU1bAppended = appendCoefficientMaps(coeffCovariancePartnershipU1b, partnershipTimeAdjustment, "Year"); + MultiKeyCoefficientMap coeffPartnershipU2Appended = appendCoefficientMaps(coeffCovariancePartnershipU2, partnershipTimeAdjustment, "Year", true); + regPartnershipU1 = new BinomialRegression(RegressionType.Probit, Indicator.class, coeffPartnershipU1Appended); + // regPartnershipU1b = new BinomialRegression(RegressionType.Probit, Indicator.class, coeffPartnershipU1bAppended); + regPartnershipU2 = new BinomialRegression(RegressionType.Probit, ReversedIndicator.class, coeffPartnershipU2Appended); //Fertility - if (country.equals(Country.UK)) { - MultiKeyCoefficientMap coeffFertilityF1aAppended = appendCoefficientMaps(coeffCovarianceFertilityF1, fertilityTimeAdjustment, "Year"); - regFertilityF1 = new BinomialRegression(RegressionType.Probit, Indicator.class, coeffFertilityF1aAppended); - } else if (country.equals(Country.IT)) { - regFertilityF1 = new BinomialRegression(RegressionType.Probit, Indicator.class, coeffCovarianceFertilityF1); - } + MultiKeyCoefficientMap coeffFertilityF1aAppended = appendCoefficientMaps(coeffCovarianceFertilityF1, fertilityTimeAdjustment, "Year"); + regFertilityF1 = new BinomialRegression(RegressionType.Probit, Indicator.class, coeffFertilityF1aAppended); //Income regIncomeI1a = new BinomialRegression(RegressionType.Logit, Indicator.class, coeffCovarianceIncomeI1a); @@ -1920,10 +1893,8 @@ public static String getEUROMODpolicyForThisYear(int year, Map public static void setCountryRegions(Country country) { countryRegions = new LinkedHashSet(); - for(Region demRgn : Region.values()) { //TODO: restrict this to only regions in the simulated country - if(demRgn.toString().startsWith(country.toString())) { //Only assess the relevant regions for the country - countryRegions.add(demRgn); //Create a set of only relevant regions that we can use below TODO: This should be done in the Parameters class, once and for all! - } + for(Region demRgn : Region.values()) { + countryRegions.add(demRgn); } } @@ -2038,8 +2009,6 @@ public static void setEmploymentsFurloughedFlex(MultiKeyCoefficientMap employmen public static BinomialRegression getRegPartnershipU1() {return regPartnershipU1;} // public static BinomialRegression getRegPartnershipU1b() {return regPartnershipU1b;} public static BinomialRegression getRegPartnershipU2() {return regPartnershipU2;} - public static BinomialRegression getRegPartnershipITU1() {return regPartnershipITU1;} - public static BinomialRegression getRegPartnershipITU2() {return regPartnershipITU2;} public static BinomialRegression getRegFertilityF1() {return regFertilityF1;} diff --git a/src/main/java/simpaths/experiment/SimPathsMultiRun.java b/src/main/java/simpaths/experiment/SimPathsMultiRun.java index 31fe45c55..7ce8d6aad 100644 --- a/src/main/java/simpaths/experiment/SimPathsMultiRun.java +++ b/src/main/java/simpaths/experiment/SimPathsMultiRun.java @@ -83,13 +83,8 @@ public static void main(String[] args) { // set default values for country and start year MultiKeyCoefficientMap lastDatabaseCountryAndYear = ExcelAssistant.loadCoefficientMap(Parameters.getInputDirectory() + File.separator + Parameters.DatabaseCountryYearFilename + ".xlsx", "Data", 1); try { - if (lastDatabaseCountryAndYear.keySet().stream().anyMatch(key -> key.toString().equals("MultiKey[IT]"))) { - countryString = "Italy"; - country = Country.IT; - } else { - countryString = "United Kingdom"; - country = Country.UK; - } + countryString = "United Kingdom"; + country = Country.UK; String valueYear = lastDatabaseCountryAndYear.getValue(country.toString()).toString(); startYear = Integer.parseInt(valueYear); } catch (NullPointerException e) { diff --git a/src/main/java/simpaths/experiment/SimPathsStart.java b/src/main/java/simpaths/experiment/SimPathsStart.java index 75daa8713..63657bd70 100644 --- a/src/main/java/simpaths/experiment/SimPathsStart.java +++ b/src/main/java/simpaths/experiment/SimPathsStart.java @@ -85,12 +85,7 @@ public static void main(String[] args) { //Adjust the country and year to the value read from Excel, which is updated when the database is rebuilt. Otherwise it will set the country and year to the last one used to build the database MultiKeyCoefficientMap lastDatabaseCountryAndYear = ExcelAssistant.loadCoefficientMap(Parameters.getInputDirectory() + Parameters.DatabaseCountryYearFilename + ".xlsx", "Data", 1); - if (lastDatabaseCountryAndYear.keySet().stream().anyMatch(key -> key.toString().equals("MultiKey[IT]"))) { - country = Country.IT; - } else { - country = Country.UK; -// country = Country.IT; - } + country = Country.UK; String valueYear = lastDatabaseCountryAndYear.getValue(country.toString()).toString(); startYear = Integer.parseInt(valueYear); @@ -311,7 +306,7 @@ private static void runGUIdialog() { // initiate radio buttons to define policy environment and input database count = 0; Map startUpOptionsStringsMap = new LinkedHashMap<>(); - startUpOptionsStringsMap.put("Change country and/or simulation start year", count++); + startUpOptionsStringsMap.put("Change simulation start year", count++); startUpOptionsStringsMap.put("Load new input data for starting populations", count++); startUpOptionsStringsMap.put("Use UKMOD Light to alter description of tax and benefit systems", count++); startUpOptionsStringsMap.put("Load new input data for tax and benefit systems", count++); @@ -447,14 +442,12 @@ private static void runGUIdialog() { /** * - * METHOD FOR DISPLAYING GUI FOR SELECTING COUNTRY AND START YEAR OF SIMULATION + * METHOD FOR DISPLAYING GUI FOR SELECTING START YEAR OF SIMULATION * */ private static void chooseCountryAndStartYear() { // set-up combo-boxes - String textC = null; - ComboBoxCountry cbCountry = new ComboBoxCountry(textC); String textY = null; ComboBoxYear cbStartYear = new ComboBoxYear(textY); @@ -463,10 +456,8 @@ private static void chooseCountryAndStartYear() { BasicInternalFrameUI bi = (BasicInternalFrameUI)countryAndYearFrame.getUI(); bi.setNorthPane(null); countryAndYearFrame.setBorder(null); - cbCountry.setBorder(BorderFactory.createTitledBorder("Country selection drop-down menu")); cbStartYear.setBorder(BorderFactory.createTitledBorder("Start year selection drop-down menu")); countryAndYearFrame.setLayout(new BoxLayout(countryAndYearFrame.getContentPane(), BoxLayout.PAGE_AXIS)); - countryAndYearFrame.add(cbCountry); JPanel border = new JPanel(); countryAndYearFrame.add(border); countryAndYearFrame.add(cbStartYear); @@ -475,11 +466,11 @@ private static void chooseCountryAndStartYear() { countryAndYearFrame.setVisible(true); // text for GUI - String title = "Country and Start Year"; - String text = "

Select simulation country and start year

"; + String title = "Start Year"; + String text = "

Select simulation start year

"; // sizing for GUI - int height = 350, width = 600; + int height = 280, width = 600; Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); if (screenSize.width < 850) { width = (int) (screenSize.width * 0.95); @@ -495,8 +486,8 @@ private static void chooseCountryAndStartYear() { // Therefore, we should pass some sort of setting to the model blocking the alteration of // the country if possible. Could this be done by making the setCountry method ineffective // when the country has been set by the user in the dialog box in the start class? - country = cbCountry.getCountryEnum(); //Temporarily commented out to disallow choice of the country - //country = Country.IT; + //country = cbCountry.getCountryEnum(); //Temporarily commented out to disallow choice of the country + country = Country.UK; startYear = cbStartYear.getYear(); //Save the last selected country and year to Excel to use in the model if GUI launched straight away diff --git a/src/main/java/simpaths/model/BenefitUnit.java b/src/main/java/simpaths/model/BenefitUnit.java index da19a0ce0..2f704f6f4 100644 --- a/src/main/java/simpaths/model/BenefitUnit.java +++ b/src/main/java/simpaths/model/BenefitUnit.java @@ -2826,14 +2826,10 @@ public double getDoubleValue(Enum variableID) { } else return 0.; } case FixedCostMale_NorthernRegions -> { - if(getMale().getLabourSupplyHoursWeekly() > 0 && (region.equals(Region.ITC) || region.equals(Region.ITH))) { - return 1.; - } else return 0.; + return 0.; } case FixedCostMale_SouthernRegions -> { - if(getMale().getLabourSupplyHoursWeekly() > 0 && (region.equals(Region.ITF) || region.equals(Region.ITG))) { - return 1.; - } else return 0.; + return 0.; } case FixedCostFemale -> { if(getFemale().getLabourSupplyHoursWeekly() > 0) { @@ -2841,14 +2837,10 @@ public double getDoubleValue(Enum variableID) { } else return 0.; } case FixedCostFemale_NorthernRegions -> { - if(getFemale().getLabourSupplyHoursWeekly() > 0 && (region.equals(Region.ITC) || region.equals(Region.ITH))) { - return 1.; - } else return 0.; + return 0.; } case FixedCostFemale_SouthernRegions -> { - if(getFemale().getLabourSupplyHoursWeekly() > 0 && (region.equals(Region.ITF) || region.equals(Region.ITG))) { - return 1.; - } else return 0.; + return 0.; } case FixedCostMale_NChildren017 -> { if(getMale().getLabourSupplyHoursWeekly() > 0) { @@ -3051,16 +3043,9 @@ public double getDoubleValue(Enum variableID) { return 0.; //Our model doesn't take account of elderly (as people move out of parental home when 18 years old, and we do not provide a mechanism for parents to move back in. } case HoursMaleByDregion -> { - if(model.getCountry().equals(Country.IT)) { - if(getRegion().equals(Region.ITF) || getRegion().equals(Region.ITG)) { //For South Italy (Sud) and Islands (Isole) - return getMale().getLabourSupplyHoursWeekly(); - } else return 0.; - } else if(model.getCountry().equals(Country.UK)) { - if(getRegion().equals(Region.UKI)) { //For London - return getMale().getLabourSupplyHoursWeekly(); - } else return 0.; - } else throw new IllegalArgumentException("Error - household " + this.getId() + " has region " + getRegion() + " which is not yet handled in DonorHousehold.getDoubleValue()!"); - + if(getRegion().equals(Region.UKI)) { //For London + return getMale().getLabourSupplyHoursWeekly(); + } else return 0.; } case HoursFemale -> { return getFemale().getLabourSupplyHoursWeekly(); @@ -3087,15 +3072,9 @@ public double getDoubleValue(Enum variableID) { return 0.; //Our model doesn't take account of elderly (as people move out of parental home when 18 years old, and we do not provide a mechanism for parents to move back in. } case HoursFemaleByDregion -> { //Value of hours are already taken into account by multiplying regression coefficients in Parameters class - if(model.getCountry().equals(Country.IT)) { - if(getRegion().equals(Region.ITF) || getRegion().equals(Region.ITG)) { //For South Italy (Sud) and Islands (Isole) - return getFemale().getLabourSupplyHoursWeekly(); - } else return 0.; - } else if(model.getCountry().equals(Country.UK)) { - if(getRegion().equals(Region.UKI)) { //For London - return getFemale().getLabourSupplyHoursWeekly(); - } else return 0.; - } else throw new IllegalArgumentException("Error - household " + this.getKey().getId() + " has region " + getRegion() + " which is not yet handled in DonorHousehold.getDoubleValue()!"); + if(getRegion().equals(Region.UKI)) { //For London + return getFemale().getLabourSupplyHoursWeekly(); + } else return 0.; //The following regressors for FixedCosts appear as negative in the Utility regression, and so are multiplied by a factor of -1 below. //The following regressors only apply when the male hours worked is greater than 0 diff --git a/src/main/java/simpaths/model/Person.java b/src/main/java/simpaths/model/Person.java index 507c3bc51..6da170ead 100644 --- a/src/main/java/simpaths/model/Person.java +++ b/src/main/java/simpaths/model/Person.java @@ -1567,42 +1567,22 @@ protected void cohabitation(double probitAdjustment) { if (demAge >= Parameters.MIN_AGE_COHABITATION) { // cohabitation possible - if (model.getCountry() == Country.UK) { - - double prob; - if (partner == null) { - // partnership formation - - double score = Parameters.getRegPartnershipU1().getScore(this, Person.DoublesVariables.class); - prob = Parameters.getRegPartnershipU1().getProbability(score + probitAdjustment); - demBePartnerFlag = (cohabitInnov < prob); - if (demBePartnerFlag) - model.getPersonsToMatch().get(demMaleFlag).get(getRegion()).add(this); - } else if (demMaleFlag == Gender.Female) { - // partnership dissolution - - double score = Parameters.getRegPartnershipU2().getScore(this, Person.DoublesVariables.class); - prob = Parameters.getRegPartnershipU2().getProbability(score - probitAdjustment); - if (cohabitInnov < prob) { - demLeavePartnerFlag = true; - } - } - } else if (model.getCountry() == Country.IT) { - - if (partner == null) { - if ((labC4 == Les_c4.Student && eduLeftEduFlag) || !labC4.equals(Les_c4.Student)) { - - double prob = Parameters.getRegPartnershipITU1().getProbability(this, Person.DoublesVariables.class); - demBePartnerFlag = (cohabitInnov < prob); - if (demBePartnerFlag) - model.getPersonsToMatch().get(demMaleFlag).get(getRegion()).add(this); - } - } else if (demMaleFlag == Gender.Female && ((labC4 == Les_c4.Student && eduLeftEduFlag) || !labC4.equals(Les_c4.Student))) { - - double prob = Parameters.getRegPartnershipITU2().getProbability(this, Person.DoublesVariables.class); - if (cohabitInnov < prob) { - demLeavePartnerFlag = true; - } + double prob; + if (partner == null) { + // partnership formation + + double score = Parameters.getRegPartnershipU1().getScore(this, Person.DoublesVariables.class); + prob = Parameters.getRegPartnershipU1().getProbability(score + probitAdjustment); + demBePartnerFlag = (cohabitInnov < prob); + if (demBePartnerFlag) + model.getPersonsToMatch().get(demMaleFlag).get(getRegion()).add(this); + } else if (demMaleFlag == Gender.Female) { + // partnership dissolution + + double score = Parameters.getRegPartnershipU2().getScore(this, Person.DoublesVariables.class); + prob = Parameters.getRegPartnershipU2().getProbability(score - probitAdjustment); + if (cohabitInnov < prob) { + demLeavePartnerFlag = true; } } } @@ -2724,8 +2704,6 @@ public enum DoublesVariables { Dnc_L1, //Lag(1) of number of children of all ages in the benefitUnit Dnc02_L1, //Lag(1) of number of children aged 0-2 in the benefitUnit Dnc017, //Number of children aged 0-17 in the benefitUnit - EduHighIT, - EduMediumIT, EmployedToUnemployed, Employmentsonflexiblefurlough, Employmentsonfullfurlough, @@ -2749,21 +2727,13 @@ public enum DoublesVariables { GrossEarningsYearly, GrossLabourIncomeMonthly, InverseMillsRatio, - ITC, //Italy - ITF, - ITG, - ITH, - ITI, - LactiveIT, L1_hourly_wage, L1_log_hourly_wage, Hourly_wage_L1, L1_log_hourly_wage_sq, Ld_children_2under, Ld_children_3under, - Ld_children_3underIT, Ld_children_4_12, - Ld_children_4_12IT, Lemployed, Lhw_L1, Lhw_10, // Used by financial distress process @@ -2799,7 +2769,6 @@ public enum DoublesVariables { Lnonwork, Lstudent, Lunion, - LunionIT, HrsReceivedFormalIHS_L1, HrsReceivedInformalIHS_L1, HrsProvidedInformalIHS_L1, @@ -4504,22 +4473,6 @@ else throw new IllegalArgumentException( case Yplgrs_dv_L3 -> { return yEmpPersGrossMonthL3; } - case Ld_children_3underIT -> { - return model.getCountry().equals(Country.IT) ? benefitUnit.getIndicatorChildren03_lag1().ordinal() : 0.; - } - case Ld_children_4_12IT -> { - return model.getCountry().equals(Country.IT) ? benefitUnit.getIndicatorChildren412_lag1().ordinal() : 0.; - } - case LunionIT -> { - return (demStatusHhL1.equals(HouseholdStatus.Couple) && (getRegion().toString().startsWith(Country.IT.toString()))) ? 1. : 0.; - } - case EduMediumIT -> { - return (eduHighestC4.equals(Education.Medium) && (getRegion().toString().startsWith(Country.IT.toString()))) ? 1. : 0.; - } - case EduHighIT -> { - return (eduHighestC4.equals(Education.High) && (getRegion().toString().startsWith(Country.IT.toString()))) ? 1. : 0.; - } - case Reached_Retirement_Age -> { int retirementAge; if (demMaleFlag.equals(Gender.Female)) { @@ -4660,22 +4613,6 @@ else throw new IllegalArgumentException( case Deh_c3_Medium_Dag -> { return (Education.Medium.equals(eduHighestC4)) ? demAge : 0.0; } - //Italy - case ITC -> { - return (getRegion().equals(Region.ITC)) ? 1. : 0.; - } - case ITF -> { - return (getRegion().equals(Region.ITF)) ? 1. : 0.; - } - case ITG -> { - return (getRegion().equals(Region.ITG)) ? 1. : 0.; - } - case ITH -> { - return (getRegion().equals(Region.ITH)) ? 1. : 0.; - } - case ITI -> { - return (getRegion().equals(Region.ITI)) ? 1. : 0.; - } //UK case UKC, UKC_Mixed, UKC_Formal, UKC_ -> { return Region.UKC.equals(getRegion()) ? 1.0 : 0.0; diff --git a/src/main/java/simpaths/model/SimPathsModel.java b/src/main/java/simpaths/model/SimPathsModel.java index 2d3fdd196..38d067512 100644 --- a/src/main/java/simpaths/model/SimPathsModel.java +++ b/src/main/java/simpaths/model/SimPathsModel.java @@ -2166,12 +2166,7 @@ private void employmentAlignment() { LinkedHashMap>> personsByGenderAndRegion; personsByGenderAndRegion = new LinkedHashMap>>(); - EnumSet regionEnumSet = null; - if (country.equals(Country.IT)) { - regionEnumSet = EnumSet.of(Region.ITC, Region.ITH, Region.ITI, Region.ITF, Region.ITG); - } else if (country.equals(Country.UK)) { - regionEnumSet = EnumSet.of(Region.UKC, Region.UKD, Region.UKE, Region.UKF, Region.UKG, Region.UKH, Region.UKI, Region.UKJ, Region.UKK, Region.UKL, Region.UKM, Region.UKN); - } + EnumSet regionEnumSet = EnumSet.of(Region.UKC, Region.UKD, Region.UKE, Region.UKF, Region.UKG, Region.UKH, Region.UKI, Region.UKJ, Region.UKK, Region.UKL, Region.UKM, Region.UKN); for (Gender gender : Gender.values()) { personsByGenderAndRegion.put(gender, new LinkedHashMap>()); diff --git a/src/main/java/simpaths/model/Validator.java b/src/main/java/simpaths/model/Validator.java index adf16e7db..0175a6270 100644 --- a/src/main/java/simpaths/model/Validator.java +++ b/src/main/java/simpaths/model/Validator.java @@ -118,11 +118,6 @@ public enum DoublesVariables { educationLevelLowByRegion_UKL, educationLevelLowByRegion_UKM, educationLevelLowByRegion_UKN, - educationLevelHighByRegion_ITC, - educationLevelHighByRegion_ITH, - educationLevelHighByRegion_ITI, - educationLevelHighByRegion_ITF, - educationLevelHighByRegion_ITG, educationLevelHighByRegion_UKC, educationLevelHighByRegion_UKD, educationLevelHighByRegion_UKE, @@ -135,11 +130,6 @@ public enum DoublesVariables { educationLevelHighByRegion_UKL, educationLevelHighByRegion_UKM, educationLevelHighByRegion_UKN, - partneredShare_ITC, - partneredShare_ITH, - partneredShare_ITI, - partneredShare_ITF, - partneredShare_ITG, partneredShare_All, partneredShare_UKC, partneredShare_UKD, @@ -634,31 +624,6 @@ public double getDoubleValue(Enum variableID) { if (value != null) { return value.doubleValue(); } else return Double.NaN; //If value missing, returning Double.NaN will plot a gap - case educationLevelHighByRegion_ITC: - value = ((Number) Parameters.getValidationEducationLevelByRegion().getValue(model.getYear()-1, "educ_high_ITC")); - if (value != null) { - return value.doubleValue(); - } else return Double.NaN; //If value missing, returning Double.NaN will plot a gap - case educationLevelHighByRegion_ITH: - value = ((Number) Parameters.getValidationEducationLevelByRegion().getValue(model.getYear()-1, "educ_high_ITH")); - if (value != null) { - return value.doubleValue(); - } else return Double.NaN; //If value missing, returning Double.NaN will plot a gap - case educationLevelHighByRegion_ITI: - value = ((Number) Parameters.getValidationEducationLevelByRegion().getValue(model.getYear()-1, "educ_high_ITI")); - if (value != null) { - return value.doubleValue(); - } else return Double.NaN; //If value missing, returning Double.NaN will plot a gap - case educationLevelHighByRegion_ITF: - value = ((Number) Parameters.getValidationEducationLevelByRegion().getValue(model.getYear()-1, "educ_high_ITF")); - if (value != null) { - return value.doubleValue(); - } else return Double.NaN; //If value missing, returning Double.NaN will plot a gap - case educationLevelHighByRegion_ITG: - value = ((Number) Parameters.getValidationEducationLevelByRegion().getValue(model.getYear()-1, "educ_high_ITG")); - if (value != null) { - return value.doubleValue(); - } else return Double.NaN; //If value missing, returning Double.NaN will plot a gap case educationLevelHighByRegion_UKC: value = ((Number) Parameters.getValidationEducationLevelByRegion().getValue(model.getYear()-1, "educ_high_UKC")); if (value != null) { @@ -719,31 +684,6 @@ public double getDoubleValue(Enum variableID) { if (value != null) { return value.doubleValue(); } else return Double.NaN; //If value missing, returning Double.NaN will plot a gap - case partneredShare_ITC: - value = ((Number) Parameters.getValidationPartneredShareByRegion().getValue(model.getYear()-1, "partnered_ITC")); - if (value != null) { - return value.doubleValue(); - } else return Double.NaN; //If value missing, returning Double.NaN will plot a gap - case partneredShare_ITH: - value = ((Number) Parameters.getValidationPartneredShareByRegion().getValue(model.getYear()-1, "partnered_ITH")); - if (value != null) { - return value.doubleValue(); - } else return Double.NaN; //If value missing, returning Double.NaN will plot a gap - case partneredShare_ITI: - value = ((Number) Parameters.getValidationPartneredShareByRegion().getValue(model.getYear()-1, "partnered_ITI")); - if (value != null) { - return value.doubleValue(); - } else return Double.NaN; //If value missing, returning Double.NaN will plot a gap - case partneredShare_ITF: - value = ((Number) Parameters.getValidationPartneredShareByRegion().getValue(model.getYear()-1, "partnered_ITF")); - if (value != null) { - return value.doubleValue(); - } else return Double.NaN; //If value missing, returning Double.NaN will plot a gap - case partneredShare_ITG: - value = ((Number) Parameters.getValidationPartneredShareByRegion().getValue(model.getYear()-1, "partnered_ITG")); - if (value != null) { - return value.doubleValue(); - } else return Double.NaN; //If value missing, returning Double.NaN will plot a gap case partneredShare_All: value = ((Number) Parameters.getValidationPartneredShareByRegion().getValue(model.getYear()-1, "partnered_All")); if (value != null) { diff --git a/src/main/java/simpaths/model/enums/Country.java b/src/main/java/simpaths/model/enums/Country.java index 91551afb0..c75e32cb5 100644 --- a/src/main/java/simpaths/model/enums/Country.java +++ b/src/main/java/simpaths/model/enums/Country.java @@ -2,7 +2,6 @@ public enum Country { - IT("Italy", 9), //Italy UK("United Kingdom", 15); //United Kingdom of Great Britain and Northern Ireland //EUROMOD country codes for all EU countries diff --git a/src/main/java/simpaths/model/enums/Region.java b/src/main/java/simpaths/model/enums/Region.java index 3fc435ca6..7b4928ec5 100644 --- a/src/main/java/simpaths/model/enums/Region.java +++ b/src/main/java/simpaths/model/enums/Region.java @@ -6,14 +6,6 @@ public enum Region implements IntegerValuedEnum { //Uses NUTS Level 1 system for each country - //Italy //Name //EUROMOD drgn1 value - ITC("Nord Ovest", 1), //Nord Ovest 1 - ITF("Sud", 4), //Sud 4 - ITG("Isole", 5), //Isole 5 - ITH("Nord Est", 2), //Nord Est (formerly ITD) 2 - ITI("Centro", 3), //Centro (formerly ITE) 3 - //See https://www.euromod.ac.uk/sites/default/files/country-reports/year6/Y7_CR_IT_Final.pdf page 41 for definition EUROMOD variable drgn2 which corresponds to NUTS level 2, from which can be imputed the NUTS level 1 and therefore meaning of drgn1 values. - //UK //Name //EUROMOD drgn1 value UKC("North East", 1), //North East //1 UKD("North West", 2), //North West //2 diff --git a/src/main/resources/images/IT.png b/src/main/resources/images/IT.png deleted file mode 100644 index f3b8dce499c5cadf6bf370f3971e13c822452bf0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 161 zcmeAS@N?(olHy`uVBq!ia0vp^GC(ZI!2~27KSs*}sSHmS$B>FS$q5S>6H*cq9(;V* z`1$|;|L2b!Idb5@ho66+vrgrHwD-~fe}8|!zi;26z|4HOzU{xx8J+pl&itG@@s#3; zvp>F@Gk?~fW-oL9W_`iml;39$9r*l2Tv#{8D(l6Hg^Szzq^x!@GFVv3%T?AXCIjtc N@O1TaS?83{1OUVJM*RQ)