Ramp
Ramp
¶
Bases: Term
Edge term that represents the ramp membership function.
Equation
\(\mu(x) = \begin{cases} h \dfrac{x - s} {e - s} & \mbox{if } s < x < e \cr h \dfrac{s - x} {s - e} & \mbox{if } e < x < s \cr h & \mbox{if } s < e \wedge x \ge e \cr h & \mbox{if } s > e \wedge x \le e \cr 0 & \mbox{otherwise} \end{cases}\)
where
- \(h\): height of the Term
- \(s\): start of the Ramp
- \(e\): end of the Ramp
Attributes¶
Functions¶
__init__
¶
configure
¶
configure(parameters: str) -> None
Configure the term with the parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameters |
str
|
|
required |
membership
¶
Compute the membership function evaluated at \(x\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Scalar
|
scalar |
required |
Returns:
Type | Description |
---|---|
Scalar
|
\(\mu(x) = \begin{cases} h \dfrac{x - s} {e - s} & \mbox{if } s < x < e \cr h \dfrac{s - x} {s - e} & \mbox{if } e < x < s \cr h & \mbox{if } s < e \wedge x \ge e \cr h & \mbox{if } s > e \wedge x \le e \cr 0 & \mbox{otherwise} \end{cases}\) |