Several steps are required. I would summarize them as follows:
(1) Expert analysis and fix-up of all basic regulatory controls - loop configuration logic, instruments, analyzers, loop tuning, valve performance and so forth.
(2) Model-predictive, multivariable constrained control, referred to as MPC, e.g., with DMC Plus, RMPCT, etc. These tools also perform approximate unit-level real-time optimization. Several thousand applications of this technology have been implemented at many hundreds of petrochemical and refinery units worldwide for the last 30 years. This technology is very beneficial and makes an immediate and noticeable difference in the way a major process unit works. It sits on top of the regulatory controls and generally writes all the regulatory controller set-points every minute. Therefore, that lower control layer must function flawlessly to maintain MPC benefits. An ethylene plant typically requires 15-25 such MPC applications, depending on the number of cracking furnaces. A typical refinery unit would require anywhere between 5 to 10 MPCs, sometimes more.
(3) Add rigorous, closed-loop, real-time optimization (CLRTO) as the next layer above MPC. This requires plant-wide chemical engineering models to run under a non-linear optimizer. Examples of such products are RT-OPT and NOVA. Examples would be one CLRTO for a complete ethylene plant, or a cat cracker in a refinery. CLRTO uses "open equation" solution methods and has been used for over 15 years in ethylene plants. This technology is better suited for petrochemical processes than refinery units, in my opinion, mainly because of uncertainties in feedstock composition in most refinery units. At present, again in my opinion, the traditional steady-state simulators are incapable of doing serious optimization work at a plant-wide level.
There are many hundreds of published papers describing the MPC and CLRTO technologies, some going back over 30 years. I would recommend you study a few of them carefully before calling the vendor companies. There is no panacea for maximizing profit, and it takes many years of extremely diligent work by a very large team of specialists in each plant before all this works properly.
Of course, the cost runs into the millions of dollars and you need some high caliber staff to maintain this stuff, but the paybacks are generally within two years for each major piece, many times a lot sooner. A huge bonus is much better staff training, in many areas, and an inexorable focus on control systems performance and maintenance.