Skip to content

Commit 6533c26

Browse files
committed
Add note on first and last kwargs
1 parent a189698 commit 6533c26

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/src/howto/howto_1.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,11 @@ set_dimension!(m, :regions, ["USA", "EU", "LATAM"])
6767
The next step is to add components to the model. This is done by the following syntax:
6868

6969
```julia
70+
add_comp!(m, ComponentA)
7071
add_comp!(m, ComponentA, :GDP)
71-
add_comp!(m, ComponentB; first=2010)
72-
add_comp!(m, ComponentC; first=2010, last=2100)
7372
```
7473

75-
The first argument to `add_comp!` is the model, the second is the name of the ComponentId defined by `@defcomp`. If an optional third symbol is provided (as in the first line above), this will be used as the name of the component in this model. This allows you to add multiple versions of the same component to a model, with different names.
74+
The first argument to `add_comp!` is the model, the second is the name of the ComponentId defined by `@defcomp`. If an optional third symbol is provided (as in the second line above), this will be used as the name of the component in this model. This allows you to add multiple versions of the same component to a model, with different names.
7675

7776
The next step is to set the values for all the parameters in the components. Parameters can either have their values assigned from external data, or they can internally connect to the values from variables in other components of the model.
7877

docs/src/howto/howto_6.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,13 @@ to replace the `old` component with `new`, they should now use
146146
replace!(m, old => new)
147147
```
148148

149-
## Different-length Components (TODO CORA)
149+
## Different-length Components
150150

151151
*The Mimi Change:*
152-
- either the functionality will be gone, or implemented differently
152+
Through Mimi v0.9.4, the optional keyword arguments `first` and `last` could be used to specify times for components that do not run for the full length of the model, like this: `add_comp!(mymodel, ComponentC; first=2010, last=2100)`. This functionality is still disabled, as it was starting in v0.9.5, and all components must run for the full length of the model's time dimension. This functionality may be re-implemented in a later version of Mimi.
153153

154154
*The User Change:*
155+
Refactor your model so that all components are the same length. You may use the `run_timestep` function within each component to dictate it's behavior in different timesteps, including doing no calculations for a portion of the full model runtime.
155156

156157
## Marginal Models
157158

0 commit comments

Comments
 (0)