Problems of Optimal Control for a Class of Linear and Nonlinear Systems of the Economic Model of a Cluster