Optimal solution of processes described by systems of differential-algebraic equations