Time_Plugin

The Time_Plugin generates a dictionary containing the time-related quantities used throughout the calculation workflow.

All generated quantities are dimensionless. Calendar years are treated as labels or indices rather than physical durations.

Notation

Notation

Symbol

Description

\(Y_{ref}\)

Reference year

\(Y_{start}\)

Startup year

\(t_{const}\)

Construction time

\(t_{life}\)

Plant life

\(\Delta Y\)

Startup time offset

Generated quantities

Startup time offset

\[\Delta Y = Y_{start} - Y_{ref}\]

Plant years relative

The array of all years involved in the project, including construction years.

\[\mathrm{Plant Years Relative} = \left[ -t_{const}, \ldots, -1, 0, 1, \ldots, t_{life}-1 \right]\]

where year 0 corresponds to the first year of operation.

Operation years

The calendar years during which production occurs.

\[\mathrm{Operation Years} = \left[ Y_{start}, Y_{start}+1, \ldots, Y_{start}+t_{life}-1 \right]\]

Operation years relative

The operation years expressed relative to startup.

\[\mathrm{Operation Years Relative} = \left[ 0, 1, \ldots, t_{life}-1 \right]\]

Operation years ones

Array of ones having the same length as the operation period.

\[\mathrm{Operation Years Ones} = \left[ 1, 1, \ldots, 1 \right]\]

Example

Consider:

Parameter

Value

Reference year

2020

Startup year

2025

Construction time

2 years

Plant life

5 years

The plugin generates:

\[\Delta Y = 2025 - 2020 = 5\]
Startup time offset:
5

Plant years relative:
[-2, -1, 0, 1, 2, 3, 4]

Operation years:
[2025, 2026, 2027, 2028, 2029]

Operation years relative:
[0, 1, 2, 3, 4]

Operation years ones:
[1, 1, 1, 1, 1]

Returned dictionary

The plugin inserts:

Time
└── Years
    └── Value

which contains:

{
    "Startup time offset": 5,
    "Plant years relative": [-2, -1, 0, 1, 2, 3, 4],
    "Operation years": [2025, 2026, 2027, 2028, 2029],
    "Operation years relative": [0, 1, 2, 3, 4],
    "Operation years ones": [1, 1, 1, 1, 1]
}

These quantities are subsequently used by other plugins whenever time indexing, yearly arrays, inflation corrections, or project scheduling information are required.

Classes:

Time_Plugin(dcf, print_info)

Generation of a unique dictionary contianing all the necessary time-related arrays and values for other plugins.

class pyH2A.Plugins.Time_Plugin.Time_Plugin(dcf, print_info)[source]

Generation of a unique dictionary contianing all the necessary time-related arrays and values for other plugins. All the quantities are dimensionless, no conversion being expected, and the years play the role of indexes rather than durations.

Parameters:
Construction > […] > Valueint or float

Fraction of capital spent during each construction year. Serves to determine the duration of the construction.

Financial Input Values > Plant life > Valueint or float

Operating lifetime of the plant.

Financial Input Values > Assumed start-up year > Valueint

Year the operation starts.

Financial Input Values > Reference year > Valueint

Reference year for startup.

Returns:
Time > Years > Valuedict

Dictionary containing all the year-related variables that are needed in other plugins. Startup time offset: the offset between the reference year and the startup year (scalar) Plant years relative: array of indexes representing the years involved in the plant life, 0 being the year production starts Operation years: Array containing the calendar years during which production takes place Operation years relative: array of indexes representing the years during which production takes place, 0 being the year production starts Start index: relative year of startup Operation years ones: array of ones, of length equal to the number of production years Analysis years ones: array of ones, of length equal to the construciton time + the number of production years Construction years ones: array of ones, of length equal to the number of construction years