Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Ridepooling_Simulations
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
rhaag
Ridepooling_Simulations
Commits
10cb7084
Commit
10cb7084
authored
2 years ago
by
Ruben Haag
Browse files
Options
Downloads
Patches
Plain Diff
Evalutuation of the models I saved
parent
e2a8db37
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
evaluation.jl
+105
-0
105 additions, 0 deletions
evaluation.jl
with
105 additions
and
0 deletions
evaluation.jl
0 → 100644
+
105
−
0
View file @
10cb7084
using
RidePooling
RP
=
RidePooling
using
DataFrames
using
Measurements
import
Base
.
Filesystem
FS
=
Base
.
Filesystem
path
=
"/project.dcf/poss/datasets/planned_pickup/drive_and_wait/anywt1_anydt01/"
model_path
=
path
*
"/models/"
# Values I want to calculate for every model
req_quantitys_mean
=
[
:
relative_delay
,
#:delay,
#:relative_waiting_time,
#:waiting_time,
#:served,
#:requested_distance,
#:requested_time,
#:total_time,
#:travelling_time,
#:resubmitted_served_percentage,
#:dt_earliest_served,
#:dt_earliest,
#:relative_dt_earliest
]
req_quantitys_sum
=
[
:
count_req
,
#:resubmitted_all,
#:resubmitted_served,
]
bus_quantitys
=
[
:
cooldown_time
,
]
model_quantitys
=
[
:
driven_distance
,
#:efficiency,
#:quality
]
results
=
DataFrame
()
results
[
:
index
]
=
Int
[]
results
[
:
dt_earliest_pickup
]
=
Float64
[]
results
[
:
weight
]
=
Float64
[]
results
[
:
resubmission_time_factor
]
=
Float64
[]
results
[
:
ν
]
=
Float64
[]
results
[
:
request_type
]
=
Any
[]
for
quan
in
req_quantitys_mean
results
[
quan
]
=
Measurement
[]
end
for
quan
in
req_quantitys_sum
results
[
quan
]
=
Float64
[]
end
for
quan
in
bus_quantitys
results
[
quan
]
=
Measurement
[]
end
for
quan
in
model_quantitys
results
[
quan
]
=
Measurement
[]
end
filenames
=
readdir
(
model_path
,
join
=
true
)
for
model_nr
in
filenames
model
=
loadmodel
(
model_nr
)
row
=
Dict
()
row
[
:
index
]
=
parse
(
Int
,
FS
.
splitext
(
model_nr
)[
1
])
row
[
:
dt_earliest_pickup
]
=
model
.
random_gens
[
model
.
request_type
][
2
]
row
[
:
idle_wight
]
=
model
.
cost_idle_weight
row
[
:
ν
]
=
model
.
ν
row
[
:
to
]
=
model
.
t0
row
[
:
request_type
]
=
model
.
request_type
for
quan
in
req_quantitys_mean
row
[
quan
]
=
ev
.
quantity
(
quan
,
model_now
)
end
for
quan
in
req_quantitys_sum
row
[
quan
]
=
ev
.
sum
(
quan
,
model
)
end
for
quan
in
bus_quantitys
row
[
quan
]
=
ev
.
quantity
(
quan
,
model
.
agents
,
model
)
end
for
quan
in
model_quantitys
f
=
@eval
(
ev
.$
quan
)
row
[
quan
]
=
f
(
model
)
end
using
Serialization
push!
(
results
,
row
)
end
using
Serialization
serialize
(
path
*
"results.jls"
,
df
)
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