Skip to content

Commit

Permalink
added similar options for Stage 1 cost plot
Browse files Browse the repository at this point in the history
  • Loading branch information
jessemilzman committed Feb 25, 2024
1 parent 644d28a commit df684dd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions experiments/tower_defense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,19 @@ end
"""
Temp. script to calculate and plot heatmap of Stage 1 cost function
"""
function run_visualization()
function run_visualization(;βs =nothing, save_name="")
dr = 0.01
ps = [1/3, 1 / 3, 1 / 3]
βs = [[4.,2.,2.], [2., 3., 2.], [2., 2., 3.]]
if βs == nothing
βs = [[4.,2.,2.], [2., 3., 2.], [2., 2., 3.]]
end
Ks = calculate_stage_1_costs(ps, βs; dr)
fig = display_surface(ps, Ks)
if save_name !== ""
filename = "figures/"*save_name*"stage_1_cost.png"
# filename = "figures/"*save*"stage_1_controls.png"
save(filename, fig)
end
fig
end

Expand Down

0 comments on commit df684dd

Please sign in to comment.