Application of Reservoir Simulation and Linear Programming to Optimization of Primary and Secondary Oil Recovery