I'm trying to solve this physics problem using the Simplex method
$$\text{Minimize}\qquad \int _0 ^T |f(t)|dt \qquad \text{subject to}\\ j(t) = j(0) + \int_0^t f(t)dt, \forall t \in [0,T] \\ m(t) = m(0) + \int_0^T j(t)dt, \forall t \in [0,T] \\ m(0) = 0, m(T) = 1, j(0) = 0, j(T) = 0 $$
This is how I approached the problem:
1) First, I had to turn the continuous problem into a discrete one.
2) I had to take the function $M(\cdot)=|\cdot|$ out of the problem, to linearize it.
Then, my problem becomes the following,
$$ \text{Let }T = N \Delta t, \text{where N is my number of intervals} $$
$$ \text{Minimize} \qquad \sum_{k=0}^{N-1}\theta_k \Delta t \qquad \text{subject to}\\ j_{k+1} = j_k + f_k\Delta t \qquad k \in \{0,...,N-1\}\\ m_{k+1} = m_k + j_k\Delta t \qquad k \in \{0,...,N-1\}\\ f_k \leq \theta_k \qquad k \in \{0,...,N-1\}\\ -f_k \leq \theta_k \qquad k \in \{0,...,N-1\}\\ m(0) = 0, m(N-1) = 1, j(0) = 0, j(N-1) = 0 \\ $$
However, I don't know how to proceed from here. I'm having a hard time figuring out how to set the whole problem in the computer.
For example, I'd say the coefficients of my objective function will be each of the $\theta_k$, but I can't understand the role of $f_k$, how can I solve without knowing it's values?