Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
isochrone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institut für Informatik
dbis
dbis-isochrone
isochrone
Commits
57344019
Commit
57344019
authored
11 years ago
by
Nikolaus Krismer
Browse files
Options
Downloads
Patches
Plain Diff
fixed runtime calculation
parent
f12f53d8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/it/unibz/inf/isochrone/network/AlgorithmRuntimeTest.java
+10
-5
10 additions, 5 deletions
.../it/unibz/inf/isochrone/network/AlgorithmRuntimeTest.java
with
10 additions
and
5 deletions
src/test/java/it/unibz/inf/isochrone/network/AlgorithmRuntimeTest.java
+
10
−
5
View file @
57344019
...
@@ -43,12 +43,16 @@ public final class AlgorithmRuntimeTest {
...
@@ -43,12 +43,16 @@ public final class AlgorithmRuntimeTest {
private
static
final
Mode
MODE
=
Mode
.
MULTIMODAL
;
private
static
final
Mode
MODE
=
Mode
.
MULTIMODAL
;
private
static
final
double
WALKING_SPEED
=
1.0
;
private
static
final
double
WALKING_SPEED
=
1.0
;
private
static
final
int
MAX_RUNTIME
=
18000
;
// 5 hours;
private
static
final
int
MAX_RUNTIME
=
18000
;
// 5 hours;
private
static
final
int
RUNTIME_POINTS_PER_OFFSET
=
12
;
private
static
final
int
[]
RUNTIME_OFFSETS
=
{
private
static
final
int
[]
RUNTIME_OFFSETS
=
{
60
,
// 1 minute (in sec)
60
,
// 1 minute (in sec)
3600
,
// 1 hour (in sec)
3600
,
// 1 hour (in sec)
86400
// 1 day (in sec)
86400
// 1 day (in sec)
};
};
private
static
final
int
[]
RUNTIME_POINTS_PER_OFFSET
=
{
5
,
// every 5 minutes
2
,
// every 2 hours
1
// every day
};
private
static
Map
<
String
,
InitParams
>
initParamsMap
;
private
static
Map
<
String
,
InitParams
>
initParamsMap
;
private
static
List
<
TestParameters
>
datsetParams
=
new
ArrayList
<>();
private
static
List
<
TestParameters
>
datsetParams
=
new
ArrayList
<>();
private
static
Map
<
String
,
Map
<
String
,
Long
>>
runtimes
=
new
LinkedHashMap
<>();
private
static
Map
<
String
,
Map
<
String
,
Long
>>
runtimes
=
new
LinkedHashMap
<>();
...
@@ -172,10 +176,11 @@ public final class AlgorithmRuntimeTest {
...
@@ -172,10 +176,11 @@ public final class AlgorithmRuntimeTest {
}
}
times
=
new
TreeSet
<
Integer
>();
times
=
new
TreeSet
<
Integer
>();
for
(
int
offset
:
RUNTIME_OFFSETS
)
{
for
(
int
i
=
0
;
i
<
RUNTIME_OFFSETS
.
length
;
++
i
)
{
int
stepWidth
=
(
offset
/
RUNTIME_POINTS_PER_OFFSET
);
int
offset
=
RUNTIME_OFFSETS
[
i
];
for
(
int
i
=
0
;
i
<
offset
;
i
+=
stepWidth
)
{
int
stepWidth
=
RUNTIME_POINTS_PER_OFFSET
[
i
];
int
runtime
=
Math
.
max
(
offset
,
offset
*
i
);
for
(
int
j
=
0
;
j
<
offset
;
j
+=
stepWidth
)
{
int
runtime
=
Math
.
max
(
offset
,
offset
*
j
);
if
(
runtime
>
MAX_RUNTIME
)
{
if
(
runtime
>
MAX_RUNTIME
)
{
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment