This paper deals with the time-optimal and near-time-optimal control of a system with quazistationary switching line. The control law is realized by approximation of the optimal switching line by artificial neural network. The neural approximation of the optimal switching line is compared with the linear and fuzzy approximation of the switching line and with the exact switching curve. Some simulations of the time-optimal and near-time-optimal control systems are done.