Commit ac5f5efd authored by Alexander Schiewe's avatar Alexander Schiewe
Browse files

Add last bugfixes for initial release

parent 7f0d940c
lc_average_distance; 4390.974510112171 lc_average_distance; 4278.691937220739
lc_average_edges; 16.554347826086957 lc_average_edges; 16.274725274725274
lc_average_length; 6.741054748612596 lc_average_length; 6.663526073690003
lc_cost; 6883 lc_cost; 6934
lc_feasible; true lc_feasible; true
lc_min_distance; 148.74772066473318 lc_min_distance; 148.74772066473318
lc_min_edges; 1.0 lc_min_edges; 1.0
lc_min_length; 0.373518900016 lc_min_length; 0.373518900016
lc_obj_direct_travellers_sp; 48545 lc_obj_direct_travellers_sp; 47616
lc_obj_game; 48262 lc_obj_game; 47205
lc_prop_directed_lines; 92 lc_prop_directed_lines; 91
lc_prop_freq_max; 4 lc_prop_freq_max; 4
lc_time_average; 26.142859956764315 lc_time_average; 26.142859956764315
lc_var_distance; 5663182.617455538 lc_var_distance; 5505189.573452916
lc_var_edges; 102.16008979206049 lc_var_edges; 101.14430624320738
lc_var_length; 15.758873321190748 lc_var_length; 15.905016874383051
lc_average_distance; 234.54457117608246 lc_average_distance; 236.9267361936697
lc_average_edges; 4.46875 lc_average_edges; 4.535714285714286
lc_average_length; 8.9375 lc_average_length; 9.071428571428571
lc_cost; 5239.9 lc_cost; 5193.5
lc_feasible; true lc_feasible; true
lc_min_distance; 100.0 lc_min_distance; 100.0
lc_min_edges; 1.0 lc_min_edges; 1.0
lc_min_length; 2.0 lc_min_length; 2.0
lc_obj_direct_travellers_sp; 1892 lc_obj_direct_travellers_sp; 1892
lc_obj_game; 3662 lc_obj_game; 4096
lc_prop_directed_lines; 64 lc_prop_directed_lines; 56
lc_prop_freq_max; 14 lc_prop_freq_max; 15
lc_time_average; 21.44776119402985 lc_time_average; 21.44776119402985
lc_var_distance; 10926.344131827587 lc_var_distance; 12080.007390900952
lc_var_edges; 3.5615234375 lc_var_edges; 3.8201530612244916
lc_var_length; 14.24609375 lc_var_length; 15.280612244897966
\ No newline at end of file
...@@ -10,11 +10,11 @@ ean_prop_activities_od_change; 589 ...@@ -10,11 +10,11 @@ ean_prop_activities_od_change; 589
ean_prop_activities_od_drive; 656 ean_prop_activities_od_drive; 656
ean_prop_activities_od_wait; 549 ean_prop_activities_od_wait; 549
ean_prop_activities_wait; 592 ean_prop_activities_wait; 592
ean_prop_change_od_max; 1220.0 ean_prop_change_od_max; 1220
ean_prop_change_od_min; 172.38095238095238 ean_prop_change_od_min; 172.38
ean_prop_events; 1388 ean_prop_events; 1388
ean_prop_events_arrival; 694 ean_prop_events_arrival; 694
ean_prop_events_departure; 694 ean_prop_events_departure; 694
ean_prop_headways_dep; true ean_prop_headways_dep; true
ean_prop_headways_interstation; false ean_prop_headways_interstation; false
ean_time_average; 36.41232944009028 ean_time_average; 36.41
\ No newline at end of file
ean_prop_activities; 1704 ean_prop_activities; 1734
ean_prop_activities_change; 1310 ean_prop_activities_change; 1350
ean_prop_activities_drive; 182 ean_prop_activities_drive; 182
ean_prop_activities_headway; 0 ean_prop_activities_headway; 0
ean_prop_activities_od; 517 ean_prop_activities_od; 506
ean_prop_activities_od_change; 206 ean_prop_activities_od_change; 201
ean_prop_activities_od_drive; 176 ean_prop_activities_od_drive; 175
ean_prop_activities_od_wait; 135 ean_prop_activities_od_wait; 130
ean_prop_activities_wait; 144 ean_prop_activities_wait; 144
ean_prop_events; 364 ean_prop_events; 364
ean_prop_events_arrival; 182 ean_prop_events_arrival; 182
ean_prop_events_departure; 182 ean_prop_events_departure; 182
ean_time_average; 10.036128381784573 ean_time_average; 10.23
lc_average_distance; 316.4926892214381 lc_average_distance; 309.35
lc_average_edges; 4.75 lc_average_edges; 4.77
lc_average_length; 9.5 lc_average_length; 9.54
lc_cost; 963.65 lc_cost; 963.65
lc_feasible; true lc_feasible; true
lc_min_distance; 100.0 lc_min_distance; 100
lc_min_edges; 1.0 lc_min_edges; 1
lc_min_length; 2.0 lc_min_length; 2
lc_obj_direct_travellers_sp; 1683 lc_obj_direct_travellers_sp; 1682
lc_obj_game; 481 lc_obj_game; 467
lc_prop_directed_lines; 24 lc_prop_directed_lines; 26
lc_prop_freq_max; 3 lc_prop_freq_max; 3
lc_time_average; 22.161822466614296 lc_time_average; 22.16
lc_var_distance; 12332.377669382186 lc_var_distance; 11996.36
lc_var_edges; 1.6875 lc_var_edges; 1.56
lc_var_length; 6.75 lc_var_length; 6.25
lpool_cost; 1620.8500000000004 lpool_cost; 1620.85
lpool_feasible_circles; true lpool_feasible_circles; true
lpool_feasible_od; true lpool_feasible_od; true
lpool_prop_directed_lines; 64 lpool_prop_directed_lines; 64
lpool_time_average; 21.673998428908092 lpool_time_average; 21.67
od_prop_entries_greater_zero; 567 od_prop_entries_greater_zero; 567
od_prop_overall_sum; 2546.0 od_prop_overall_sum; 2546
ptn_feasible_od; true ptn_feasible_od; true
ptn_obj_stops; 25 ptn_obj_stops; 25
ptn_prop_edges; 40 ptn_prop_edges; 40
ptn_time_average; 8.702499584431566 ptn_time_average; 8.70
tim_feasible; true tim_feasible; true
tim_obj_ptt1; 60709 tim_obj_ptt1; 60442
tim_obj_slack_average; 22 tim_obj_slack_average; 22
tim_perceived_time_average; 20.545562 tim_perceived_time_average; 20.62
tim_time_average; 18.766300 tim_time_average; 18.91
dm_feasible; true dm_feasible; true
dm_obj_changes_missed_od; 3 dm_obj_changes_missed_od; 6
dm_obj_delay_events_average; 44.06579849211789 dm_obj_delay_events_average; 44.23750855578371
dm_obj_dm2; 402387 dm_obj_dm2; 459689
dm_obj_dm2_average; 158.04673998428908 dm_obj_dm2_average; 180.5534171249018
dm_prop_events_delayed; 124 dm_prop_events_delayed; 133
dm_prop_headways_swapped; 0 dm_prop_headways_swapped; 0
dm_time_average; 3631.5563629222315 dm_time_average; 3870.6658811207126
ro_prop_stations_at_begin_or_end; 16 ro_prop_stations_at_begin_or_end; 17
ro_prop_trips; 135 ro_prop_trips; 136
ro_trips_feasible; true ro_trips_feasible; true
vs_average_waiting_time; 15.57 vs_average_waiting_time; 13.2
vs_circulations; 9 vs_circulations; 28
vs_cost; 2905583.8333333335 vs_cost; 2805489.33
vs_empty_cost; 2902058.3333333335 vs_empty_cost; 2801925.33
vs_empty_distance; 30.0 vs_empty_distance; 94
vs_empty_distance_with_depot; 510.0 vs_empty_distance_with_depot; 508
vs_empty_duration_driving; 107.0 vs_empty_duration_driving; 547
vs_empty_duration_standing; 1557.0 vs_empty_duration_standing; 1003
vs_empty_duration_with_depot; 3104.0 vs_empty_duration_with_depot; 2792
vs_empty_trips; 6 vs_empty_trips; 32
vs_empty_trips_depot; 59 vs_empty_trips_depot; 82
vs_feasible; true vs_feasible; true
vs_full_distance; 1282.0 vs_full_distance; 1296
vs_full_duration; 3846.0 vs_full_duration; 3888
vs_maximal_waiting_time; 56.0 vs_maximal_waiting_time; 56
vs_minimal_waiting_time; 2.0 vs_minimal_waiting_time; 0
vs_vehicles; 29 vs_vehicles; 28
ro_prop_stations_at_begin_or_end; 9 ro_prop_stations_at_begin_or_end; 11
ro_prop_trips; 145 ro_prop_trips; 153
ro_trips_feasible; true ro_trips_feasible; true
vs_average_waiting_time; 9.268041237113403 vs_average_waiting_time; 7.27
vs_circulations; 6 vs_circulations; 3
vs_cost; 3338524.782559462 vs_cost; 3368211.68
vs_empty_cost; 2914105.095868647 vs_empty_cost; 2929134.69
vs_empty_distance; 275.602246125692 vs_empty_distance; 640.4
vs_empty_distance_with_depot; 408945.06391243153 vs_empty_distance_with_depot; 418970.35
vs_empty_duration_driving; 81.0 vs_empty_duration_driving; 150
vs_empty_duration_standing; 899.0 vs_empty_duration_standing; 800
vs_empty_duration_with_depot; 1650.0 vs_empty_duration_with_depot; 1630
vs_empty_trips; 25 vs_empty_trips; 20
vs_empty_trips_depot; 67 vs_empty_trips_depot; 63
vs_feasible; true vs_feasible; true
vs_full_distance; 281901.7355716542 vs_full_distance; 291654.93
vs_full_duration; 3761.0 vs_full_duration; 3827
vs_maximal_waiting_time; 35.0 vs_maximal_waiting_time; 33
vs_minimal_waiting_time; 0.0 vs_minimal_waiting_time; 0
vs_vehicles; 23 vs_vehicles; 23
lpool_cost; 1998.3779430000002 lpool_cost; 2654.236176
lpool_feasible_circles; true lpool_feasible_circles; true
lpool_feasible_od; true lpool_feasible_od; true
lpool_prop_directed_lines; 38 lpool_prop_directed_lines; 44
lpool_time_average; 20.981381363139352 lpool_time_average; 20.981381363139352
tim_feasible; true tim_feasible; true
tim_obj_ptt1; 19154 tim_obj_ptt1; 19154
tim_obj_slack_average; 22 tim_obj_slack_average; 22
tim_perceived_time_average; 9.543860 tim_perceived_time_average; 9.54
tim_pesp_gap; 0.0 tim_pesp_gap; 0
tim_time_average; 6.370709 tim_time_average; 6.37
vs_average_waiting_time; 13.870967741935484 vs_average_waiting_time; 13.9
vs_circulations; 12 vs_circulations; 12
vs_cost; 1207375.183333333 vs_cost; 1207375.18
vs_empty_cost; 1201504.5333333332 vs_empty_cost; 1201504.53
vs_empty_distance; 129.6 vs_empty_distance; 129.6
vs_empty_distance_with_depot; 580.8000000000001 vs_empty_distance_with_depot; 580.8
vs_empty_duration_driving; 87.0 vs_empty_duration_driving; 84
vs_empty_duration_standing; 1290.0 vs_empty_duration_standing; 1293
vs_empty_duration_with_depot; 1520.0 vs_empty_duration_with_depot; 1520
vs_empty_trips; 8 vs_empty_trips; 8
vs_empty_trips_depot; 27 vs_empty_trips_depot; 27
vs_feasible; true vs_feasible; true
vs_full_distance; 3609.599999999995 vs_full_distance; 3609.6
vs_full_duration; 1095.0 vs_full_duration; 1095
vs_maximal_waiting_time; 52.0 vs_maximal_waiting_time; 52
vs_minimal_waiting_time; 1.0 vs_minimal_waiting_time; 1
vs_vehicles; 12 vs_vehicles; 12
vs_average_waiting_time; 10.67122507122508 vs_average_waiting_time; 10.67
vs_circulations; 1 vs_circulations; 1
vs_cost; 4019154.6903885696 vs_cost; 4019154.69
vs_empty_cost; 4012904.445815768 vs_empty_cost; 4012904.45
vs_empty_distance; 0.0 vs_empty_distance; 0
vs_empty_distance_with_depot; 1373.3527660676966 vs_empty_distance_with_depot; 1373.35
vs_empty_duration_driving; 0.0 vs_empty_duration_driving; 0
vs_empty_duration_standing; 3745.6000000000035 vs_empty_duration_standing; 3745.6
vs_empty_duration_with_depot; 26026.600000000002 vs_empty_duration_with_depot; 26026.6
vs_empty_trips; 0 vs_empty_trips; 0
vs_empty_trips_depot; 78 vs_empty_trips_depot; 78
vs_feasible; true vs_feasible; true
vs_full_distance; 2847.0519374234295 vs_full_distance; 2847.05
vs_full_duration; 4751.2000000000035 vs_full_duration; 4751.2
vs_maximal_waiting_time; 57.3 vs_maximal_waiting_time; 57.3
vs_minimal_waiting_time; 0.4 vs_minimal_waiting_time; 0.4
vs_vehicles; 40 vs_vehicles; 40
...@@ -34,7 +34,7 @@ public class CsvWriter { ...@@ -34,7 +34,7 @@ public class CsvWriter {
private static DecimalFormat decimalFormat = provideDecimalFormat(); private static DecimalFormat decimalFormat = provideDecimalFormat();
private static DecimalFormat provideDecimalFormat() { private static DecimalFormat provideDecimalFormat() {
DecimalFormat result = new DecimalFormat(".##"); DecimalFormat result = new DecimalFormat("0.##");
result.setRoundingMode(RoundingMode.HALF_UP); result.setRoundingMode(RoundingMode.HALF_UP);
return result; return result;
} }
......
package net.lintim.model; package net.lintim.model;
import net.lintim.io.CsvWriter;
import java.util.Arrays; import java.util.Arrays;
/** /**
...@@ -139,8 +137,8 @@ public class Stop implements Node { ...@@ -139,8 +137,8 @@ public class Stop implements Node {
String.valueOf(getId()), String.valueOf(getId()),
getShortName(), getShortName(),
getLongName(), getLongName(),
getxCoordinate(), String.valueOf(getxCoordinate()),
getyCoordinate() String.valueOf(getyCoordinate())
}; };
} }
} }
# stop-id; short-name; long-name; x-coordinate; y-coordinate # stop-id; short-name; long-name; x-coordinate; y-coordinate
1; 1; Eins; 100; 200 1; 1; Eins; 100.0; 200.0
2; 2; Zwei; 200; 300 2; 2; Zwei; 200.0; 300.0
3; 3; Drei; 200; 200 3; 3; Drei; 200.0; 200.0
4; 4; Vier; 200; 100 4; 4; Vier; 200.0; 100.0
5; 5; Fuenf; 300; 100 5; 5; Fuenf; 300.0; 100.0
6; 6; Sechs; 300; 200 6; 6; Sechs; 300.0; 200.0
7; 7; Sieben; 300; 300 7; 7; Sieben; 300.0; 300.0
8; 8; Acht; 400; 200 8; 8; Acht; 400.0; 200.0
...@@ -23,9 +23,15 @@ import org.junit.runners.Suite; ...@@ -23,9 +23,15 @@ import org.junit.runners.Suite;
public class TestRunner { public class TestRunner {
public static void main(String[] args) { public static void main(String[] args) {
Result result = JUnitCore.runClasses(TestRunner.class); Result result = JUnitCore.runClasses(TestRunner.class);
if (result.getFailures().size() > 0) {
System.out.println("Failures:");
}
for (Failure failure : result.getFailures()) { for (Failure failure : result.getFailures()) {
System.out.println(failure); System.out.println(failure);
} }
System.out.println("Successfull: " + result.wasSuccessful() + ", ran " + result.getRunCount() + " tests."); System.out.println("Successfull: " + result.wasSuccessful() + ", ran " + result.getRunCount() + " tests.");
if (!result.wasSuccessful()) {
System.exit(1);
}
} }
} }
...@@ -108,7 +108,7 @@ class LineReader: ...@@ -108,7 +108,7 @@ class LineReader:
raise DataIndexNotFoundException("Line", line_id) raise DataIndexNotFoundException("Line", line_id)
line.setLength(length) line.setLength(length)
line.setCost(cost) line.setCost(cost)
self.read_lines.append(line) self.read_lines.add(line)
@staticmethod @staticmethod
def read(ptn: Graph[Stop, Link], read_lines: bool = True, read_costs: bool = True, read_frequencies: bool = True, def read(ptn: Graph[Stop, Link], read_lines: bool = True, read_costs: bool = True, read_frequencies: bool = True,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment