Technology

Optimizer as Genie

An optimizer is a brilliant but literal friend who can answer your most difficult questions.

Popular culture tells us that you must be careful when asking a genie to grant you a wish. In stories where wishes are granted, things inevitably turn out unexpectedly. That’s what makes the stories interesting: in granting a wish, the genie must change your circumstances. If everything stays the same, then nothing interesting has happened. Complications arise when the Genie changes circumstances outside the intended parameters of the wish itself. Consider, “I wish to be healthy and live for hundreds of years!” You are now a tortoise, whoops. How about, “I wish to be healthy, happy and live for hundreds of years?” You are now a happy tortoise, whoops again.

Genies, like computers, are not so much evil or malicious as they are literal-minded.

Having worked with computers for decades, the authors would like to believe that genies, like computers, are not so much evil or malicious as they are literal-minded. If code does not run as expected, then it’s better to look for coding errors, rather than get angry at the compiler for it being deliberately obtuse. (Rob will admit there are times when emotionally he loses this perspective and swears at the computer for going out of its way to thwart him…)

Setting up an optimization job is much like making a wish.

Setting up an optimization job is much like making a wish. You are specifying what you want to achieve, but it’s important to remember that the optimizer will take you literally. If you just ask the optimizer to minimize costs without any other consideration, it will recommend that you do nothing, ever again. If you only ask the optimizer to maximize Net Present Value (NPV), it will tell you to drill every economic well tomorrow morning first thing. Getting sensible answers out of the optimizer requires careful consideration of the goals and constraints truly at play. What about rig availability? OK, so specify a constraint around drilling activity. What about capital spending and cash flow constraints? OK, so also specify constraints around capital spending and cash flow. What we end up with is a more carefully crafted wish that respects the interplay between goals (to be maximized or minimized) and constraints (representing fences within which solutions must fall).

An optimizer is better than a genie because an optimizer is able to tell you how it is going to deliver what you asked for

The genie analogy has its limitations. An optimizer is better than a genie because an optimizer is able to tell you how it is going to deliver what you asked for as well as the resulting outcomes. Since you can only pursue a single plan, it might be best to think of the optimizer as a genie that will grant you a single wish, but will take the time to explain the consequences of any given wish. Should the genie be this considerate, then your best strategy is to come up with a list of wishes and learn the consequences of each wish.  You could then choose the wish with the best outcomes. And so it is with the optimizer. In setting up optimization jobs you should not limit yourself to a single set of assumptions. How often does a ten year price forecast turn out to be right? Instead, set up a number of jobs to explore a range of goals and objectives and compare the resulting solutions.

...surprising optimization results often contain the nuggets of greatest value

Even after carefully specifying goals and constraints for an optimization scenario, an optimizer can still deliver surprising results. These kinds of surprising optimization results often contain the nuggets of greatest value, ranging from “Why didn’t I think of that?” through to “I never would have thought of that!” The optimizer’s job is to explore the full space of possibilities, and it has the power to examine combinations of decision variables that we lack the time and patience to discover without help. The genie inside the optimizer sees possibilities that are invisible to us humans. If you're careful what you ask for, the optimizer can reveal solutions that you would never discover otherwise.