In this article we are going to introduce the neural network approach to approximate the solution for optimization problems. Using this approach we are able to approximate the optimum values for the large class of functions in particular giving the prices of different products that are resulted from refining the crude petroleum into different substances. We are going to design a neural network that can provide us with a decomposition of the given crude petroleum into resulted products in such a way that is most beneficial for the refinery.