Skip to content
Merged
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
6 changes: 3 additions & 3 deletions src/main/java/simpaths/model/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ protected boolean inSchool(double probitAdjustment) {
// IMPORTANT ensure each "if" returns true/false or toLeaveSchool value

// Innovation for education decisions
double labourInnov = innovations.getDoubleDraw(24);
double eduInnov = innovations.getDoubleDraw(24);

// Check if the individual is eligible for education transitions
if (Les_c4.Retired.equals(les_c4) ||
Expand Down Expand Up @@ -1327,7 +1327,7 @@ protected boolean inSchool(double probitAdjustment) {
// Follow process E1a
double score = Parameters.getRegEducationE1a().getScore(this, Person.DoublesVariables.class);
double prob = Parameters.getRegEducationE1a().getProbability(score + probitAdjustment);
toLeaveSchool = (labourInnov >= prob); // Stay in school if event is false, leave otherwise
toLeaveSchool = (eduInnov >= prob); // Stay in school if event is false, leave otherwise
//Ded and Les_c4 remain the same if toLeaveSchool = false, no need to respecify them
//if toLeaveSchool = false, then Ded and Les_c4 are modified in the leavingSchool() method
}
Expand All @@ -1339,7 +1339,7 @@ protected boolean inSchool(double probitAdjustment) {
double score = Parameters.getRegEducationE1b().getScore(this, Person.DoublesVariables.class);
double prob = Parameters.getRegEducationE1b().getProbability(score + probitAdjustment);

if (labourInnov < prob) {
if (eduInnov < prob) {
// Remain or become a student
setLes_c4(Les_c4.Student);
setDer(Indicator.True);
Expand Down
Loading