Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions src/main/java/simpaths/data/Parameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public static final double childrenNumDiscrepancyConstraint(double numberOfChild
//public static int MAX_AGE_IN_EDUCATION;// = MAX_AGE;//30; // Max age a person can stay in education //Cannot set here, as MAX_AGE is not known yet. Now set to MAX_AGE in buildObjects in Model class.
//public static int MAX_AGE_MARRIAGE;// = MAX_AGE;//75; // Max age a person can marry //Cannot set here, as MAX_AGE is not known yet. Now set to MAX_AGE in buildObjects in Model class.
private static int MIN_START_YEAR = 2011; //Minimum allowed starting point. Should correspond to the oldest initial population.
private static int MAX_START_YEAR = 2023; //Maximum allowed starting point. Should correspond to the most recent initial population.
private static int MAX_START_YEAR = 2020; //Maximum allowed starting point. Should correspond to the most recent initial population.
public static int startYear;
public static int endYear;
private static int MIN_START_YEAR_TRAINING = 2011;
Expand Down Expand Up @@ -1752,17 +1752,6 @@ public static int getMinStartYear() {
return (trainingFlag) ? MIN_START_YEAR_TRAINING : MIN_START_YEAR;
}

public static void validateStartYear(int year) {
int min = getMinStartYear();
int max = getMaxStartYear();
if (year < min || year > max) {
String mode = trainingFlag ? "training data" : "real data";
throw new IllegalArgumentException(
"Start year " + year + " is outside the allowed range [" + min + ", " + max + "] for " + mode + ". " +
"Choose a value within the supported initial-population years (or toggle the -t/--training flag if appropriate).");
}
}

public static String getEuromodOutputDirectory(Country country) {
//return (trainingFlag) ? EUROMOD_TRAINING_DIRECTORY : EUROMOD_OUTPUT_DIRECTORY;
return (trainingFlag) ? INPUT_DIRECTORY + country + File.separator + "EUROMODoutput" + File.separator + "training" + File.separator : INPUT_DIRECTORY + country + File.separator + "EUROMODoutput" + File.separator;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/simpaths/experiment/SimPathsMultiRun.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ public static void main(String[] args) {
// without this call the DBSetup branch crashes with "No PSA rules for country=".
Parameters.defineCountryString(country);

Parameters.validateStartYear(startYear);

/*comment these lines if input folder needs to be saved in output*/
// Disable copying input folders into output
ExperimentManager.getInstance().copyInputFolderStructure = false;
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/simpaths/experiment/SimPathsStart.java
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,6 @@ private static void resetCommandLineState() {
@Override
public void buildExperiment(SimulationEngine engine) {

Parameters.validateStartYear(startYear);

// instantiate simulation processes
SimPathsModel model = new SimPathsModel(country, startYear);
model.setEndYear(endYear);
Expand Down Expand Up @@ -371,8 +369,6 @@ private static void runGUIlessSetup(int option) throws FileNotFoundException {
}
}

Parameters.validateStartYear(startYear);

writeSelectedCountryAndYear();

if (reuseExistingDatabase) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,6 @@
*******************************************************************************/
clear all

/*******************************************************************************
* Ensure required user-written packages are installed
*******************************************************************************/
local ssc_pkgs "ineqdeco fre unique grc1leg2"
foreach pkg of local ssc_pkgs {
capture which `pkg'
if _rc ssc install `pkg', replace
}

* grc1leg lives on Vince Wiggins' site, not SSC
capture which grc1leg
if _rc net install grc1leg, from("http://www.stata.com/users/vwiggins/")
/*******************************************************************************/

set logtype smcl
set more off
set mem 200m
Expand Down Expand Up @@ -94,8 +80,6 @@ global max_age 65
* Observations up to and including this simulated year will be kept in the sample
global min_year 2011
global max_year 2023
global min_sim_year ${min_year}
global max_sim_year ${max_year}

* Define age to become responsible as defined in the simulation
global age_become_responsible 16
Expand All @@ -121,9 +105,9 @@ do "${dir_do_files}/03_create_EU_SILC_validation_targets.do"
*******************************************************************************/

* List of SimPath Set ups to loop through
global alignments "alignment_00_populationOFF alignment_01_population alignment_02a_population_fertility alignment_02b_population_cohabitation alignment_02c_population_disability alignment_02d_population_inschool alignment_02e_population_retirement alignment_03_population_fertility_cohabitation alignment_04_population_fertility_cohabitation_employment"
local alignments "output_refactored_runs3_popsize30000"

foreach align in $alignments {
foreach align in `alignments' {


/*******************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
* NOTES:
********************************************************************************

local align "output_refactored_runs3_popsize30000"

global dir_simulated_data "$path/simulated_data/`align'/csv"


* Import required variables from household file
Expand Down
Loading