Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sim modification functions to userguide #501

Merged
merged 3 commits into from
May 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/src/internals/montecarlo.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,14 @@ generate_trials!(sim, N, filename=joinpath(output_dir, "trialdata.csv"))
set_models!(sim, m)
run_sim(sim, output_dir=output_dir)
```
### Simulation Modification Functions
A small set of unexported functions are available to modify an existing `Simulation`. The functions include:
* `deleteRV!`
* `addRV!`
* `replaceRV!`
* `deleteTransform!`
* `addTransform!`
* `deleteSave!`
* `addSave!`
* `set_payload!`
* `payload`
2 changes: 1 addition & 1 deletion docs/src/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ is_timestep
load_comps
modeldef
name
new_comp
parameters
parameter_names
parameter_dimensions
plot_comp_graph
replace_comp!
replaceRV!
run_sim
set_dimension!
set_leftover_params!
Expand Down
13 changes: 12 additions & 1 deletion docs/src/tutorials/tutorial_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ of all scenario value vectors. In situations in which you want the SA loop to ru
some of the models, the remainder of the runs can be handled using a `pre_trial_func` or
`post_trial_func`.

### Step 2. Generate Trials
### Step 3. Generate Trials

The [`generate_trials!`](@ref) function generates all trial data, and save all random variable values in a file. Employ this function as follows:

Expand Down Expand Up @@ -262,3 +262,14 @@ set_models!(mcs, [base, marginal])
generate_trials!(mcs, N; filename = "ecs_sample.csv")
run_sim!(mcs; post_trial_func = my_scc_calculation)
```
## Simulation Modification Functions
A small set of unexported functions are available to modify an existing `Simulation`. The functions include:
* `deleteRV!`
* `addRV!`
* `replaceRV!`
* `deleteTransform!`
* `addTransform!`
* `deleteSave!`
* `addSave!`
* `set_payload!`
* `payload`
1 change: 0 additions & 1 deletion src/Mimi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export
load_comps,
modeldef,
name,
new_comp,
parameters,
parameter_dimensions,
parameter_names,
Expand Down