# plot results:
col_names = ["start_time", "0"]
bl = res["output"]["locations_active_baseloads"][:, col_names]
ch = res["output"]["locations_charging_powers"][:, col_names]
to = res["output"]["locations_active_powers"][:, col_names]
times = res["output"]["locations_powers"][:, :start_time]
time_start = floor(minimum(times), Hour(1))
time_end = ceil(maximum(times), Hour(1))
ticks = time_start:Hour(1):time_end
# legend = false
legend = :bottom
plt = plot(size=(600, 400), xticks=ticks)
plot!(plt, bl[:,1], bl[:,2], linewidth=2,
linecolor=:brown, xrot=30, grid=:on, fmt=:svg, left_margin=5Plots.mm, bottom_margin=10Plots.mm, seriestype=:steppost, legend=legend, label="baseload", ls=:dash)
plot!(plt, to[:,1], to[:,2], linewidth=2,
linecolor=:blue, xrot=30, grid=:on, fmt=:svg, left_margin=5Plots.mm, bottom_margin=10Plots.mm, seriestype=:steppost, legend=legend, label="total")
xt = xticks(plt)
# ticks_format = "dd HH:MM"
ticks_format = "HH:MM"
xticks!(plt, xt[1][1], Dates.format.(DateTime.(xt[1][2]), ticks_format))
xaxis!(plt, rotation=45)
xlabel!(plt, "time")
ylabel!(plt, "power (kW)")