Skip to content

Commit

Permalink
Merge pull request #14 from ckingdon95/mimi-update
Browse files Browse the repository at this point in the history
Update run_sim for Mimi 0.8.3
  • Loading branch information
davidanthoff authored Apr 19, 2019
2 parents 838f656 + 24f8c73 commit 6020b1d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/montecarlo/run_fund_mcs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ function run_fund_mcs(trials = 10000; ntimesteps = MimiFUND.default_nsteps + 1,

# Generate trials
if save_trials
generate_trials!(mcs, trials; filename = joinpath(output_dir, "trials.csv"))
filename = joinpath("$output_dir/trials.csv")
generate_trials!(mcs, trials; filename=filename)
else
generate_trials!(mcs, trials)
end

# Run monte carlo trials
set_models!(mcs, getfund())
run_sim(mcs; ntimesteps = ntimesteps, output_dir = "$output_dir/results")
run_sim(mcs; trials = trials, ntimesteps = ntimesteps, output_dir = "$output_dir/results")

return nothing
end
8 changes: 6 additions & 2 deletions src/montecarlo/run_fund_scc_mcs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ function run_fund_scc_mcs(trials = 10000; years = [2020], rates = [0.03], ntimes
mcs = getmcs()

# Generate trials
filename = save_trials ? joinpath(@__DIR__, "$output_dir/trials.csv") : ""
generate_trials!(mcs, trials; filename=filename)
if save_trials
filename = joinpath(@__DIR__, "$output_dir/trials.csv")
generate_trials!(mcs, trials; filename=filename)
else
generate_trials!(mcs, trials)
end

# Get FUND marginal model
mm = create_marginal_FUND_model()
Expand Down

0 comments on commit 6020b1d

Please sign in to comment.