Skip to content

Commit

Permalink
minor improvements. debug output only when enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
timhilgert committed Oct 18, 2018
1 parent aba3296 commit 5af0125
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,9 @@ public void addJointActivityforConsideration(HActivity act){
if(HActivity.checkActivityOverlapping(act,tmpact))
{
activityconflict = true;
System.err.println("HH" + getHousehold().getHouseholdIndex() + "/P" + getPersIndex() + ": activity was not added as joint acticity due to conflict with existing activity!");
if (Configuration.debugenabled)
{
System.err.println("HH" + getHousehold().getHouseholdIndex() + "/P" + getPersIndex() + ": activity was not added as joint acticity due to conflict with existing activity!");
System.err.println("act to add: " + act);
System.err.println("existing act: " + tmpact);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public class Configuration {

// activity durations - categories - Lower Bounds
public static final int[] ACT_TIME_TIMECLASSES_LB = { 1, 15, 30, 60, 120, 180, 240, 300, 360, 420, 480, 540, 600, 660, 720 };
// activity durations - categoriesn - Upper Bounds
// activity durations - categories - Upper Bounds
public static final int[] ACT_TIME_TIMECLASSES_UB = { 14, 29, 59, 119, 179, 239, 299, 359, 419, 479, 539, 599, 659, 719, 1440 };
// activity durations - number of categories
public static final int NUMBER_OF_ACT_DURATION_CLASSES = ACT_TIME_TIMECLASSES_LB.length;
Expand All @@ -176,7 +176,7 @@ public class Configuration {
public static final int[] FIRST_TOUR_START_TIMECLASSES_LB = { 0, 120, 240, 360, 420, 480, 540, 600, 660, 780, 900, 960, 1020, 1080, 1200, 1320 };
// start time for first tour of the day - Upper Bounds
public static final int[] FIRST_TOUR_START_TIMECLASSES_UB = { 119, 239, 359, 419, 479, 539, 599, 659, 779, 899, 959, 1019, 1079, 1199, 1319, 1439 };
// start time for first tour of the day - nuber of categories
// start time for first tour of the day - number of categories
public static final int NUMBER_OF_FIRST_START_TIME_CLASSES = FIRST_TOUR_START_TIMECLASSES_LB.length;


Expand All @@ -189,7 +189,7 @@ public class Configuration {
public static final int[] SECTHR_TOUR_START_TIMECLASSES_LB = { 0, 540, 660, 780, 840, 900, 960, 1020, 1080, 1140, 1200};
// start time for second and third tour of the day - Upper Bounds
public static final int[] SECTHR_TOUR_START_TIMECLASSES_UB = { 539, 659, 779, 839, 899, 959, 1019, 1079, 1139, 1199, 1439};
// start time for second and third tour of the day - nuber of categories
// start time for second and third tour of the day - number of categories
public static final int NUMBER_OF_SECTHR_START_TIME_CLASSES = SECTHR_TOUR_START_TIMECLASSES_LB.length;


Expand Down
6 changes: 3 additions & 3 deletions src/main/java/edu/kit/ifv/mobitopp/actitopp/Coordinator.java
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ private void placeJointActivitiesIntoPattern() throws InvalidPatternException
*/
if (possibleact.size()==0)
{
System.err.println("Akt konnte nicht ersetzt werden! Schritt 4");
if (Configuration.debugenabled) System.err.println("Akt konnte nicht ersetzt werden! Schritt 4");
gemakt.removeJointParticipant(person);
break;
}
Expand Down Expand Up @@ -830,7 +830,7 @@ private void placeJointActivitiesIntoPattern() throws InvalidPatternException
*/
if (possibleact.size()==0)
{
System.err.println("Akt konnte nicht ersetzt werden! Schritt 6");
if (Configuration.debugenabled) System.err.println("Akt konnte nicht ersetzt werden! Schritt 6");
gemakt.removeJointParticipant(person);
break;
}
Expand Down Expand Up @@ -902,7 +902,7 @@ private void placeJointActivitiesIntoPattern() throws InvalidPatternException
*/
if (possibleact.size()==0)
{
System.err.println("Akt konnte nicht ersetzt werden! Schritt 9");
if (Configuration.debugenabled) System.err.println("Akt konnte nicht ersetzt werden! Schritt 9");
gemakt.removeJointParticipant(person);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/kit/ifv/mobitopp/actitopp/HActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ public void setJointParticipants(List<ActitoppPerson> gemJointParticipants) {
*/
public void addJointParticipant (ActitoppPerson person)
{
jointParticipants.add(person);
jointParticipants.add(person);
}


Expand Down

0 comments on commit 5af0125

Please sign in to comment.