You can use a software to do that, for instance EES Engineering Equation Solver, it has a module of optimization.
Now to formulate the objetive function you need what you want to increases (Wnet) or decreases (los work), after that you need design variables (presure ratio, others).
One of the most recommended methods used in optimization of Engineering problems is the Genetic Algorithm (GA) approach. It is widely used by many researchers. If you use Matlab as a simulation tool, you will find this method as a built-in tool which can be easily used to optimize your problem or you can write your own code. Firstly, you need to specify the objective function (to be increased or decreased) and the decision parameters which affect the system performance. In your case, the objective function can be exergy efficiency (to be increased) or exergy destruction/loss (to be decreased). You can also use any other objective function such as the total system cos....etc