Monday, January 12, 2015

Mathematical Optimization Under Uncertainty

As part of self education on mathematical optimization, I have been working my way through the book Optimization Modeling with Spreadsheets, Second Edition by Kenneth R. Baker (Amazon). I really like the book because it focuses on building models for optimization. Also, it does not bog the reader down with programming languages or fancy solvers. Instead, it uses spreadsheets and their built in solver, both of which are readily available and familiar to everyone. The implementation of the models in a spreadsheet ensures that the concepts are understood. It is too easy to fall into, I read it and therefore OF COURSE I understood it.

As I am working my way through the book, I came across "just an appendix" titled "Stochastic Programming". Stochastic Programming is techno bable for mathematical optimization under uncertaintiy. It was like wow, you can actually quantifiably perform optimization taking into account the probability of various events happening. After all, in the real world, there are scenarios and associated probabilities. There is no, x is going to definitely happen. Yah, I know, insert joke about death and taxes.

Let's actually walk through the examples in the appendix. The manufacturer has to build two types of refrigerators: standard and deluxe. The goal is optmize profit given the manufacturing constraints. In scenario 1 there is a known demand of 80 units for the standard model and at least 25 units for the deluxe model. After the optimization is performed, 80 standard models along with 70 deluxe models are produced to yield a profit of $6,100. In scenario 2 there is a known demand of 104 units for the standard model and at least 25 units for the deluxe model. After the optimization is performed, 104 standard models along with 44 deluxe models are produced to yield a profit of $6,520. There is a similar situation for the third scenario.

Now, lets take a step back and assume that scenario 1 has a probability of 0.2 and scenario 2 has a probability of 0.5. By default, scenario 3 has to have a probability of 0.3. When the optimization is performed taking into account these probabilities, a profit of $6,360 is generated. Notice that this profit is not that much different than if you had guessed at what the original scenario was going to be.

You can even get more fancy and add extra resources once you actually know the scenario. In this case, the optimization tells you to first produce 98 units of the standard model and 52 units of the deluxe model. When you determine the actual scenario, add extra resources and
  1. If scenario 1 happens, produce an additional 0 standard models and 15 deluxe models.
    1. If scenario 2 happens, produce an additional 6 standard models and 12 deluxe models.
      1. If scenario 3 happens, produce an additional 16 standard models and 0 deluxe models.
        The above optimization produces a profit of $6,994. This is slightly greater than the other profits because extra resources were added.

        A lot of details have been elided. If you are interested in digging in
        1. For a table summary of the above click here.
          1. If you want the spreadsheet that was used to generate the above numbers, click here.
            1. If you want the appendix from which the material came, click here.
              In summary, you can perform mathematically quantifiable optimization under uncertainity. All you need to say is that scenario 1 has probability x, scenario 2 has probability y, and scenario 3 has probability z. Create the model in a spreadsheet and than use its built in solver. If you want to get fancy you can have a model that says
              1. Start by doing a.
                1. When you determine which scenario is actually happening, the model will say do b if scenario 1 happens or do c if scenario 2 happens.
                  For a more mathematically rigorous approach, articles like "Brief Intro to Stochastic Programming (and Financial Modeling Applications) by Hercules Vladimirou" can be found.

                  If there is enough interest, perhaps we should start a Google group on Stochastic Optimization? It is realized that certain things will want to be kept confidential by individuals but I am sure that we can share lists of interesting artices or books. So, if you are interested in creating a Google user group, please say so by creating a comment on this blog post.

                  Also, to save people some search time, below are links to some groups and books that are related to stochastic optimization.

                  To get a list of stochastic optimization groups, click here.

                  To get a list of stochastic optimization books, click here.

                  Depending on the browser, you might have to "download" the file after you click "here" in order to actually see a web page.

                  4 comments:

                  1. One of the blog reviewers commented that the lists of stochastic optimization groups and books was helpful but should not be part of the blog. This has been fixed by providing links to the lists.

                    ReplyDelete
                  2. One of the blog reviewers commented that the book references should include a publication date. The publication date for each book has been added.

                    ReplyDelete
                  3. I really enjoyed going through this article. Robert does an excellent job in providing the necessary details and explanation of the topic. As a person that has not had advanced Math subjects, I found it easy to follow along and understand the overall concept.

                    ReplyDelete
                  4. Great Article! Knowing a little about optimization modeling with spreadsheets and doing a few optimizations by hand. Its interesting to see how probabilities can be associated with sets of constraints and its application in the real world.

                    ReplyDelete