0
$\begingroup$

I have a variable TE which 0=<TE<=180

Also, I have a parameters L(k) and U(K), showing lower bound and upper bound for interval K (k=1,2,3)

The value of these parameters are as follows: L(1)=0 K(1)=60 , L(2)=60 K(2)=120, L(3)=120 K(3)=180

I need to find the related range of the variable TE. For example,

  if `TE=12`,  then `K=1`

  if `TE=150`, then `k=3` 

Which mathematical constraint(s) do this?

$\endgroup$

1 Answer 1

0
$\begingroup$

Depends on how you prefer writing down your answer. Boolean logic is a perfectly valid way of writing mathematical expressions. For example, the logical "box" function, taking only the values 0 or 1 can be defined as follows:

$BOX(TE, L, U) = (TE > L)\; \& \;(TE < U)$

Then your entire choice can be written as

$k(TE) = 1 \cdot BOX(TE, L1, U1) + 2 \cdot BOX(TE, L2, U2) + 3 \cdot BOX(TE, L3, U3)$

which will always work as long as the intervals do not overlap. One can also use the step-function to define the box-function. Defining a piecewise function, as you did in the description is also mathematically perfectly valid. Take your pick

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.