Skip to content

Commit

Permalink
Merge b9b90a4 into 65582b2
Browse files Browse the repository at this point in the history
  • Loading branch information
raunakbh92 committed May 20, 2020
2 parents 65582b2 + b9b90a4 commit 5f295e3
Show file tree
Hide file tree
Showing 8 changed files with 1,074 additions and 381 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ test/media/
# media files generated by scripts
scripts/media/

# ipynb checkpoints in pythonscripts
scripts/pythonscripts/.ipynb_checkpoints

# idm acc trace files stored in lmfit
scripts/lmfit/

# Files generated by invoking Julia with --code-coverage
*.jl.cov
*.jl.*.cov
Expand Down
27 changes: 26 additions & 1 deletion scripts/experiments.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ for i in 1:length(s)
JLD.save("media/upper_$i.jld","m",m,"p",p,"md",md,"veh_id_list",veh_id_list,"ts",ts,"te",te)
end

#*****************Generate idm params for lmfit************
s = scenarios_upper
f = FilteringEnvironment()
name = "upper"

for i in 1:length(s)
veh_id_list = s[i][1]
ts = s[i][2][1]
te = s[i][2][2]
filename = "media/upper_$i.jld";
id_list,ts,te = JLD.load(filename,"veh_id_list","ts","te");
scene_list_true = replay_scenelist(f,id_list=id_list,ts=ts,te=te);

dirname = "$(name)_$(i)"
mkdir("lmfit/$(dirname)")
feat_dict = scenelist2idmfeatures(f,scene_list_true,id_list=id_list,
scenario_name=name,scenario_number=i);
end


#************Docstring example code from multiscenarios_pf in helpers.jl*****
# USEFUL to keep around for making tikz plots later on by rerunning this script
Expand Down Expand Up @@ -87,6 +106,12 @@ coll_mat_list = [coll_mat_idm,coll_mat_cidm,coll_mat_lmidm,coll_mat_pf];
coll_barchart(coll_mat_list,filename = "media/coll_barchart_upper.svg");


#***********Histogram plot****************
# Full example in docstring of Filtering/metrics.jl vel_distribution
a = PGFPlots.Axis([veh_hist_true,v_hist_idm,v_hist_cidm,v_hist_lmidm,v_hist_pf,
Plots.Command(raw"\legend{true,idm,cidm,lmidm,pf}")
]);

#********************Train upper test lower******************
# We need to show a variability in the generated scenarios
# So we need to combine the particle sets of different vehicles together
Expand All @@ -113,4 +138,4 @@ coll_barchart(coll_mat_list,filename = "media/coll_barchart_upper.svg");
# push!(test_tdata,Dict("t"=>t))
# end

# curve_fit(test_lmfit,test_tdata,ydata,[0.5,0.5])
# curve_fit(test_lmfit,test_tdata,ydata,[0.5,0.5])
Loading

0 comments on commit 5f295e3

Please sign in to comment.