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

Added option for logscale

parent 32c25072
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,4 @@ for name in model_filenames
end
#TODO put all the generated models in an archive file and save it to the archiving location
......@@ -90,7 +90,7 @@ include(paths[:dispatcher]*"dispatcher.jl")
x, y = getValue(index-1, 4, 60, 40, 0.2, 2.5, 60)
x, y = getLogLogValue(index-1, 4, 6000, 40, 0.2, 6000, 60)
println("$x\t$y")
random_gens = Dict(request_type => [:notRandom, y*t0])
......
......@@ -31,8 +31,31 @@ function getValue(index, xmin, xmax, xlen, ymin, ymax, ylen)
y = trunc(Int64, index/ylen) * ystep + ymin
return x,y
end
function getLogValue(index, xmin, xmax, xlen::Int64, ymin, ymax, ylen::Int64)
xs = exp.(LinRange(log(xmin), log(xmax), xlen))
ys = LinRange(log(ymin), log(ymax), ylen)
x = xs[(index-1)%xlen+1]
y = ys[trunc(Int64, (index-1)/ylen)+1]
return x,y
end
"""
"""
function getLogLogValue(index, xmin, xmax, xlen::Int64, ymin, ymax, ylen::Int64)
xs = exp.(LinRange(log(xmin), log(xmax), xlen))
ys = exp.(LinRange(log(ymin), log(ymax), ylen))
println(length(xs));
x = xs[(index-1)%xlen+1]
y = ys[trunc(Int64, (index-1)/ylen)+1]
return x,y
end
"""
Function for Running a RidePooling simulation with the normalized Frequency x
"""
......
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