Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/test/Manifest.toml
docs/build
docs/Manifest.toml
docs/src/tutorials/*.md
12 changes: 12 additions & 0 deletions docs/src/manual/discount.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ While it is often normal to assume investments at the start of each
strategic period, it can be more correct to average the discount factor
for operational costs that are accrued throughout the strategic period.

We also provide a method in which the average discount factor is calculated for the beginning of the years within a strategic period:

```@repl ts
using TimeStruct
ts = TwoLevel(5, 10, SimpleTimes(5,1));
sps = strategic_periods(ts)
df_start = [discount(sp, ts, 0.05; type = "avg") for sp in sps]
df_avg = [discount(sp, ts, 0.05; type = "avg_year") for sp in sps]
```

This approach results in a slighly higher discount factor.

To help setting up the objective function in a typical optimization problem,
there is a utility function [`objective_weight`](@ref) that returns
the weight to give a time period in the objective, considering both
Expand Down
111 changes: 23 additions & 88 deletions docs/src/reference/api.md
Original file line number Diff line number Diff line change
@@ -1,154 +1,89 @@
# [Available time structures](@id api-ts)
# [Interface for using `TimeStruct](@id api)

```@docs
TimeStructure
```
## [Available time structures](@id api-ts)

```@docs
SimpleTimes
```
### [Abstract supertypes](@id api-ts-abstract)

```@docs
CalendarTimes
TimeStructure
```

```@docs
RepresentativePeriods
```
### [Conecrete types](@id api-ts-con)

```@docs
SimpleTimes
CalendarTimes
OperationalScenarios
```

```@docs
RepresentativePeriods
TwoLevel
```

```@docs
TwoLevelTree
regular_tree
```

# [Properties of time structures](@id api-prop_ts)
## [Properties of time structures](@id api-prop_ts)

```@docs
mult_scen
```

```@docs
mult_repr
```

```@docs
mult_strat
```

```@docs
probability_scen
```

# [Iterating time structures](@id api-iter)
## [Iterating time structures](@id api-iter)

```@docs
repr_periods
```
### [For individual time structures](@id api-iter-ts)

```@docs
repr_periods
opscenarios
```

```@docs
strat_periods
strategic_periods
```

```@docs
strategic_scenarios
```

```@docs
withprev
```
### [Specialized iterators](@id api-iter-spec)

```@docs
withprev
withnext
```

```@docs
chunk
```

```@docs
chunk_duration
```

# [Properties of time periods](@id api-prop_per)
## [Properties of time periods](@id api-prop_per)

```@docs
duration
```

```@docs
isfirst
```

```@docs
multiple
```

```@docs
multiple_strat
```

```@docs
probability
```

```@docs
start_oper_time
```

```@docs
end_oper_time
```


# [Time profiles](@id api-prof)
## [Time profiles](@id api-prof)

```@docs
FixedProfile
```

```@docs
OperationalProfile
```

```@docs
RepresentativeProfile
```

```@docs
ScenarioProfile
```

```@docs
StrategicProfile
```

```@docs
StrategicStochasticProfile
```

# [Discounting](@id api-disc)
## [Discounting](@id api-disc)

```@docs
discount
```
### [Type](@id api-disc-type)

```@docs
objective_weight
Discounter
```

### [Functions](@id api-disc-type)

```@docs
Discounter
discount
objective_weight
```
Loading