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

Current jupyter notebooks

parent 3f93b7c1
Branches
Tags
No related merge requests found
%% Cell type:markdown id: tags:
## Get current Pacages
%% Cell type:code id: tags:
``` julia
using Pkg
Pkg.activate(".")
```
%% Output
 Activating project at `~/Documents/thesis/ridepooling_simulations`
%% Cell type:code id: tags:
``` julia
#Pkg.add(url="https://gitlab.gwdg.de/smuehle1/RidePooling/", rev="planned_pickup")
#Pkg.add(url="https://gitlab.gwdg.de/smuehle1/RidePooling/", rev="myopic_earliest_pickup")
import Pkg;
Pkg.add("Conda")
import Conda
Conda.update()
Pkg.build("PyPlot")
import RidePooling
RP = RidePooling
```
%% Cell type:code id: tags:
``` julia
using Pkg
Pkg.add(url="https://gitlab.gwdg.de/ruben.haag/ridepooling_eval.git", rev="main")
```
%% Cell type:code id: tags:
``` julia
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.
```
%% Output
Precompiling project...
 ✓ RidePooling_eval
1 dependency successfully precompiled in 23 seconds (194 already precompiled)
%% Cell type:code id: tags:
``` julia
Pkg.upgrade_manifest()
```
%% Output
 Updated Format of manifest file at `/home/ruben/Documents/thesis/ridepooling_simulations/Manifest.toml` updated from v1.0 to v2.0
%% Cell type:code id: tags:
``` julia
import RidePooling
Pkg.resolve()
import RidePooling_eval
RP = RidePooling
ev = RidePooling_eval
```
%% Output
 No Changes to `~/Documents/thesis/ridepooling_simulations/Project.toml`
 No Changes to `~/Documents/thesis/ridepooling_simulations/Manifest.toml`
%% Cell type:markdown id: tags:
## Test Run
%% Cell type:code id: tags:
``` julia
```
%% Cell type:code id: tags:
``` julia
# make folder infrastructure and copy all settings to folder
SETTINGS_NAME="./settings.jl"
JOB_NAME = "anywt1_anydt01"
SGE_TASK_ID = 1
run(`julia make_folders.jl $SGE_TASK_ID $SETTINGS_NAME $JOB_NAME`)
```
%% Output
IOError: could not spawn `julia make_folders.jl 1 ./settings.jl anywt1_anydt01`: no such file or directory (ENOENT)
Stacktrace:
[1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Any})
@ Base ./process.jl:100
[2] #690
@ ./process.jl:113 [inlined]
[3] setup_stdios(f::Base.var"#690#691"{Cmd}, stdios::Vector{Any})
@ Base ./process.jl:197
[4] _spawn
@ ./process.jl:112 [inlined]
[5] run(::Cmd; wait::Bool)
@ Base ./process.jl:445
[6] run(::Cmd)
@ Base ./process.jl:444
[7] top-level scope
@ ~/Documents/thesis/ridepooling_simulations/init.ipynb:5
[8] eval
@ ./boot.jl:373 [inlined]
[9] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1196
[10] #invokelatest#2
@ ./essentials.jl:716 [inlined]
[11] invokelatest
@ ./essentials.jl:714 [inlined]
[12] (::VSCodeServer.var"#150#151"{VSCodeServer.NotebookRunCellArguments, String})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/packages/VSCodeServer/src/serve_notebook.jl:18
[13] withpath(f::VSCodeServer.var"#150#151"{VSCodeServer.NotebookRunCellArguments, String}, path::String)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/packages/VSCodeServer/src/repl.jl:185
[14] notebook_runcell_request(conn::VSCodeServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, params::VSCodeServer.NotebookRunCellArguments)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/packages/VSCodeServer/src/serve_notebook.jl:14
[15] dispatch_msg(x::VSCodeServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::VSCodeServer.JSONRPC.MsgDispatcher, msg::Dict{String, Any})
@ VSCodeServer.JSONRPC ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/packages/JSONRPC/src/typed.jl:67
[16] serve_notebook(pipename::String; crashreporting_pipename::String)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/packages/VSCodeServer/src/serve_notebook.jl:94
[17] top-level scope
@ ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/notebook/notebook.jl:12
[18] include(mod::Module, _path::String)
@ Base ./Base.jl:418
[19] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:292
[20] _start()
@ Base ./client.jl:495
%% Cell type:code id: tags:
``` julia
SETTINGS_NAME="./settings.jl"
JOB_NAME = "anywt1_anydt01"
SGE_TASK_ID = 1
run(`julia sim.jl $SGE_TASK_ID $SETTINGS_NAME $JOB_NAME`)
```
%% Output
IOError: could not spawn `julia sim.jl 1 ./settings.jl anywt1_anydt01`: no such file or directory (ENOENT)
Stacktrace:
[1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Any})
@ Base ./process.jl:100
[2] #690
@ ./process.jl:113 [inlined]
[3] setup_stdios(f::Base.var"#690#691"{Cmd}, stdios::Vector{Any})
@ Base ./process.jl:197
[4] _spawn
@ ./process.jl:112 [inlined]
[5] run(::Cmd; wait::Bool)
@ Base ./process.jl:445
[6] run(::Cmd)
@ Base ./process.jl:444
[7] top-level scope
@ ~/Documents/thesis/ridepooling_simulations/init.ipynb:4
[8] eval
@ ./boot.jl:373 [inlined]
[9] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1196
[10] #invokelatest#2
@ ./essentials.jl:716 [inlined]
[11] invokelatest
@ ./essentials.jl:714 [inlined]
[12] (::VSCodeServer.var"#150#151"{VSCodeServer.NotebookRunCellArguments, String})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/packages/VSCodeServer/src/serve_notebook.jl:18
[13] withpath(f::VSCodeServer.var"#150#151"{VSCodeServer.NotebookRunCellArguments, String}, path::String)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/packages/VSCodeServer/src/repl.jl:185
[14] notebook_runcell_request(conn::VSCodeServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, params::VSCodeServer.NotebookRunCellArguments)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/packages/VSCodeServer/src/serve_notebook.jl:14
[15] dispatch_msg(x::VSCodeServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::VSCodeServer.JSONRPC.MsgDispatcher, msg::Dict{String, Any})
@ VSCodeServer.JSONRPC ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/packages/JSONRPC/src/typed.jl:67
[16] serve_notebook(pipename::String; crashreporting_pipename::String)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/packages/VSCodeServer/src/serve_notebook.jl:94
[17] top-level scope
@ ~/.vscode/extensions/julialang.language-julia-1.5.11/scripts/notebook/notebook.jl:12
[18] include(mod::Module, _path::String)
@ Base ./Base.jl:418
[19] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:292
[20] _start()
@ Base ./client.jl:495
%% Cell type:code id: tags:
``` julia
```
%% Cell type:markdown id: tags:
## Calculate route Matrices for all maps
%% Cell type:code id: tags:
``` julia
mapPath = "./Maps/"
matrixPath = mapPath*"/route_matrices/"
include(mapPath*"maps.jl")
for (specs, name) in mapToName
println(specs)
mymap=RP.get_map(specs)
RM=RP.calculate_route_matrix(mymap, savepath=name);
end
```
%% Cell type:code id: tags:
``` julia
```
%% Cell type:markdown id: tags:
## Calculate t0 for maps
%% Cell type:code id: tags:
``` julia
```
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment