Input Parameter¶
The input parameter is the discretization of the input function. This should be an array \([u(t_0), u(t_1), \dots, u(t_K)]\).
The Input class can create such an array from a selection of typical functions, if initialized with the array of time values.
- class nopec.parameters.Input¶
Discretization of input function.
This
Enumcontains some relevant functions.Inputobjects should be initialized using anndarrayof time steps.Examples
>>> import numpy as np >>> from nopec.parameters import Input >>> Input.CONSTANT_1(np.array([0, 1, 2])) array([1., 1., 1.]) >>> Input.JUMP_3_AT_075(np.array([0, 1, 2])) array([-3., 3., 3.]) >>> Input.JUMP_1_AT_075_THEN_WEAK(np.array([0, 1, 2])) array([-1. , 1. , 0.1]) >>> Input.COS_PLUS_SIN(np.array([0,1,2])) array([ 0.5 , -0.05435766, 0.5020863 ])
- CONSTANT_1()¶
u(t) = 1 (const).
- CONSTANT_MINUS_1()¶
u(t) = -1 (const).
- CONSTANT_MINUS_3()¶
u(t) = -3 (const).
- COS_HALF()¶
u(t) = 0.5 * cos(10 * t).
- COS_PLUS_SIN()¶
u(t) = 0.5 * cos(10 * t) + 0.4 * sin(20 * t).
- JUMP_1_AT_05_TO_NOTHING()¶
u(t) = +1 in [0, 0.5], 0 in (0.5, T].
- JUMP_1_AT_075()¶
u(t) = -1 in [0, 0.75], +1 in (0.75, T].
- JUMP_1_AT_075_THEN_WEAK()¶
u(t) = -1 in [0, 0.75], +1 in (0.75, 1], 0.1 in (1, T].
- JUMP_1_AT_166()¶
u(t) = -1 in [0, 4/3], +1 in (4/3, T].
- JUMP_1_AT_A_THIRD()¶
u(t) = -1 in [0, 2T/3], +1 in (2T/3, T].
- JUMP_1_AT_A_THIRD_AND_EIGHTH()¶
u(t) = -1 in [0, 2T/3], +1 in (2T/3, 7T/8], -1 in (7T/8, T].
- JUMP_3_AT_075()¶
u(t) = -3 in [0, 0.75], +3 in (0.75, T].
- JUMP_3_AT_166()¶
u(t) = -3 in [0, 4/3], +3 in (4/3, T].