Skip to content
Snippets Groups Projects
Commit fb8e8231 authored by Ruben Haag's avatar Ruben Haag
Browse files

Version that is working on the cluster

parent 7258b42d
No related branches found
No related tags found
No related merge requests found
name = "ridepooling_si,ulatioms" name = "ridepooling_simulatioms"
authors = ["Ruben Haag<ruben.haag@stud.uni-goettingen.de>"] authors = ["Ruben Haag<ruben.haag@stud.uni-goettingen.de>"]
version = "0.1.0" version = "0.1.0"
......
...@@ -26,14 +26,14 @@ save_path = "" #TODO What savepath? ...@@ -26,14 +26,14 @@ save_path = "" #TODO What savepath?
function getValue(index, xmin, xmax, xlen, ymin, ymax, ylen) function getValue(index, xmin, xmax, xlen, ymin, ymax, ylen)
xstep = (xmax-xmin)/xlen xstep = (xmax-xmin)/xlen
ystep = (ymax-ymin)/ylen ystep = (ymax-ymin)/ylen
xs = xmin:xstep:xmax
ys = ymin:ystep:ymax
x = xs[index%xlen + 1]
y = ys[index - index%xlen + 1] x = (index%xlen) * xstep + xmin
y = trunc(Int64, index/ylen) * ystep + ymin
return x,y return x,y
end end
""" """
Function for Running a RidePooling simulation with the normalized Frequency x Function for Running a RidePooling simulation with the normalized Frequency x
""" """
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
N=1 N=1
SAVE_PATH="${PWD}/results/" SAVE_PATH="/scratch01.local/rhaag/earliest_pickup/results/"
INDEX=1 INDEX=1
DATA_PATH="${SAVE_PATH}data/" DATA_PATH="${SAVE_PATH}data/"
MODEL_PATH="${SAVE_PATH}model/" MODEL_PATH="${SAVE_PATH}model/"
......
ENV["PYTHON"]=""
using Pkg using Pkg
Pkg.activate(".") Pkg.activate(".")
#Pkg.add(url="https://gitlab.gwdg.de/smuehle1/RidePooling/", rev="planned_pickup") #Pkg.add(url="https://gitlab.gwdg.de/smuehle1/RidePooling/", rev="planned_pickup")
Pkg.instantiate() #there may be an error here concerning PyCall. The dependencies assume Python to be installed on your system, with package 'matplotlib' installed. #Pkg.instantiate() #there may be an error here concerning PyCall. The dependencies assume Python to be installed on your system, with package 'matplotlib' installed.
#Either just run 'conda install -c conda-forge matplotlib' in your system shell, or follow instructions below (after running this cell and getting an error) to solve everything from within Julia. #Either just run 'conda install -c conda-forge matplotlib' in your system shell, or follow instructions below (after running this cell and getting an error) to solve everything from within Julia.
import RidePooling import RidePooling
...@@ -71,15 +73,15 @@ if !isdir(paths[:model]) ...@@ -71,15 +73,15 @@ if !isdir(paths[:model])
end end
map_folder = paths[:map] map_folder = paths[:map]
requested = 20 * N requested = 100 * N
served = 20 * N served = 100 * N
include(paths[:map]*"map.jl") # include(paths[:map]*"map.jl") #
include(paths[:dispatcher]*"dispatcher.jl") include(paths[:dispatcher]*"dispatcher.jl")
x, y = getValue(index, 0, 100, 10, 1, 5, 10) x, y = getValue(index-1, 0, 100, 20, 3, 10, 10)
println("$x\t$y") println("$x\t$y")
random_gens = Dict(:pickup => [:notRandom, y/t0]) random_gens = Dict(:pickup => [:notRandom, y/t0])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment