The problem of optimal scheduling in a system with parallel queues and a single server has been extensively studied in the queueing theory. However, such systems have mostly been studied by assuming homogeneous attributes of arrival and service processes, or in heterogeneous case a Markov random process was usually assumed. In this paper, we explore the possibility of combining simulation and neural network paradigms for optimal scheduling in a heterogeneous system with an arbitrary inter-arrival and service time distributions. The service of any queue by the server is exhaustive. Further routing of the server after the queue has been emptied is as instructed by the trained neural network. Any change in the queue that currently has a server is accompanied by a switching cost. The simulated annealing optimization algorithm which is used to optimize the parameters of the neural network was adapted for numerically evaluated average cost function. A Markov decision problem was formulated for the corresponding markovian queueing system to verify the results of solving the optimization problem. In addition to comparing the actual values of the average cost, the parameter values of the neural network trained on the optimal control policy of the Markov model are also used to determine the domains of parameters required for the simulated annealing defined on a finite discrete domain. Numerical analysis shows the effectiveness of this approach. Moreover, a comparison of the results for different distributions illustrates the insensitivity of the optimal control policy to the shape of the distributions for the same two first moments. Thus, the optimal control policy for an exponential model can be used as a suboptimal one for the general system.