**International Series in Operations Research & Management Science**

### Daniel P. Loucks

# Public Systems Modeling

Methods for Identifying and Evaluating Alternative Plans and Policies

### **International Series in Operations Research & Management Science**

#### **Founding Editor**

Frederick S. Hillier

### Volume 318

#### **Series Editor**

Camille C. Price Department of Computer Science, Stephen F. Austin State University, Nacogdoches, TX, USA

#### **Editorial Board**

Emanuele Borgonovo Department of Decision Sciences, Bocconi University, Milan, Italy

Barry L. Nelson Department of Industrial Engineering & Management Sciences, Northwestern University, Evanston, IL, USA

Bruce W. Patty Veritec Solutions, Mill Valley, CA, USA

Michael Pinedo Stern School of Business, New York University, New York, NY, USA

Robert J. Vanderbei Princeton University, Princeton, NJ, USA

#### **Associate Editor**

Joe Zhu Foisie Business School, Worcester Polytechnic Institute, Worcester, MA, USA The book series **International Series in Operations Research and Management Science** encompasses the various areas of operations research and management science. Both theoretical and applied books are included. It describes current advances anywhere in the world that are at the cutting edge of the field. The series is aimed especially at researchers, advanced graduate students, and sophisticated practitioners.

The series features three types of books:


The series emphasizes the following four areas:

**Mathematical Programming:** Including linear programming, integer programming, nonlinear programming, interior point methods, game theory, network optimization models, combinatorics, equilibrium programming, complementarity theory, multiobjective optimization, dynamic programming, stochastic programming, complexity theory, etc.

**Applied Probability:** Including queuing theory, simulation, renewal theory, Brownian motion and diffusion processes, decision analysis, Markov decision processes, reliability theory, forecasting, other stochastic processes motivated by applications, etc.

**Production and Operations Management:** Including inventory theory, production scheduling, capacity planning, facility location, supply chain management, distribution systems, materials requirements planning, just-in-time systems, flexible manufacturing systems, design of production lines, logistical planning, strategic issues, etc.

**Applications of Operations Research and Management Science:** Including telecommunications, health care, capital budgeting and finance, economics, marketing, public policy, military operations research, humanitarian relief and disaster mitigation, service operations, transportation systems, etc.

This book series is indexed in Scopus.

More information about this series at https://link.springer.com/bookseries/6161

Daniel P. Loucks

### Public Systems Modeling

Methods for Identifying and Evaluating Alternative Plans and Policies

Daniel P. Loucks School of Civil and Environmental Engineering and School of Public Policy Cornell University Ithaca, NY, USA

ISSN 0884-8289 ISSN 2214-7934 (electronic) International Series in Operations Research & Management Science ISBN 978-3-030-93985-4 ISBN 978-3-030-93986-1 (eBook) https://doi.org/10.1007/978-3-030-93986-1

© The Editor(s) (if applicable) and The Author(s) 2022. This book is an open access publication. **Open Access** This book is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this book are included in the book's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the book's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.

The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This Springer imprint is published by the registered company Springer Nature Switzerland AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland

### **Preface**

This book introduces methods for identifying and evaluating alternative plans and policies that address public sector issues and problems. This is not a book on the analysis of policy-making processes but rather methods of analyzing the plans and policies themselves. Such methods aid in the planning and analysis of systems that provide the services the public desires and that policymakers are responsible for providing and managing. The modeling methods are the common ones found in numerous textbooks and courses on operations research and management science. These methods have been used to address development and management opportunities and issues in many disciplines including those within agriculture, business, ecology, economics, engineering, health, management, military science, and natural resources, to mention a few.

So why this book? First, it is intended to be an introduction to the development and use of various types of optimization, simulation, and related systems analysis methods at a level that does not require the traditional prerequisite courses in calculus, computer programming, probability or statistics, or in a particular application area discipline. Yet aspects of these disciplines are indeed useful to effectively model various problems and issues. They will be introduced and used when needed. Secondly, the emphasis in this book is on the art of converting a verbal description or conceptual model of a system into a mathematical one. Conceptual models may be expressed only qualitatively in words or as a node-link network diagram representing interacting components. Developing and solving mathematical models allow one to estimate and compare quantitatively the various physical, economic, ecologic, or social impacts that may result from various decisions. Thirdly, the focus in this book is on modeling designed to inform those in the public sector who are managing public systems and dealing with any conflicting opinions or conflicts over their design, operation, and/or impacts. The book does this through the use of various example problems, often showing how different methods can be used to analyze the same problem or system, demonstrating the advantages and limitations of each modeling approach.

Thus, this book describes how to quantify and model various policy problems and obtain and evaluate alternative solutions, based on various criteria, including political ones. It is about performing analyses for policy, not of policy. It is aimed at methods for providing useful information to those responsible for making policy decisions. Modeling systems is an art, and to become a better artist takes practice. This book provides an opportunity to begin developing this skill. While solving models can be a straightforward process, developing and applying them to inform public policymakers is not. Model building and implementation is an art. How best to do it in each case is highly dependent on the problem being addressed, the data and time available, and on the institutional policy-making environment.

The contents of this book have been included in courses offered to professional master's degree students in the Institute of Public Affairs, within the Brooks School of Public Policy, at Cornell University. I owe it to all these students for suggesting both content and improvements over the past years. Using some modeling jargon, one of my objectives while writing these chapters was to minimize errors. If you find any, or have any suggested improvements and modifications, I will be most grateful if you would let me know.

Finally, I hope you find modeling and solving systems planning and policy problems as much fun as I do. Who knows, someday you may get paid for doing it, or you may be supervising, or being informed by, those who are. One advantage of having some modeling skills is that they are widely applicable and hence are increasingly being used to improve the performance of systems in both the private and public sectors. The demand for those with these skills can only increase.

Ithaca, NY, USA October 2021

Daniel P. Loucks

### **Contents**





# **1 Analyzing Public Policy Decisions**

#### **ABSTRACT**

An introduction to the contents of the book that focus on the art of building and using various optimization and simulation modeling methods for analyzing public systems planning and management issues. Emphasized is on the use of models for informing policy makers and for assisting in decision making processes.

#### **1.1 Introduction**

This book introduces the art of building and using models for analyzing public systems planning and management issues. These deterministic and probabilistic optimization and simulation models provide a means of identifying possible ways of addressing various policy problems and evaluating them based on their physical, economic, environmental, and social impacts. While the problems we address to illustrate the application of various mathematical modeling tools will likely differ from the ones you may have to deal with in your future jobs, they serve to help develop your skills in applied systems analysis. Such skills should help you analyze and identify solutions to both well and poorly defined public systems planning and management problems. Typically, such problems have many possible solutions and the best ones, especially given multiple goals and uncertain data, are not obvious.

The purpose of the quantitative and qualitative methods for managing data discussed in this book is to inform those responsible for decision-making. They can help decision-makers estimate the potential impacts of the decisions they might make. These methods cannot determine what decisions are best, but they may help in determining which are better than others. What is best will depend on many factors, including those not considered in any mathematical modeling exercise. Different assumptions can lead to different preferred policy decisions. These

<sup>&</sup>amp; Management Science 318, https://doi.org/10.1007/978-3-030-93986-1\_1

assumptions can range from just what is to be accomplished by a proposed decision and how those impacted will react, to details such as what interest rate may have to be paid on loans 20 years from now. It is the decision-maker who must decide which goals or objectives to consider and which assumptions about how a system functions are most reasonable. The aim of all of this 'systems analysis technology' is to help us generate and communicate 'what if' information to decision-makers in ways that result in more informed decision-making.

Working in the public sector, including non-governmental organizations, can offer many benefits: a sense of purpose and the opportunity to serve the public and improve the quality of the lives of those of us living in this world. For those having this opportunity, it will undoubtedly involve participation in decision-making processes. Decision-making by public officials establishes programs and policies that can have a significant impact on our lives and on our environment. Governments make decisions. That is what they are supposed to do. From local decisions to federal or international decisions, the impact of public sector decision-making on the lives of people can be significant. Many organizations in the private sector have been benefiting from the use of systems analysis tools for over 5 decades, the military for over 8 decades. Public sector uses have been more recent, but no less useful.

Public sector decisions just like those in other sectors, and indeed the decisions we make in our own lives, are influenced by many factors. Many are made without the benefit of any mathematical modeling. But such models can contribute useful insights on what is technically possible and on what is economically, or environmentally, or ecologically, or socially preferred based on various performance criteria. The use of models as aids to decision-making has been growing in the environmental, natural resources, agriculture, energy, urban planning, and public health decision-making areas, to mention only a few. As more become familiar with both the advantages as well as limitations of systems analysis methods applied by competent analysts to public sector issues, its use will continue to spread and lead to more informed decision-making throughout the public sector.

#### **1.1.1 Historical and Other Perspectives**

Systems modeling approaches have existed for well over a half a century with early applications in the biological and ecological disciplines (von Bertalanffy, 1950, 1968). Development and use of systems modeling approaches during the Second World War advanced the fields of systems analysis, systems engineering, and operations research, all of which involve developing and applying optimization, simulation, and statistical models of multicomponent systems. Operations Research (OR) is the name given to a discipline that focuses on the use of mathematical modeling and statistical analysis of decisions on the deployment of the resources under an organization's control. Systems analysis was developed by RAND Corporation in 1948. It broadened and extended OR. In 1961, the Kennedy Administration in the US decreed that systems modeling methods, combining OR with cost–benefit and cost-effectiveness analyses, should be used throughout the government to provide a quantitative basis for broad decision-making (Enthoven, 2021).

At the international level, the International Institute for Applied Systems Analysis (IIASA) has been successfully providing policy-relevant analysis tools and information pertaining to the management of food and forests, energy, ecosystems and the environment, population growth, and water resources management among other issues since its founding in 1972. Systems analysis tools are commonly used in all the UN organizations and the World Bank. Mostly at the national level, RAND Corporation has been doing the same, but their reach and impact have been at the international level as well. Since 1948 RAND has been developing and using systems analysis methods to meet its goal of identifying solutions to public policy challenges to help make communities throughout the world safer and more secure, healthier, and more prosperous.

The increase in computing power following the War along with advances in algorithms (mathematical procedures) for solving models has made it possible to design and analyze increasingly larger systems, often involving thousands of variables and equations. The availability of computers and software programs that can solve models allows us in the application disciplines to focus on the art of model development and use. Just like painters and musicians and actors, the only way to develop skills in the art of modeling is to practice. This book has been prepared to assist readers in doing that. But even if one doesn't become a systems analyst or modeler, being exposed to the material in this book will help give one an appreciation of the benefits and limitations of using models to better understand and manage systems. They will be better able to understand and work with those who do.

Quantitative models of systems generally rely on predefined goals and causal relationships. Since the late 1970s, soft systems approaches have emerged in response to the challenges faced by modelers in the social world (Checkland, 1999a, 1999b). Soft systems methodology is more qualitative. It is used to gain insight into the decision-making and planning processes and in defining conceptual system diagrams before introducing the mathematics. Soft systems methodology begins by asking what the objectives are, which of course can change over time. Hard systems approaches analyze the system in search of alternatives that satisfy the desired objectives. These approaches can include qualitative as well as quantitative modeling approaches. Chapter 17 of this book presents one way to convert qualitative statements to quantitative expressions suitable for incorporating into models.

To be clear, these modeling approaches are not problem-free. They are all based on assumptions, and they cannot distinguish between good assumptions and bad or incorrect ones. They synthesize but fail to innovate. They fail to suggest new ideas that may not have been considered when creating a conceptual model of a system. The solution of models cannot identify what to include in a system or in what detail. This is one reason why modeling is an art, not a science. Even when modeling physical or biological processes—the science—it is a matter of judgment as to what detail is needed to inform the decisions being considered. Again, modeling is an art and different analysts can differ on what they consider to be the best modeling approach. As stated by George E. P. Box:

All models are approximations. All models are wrong but some are useful. However, the approximate nature of the model must always be borne in mind.

If models cannot innovate, the question is how can they help humans innovate. One approach is to incorporate models within an interactive participatory modeling framework. Using participatory systems methods that include humans in the modeling loop, innovation may be possible. Models can generate scenarios that may suggest new ideas, i.e., motivate human innovation. Such models have been increasingly applied in the field of natural resources (van den Belt et al., 2010; Voinov et al. 2018).

In practice, most systems analysts use a multitude of methods. For example, different optimization models may be employed to narrow down the number of alternative plans or policies to be examined in greater detail using simulation models. You will be introduced to both types of modeling approaches in the chapters that follow. You will learn that each type of model has its strengths and limitations. There is no single best modeling approach for all analyses and problems. Each modeling approach or type has its advantages and limitations. This will become evident as you are introduced to the different types of models and computer software (e.g., in Excel) used to solve the modeling problems presented in this book.

#### **1.2 Modeling Policy Issues**

Modeling and model outputs can help focus policy-making debates. This does not imply that the decision-making processes mimic best accepted modeling procedures. A decision-making framework, where first data are collected, next policy objectives are defined, then alternative policies that meet these objectives are identified, analyzed, and evaluated, perhaps using some of the methods introduced in this book, and finally, a choice that maximizes some combination of social welfare (or minimizes political risk) indicators is made, rarely works in practice. For various reasons, this logical systematic modeling framework does not represent the reality of most policy-making processes (Fig. 1.1).

Policy problems not only have an analytical dimension but also a normative value-based one. Public policymakers need to find acceptable practical compromise solutions to problems or issues that are acceptable to all participants. Often there may be no such obvious solutions. These so-called 'wicked' problems are hard to define, let alone address using models. Thus, inevitably their resolution is temporary, tentative, and dependent on political judgments possibly informed by the results of models of those aspects of the problem that can be modeled. This distinction between the analytical approach to the discovery of knowledge and policy-making does not make it impossible for analysts and policymakers to work together to better inform the policy-making process. But it is not always easy. While policy decisions can certainly be made without being informed by any analyses of alternatives, the added value of policy informed by such analyses suggests they are worth performing.

There are a variety of modeling approaches that can be useful tools for informing policymakers. Models used to inform policy are built and solved to provide information that can help policymakers develop insights on which they can base, at least in part, their policy decisions. The usefulness of such 'policy modeling' is judged not by how accurately it reflects the real world, but by how well it is able to provide information that enables a policymaker to make knowledgeable choices among policy options—i.e., how well the modeling can help construct and defend arguments about the relative pros and cons of alternative policy options. A relatively crude model that can clearly demonstrate that alternative 'A' performs better than alternative 'B' under both favorable and unfavorable assumptions will probably lead to a better decision than a complex model that can perform only a detailed expected-value estimation.

Policy models trade off rigor for relevance. In some cases, they can be used for screening large numbers of alternative policy options, comparing the outcomes of the alternatives, and/or designing strategies considering a wide range of factors (e.g., technical, financial, or social), but not a lot of detail about each factor. The outcomes are generally intended for comparative analysis (i.e., relative rankings) of policy alternatives. Approximate results are often sufficient to map out the decision space—the ranges of values of the various input parameter values for which each of the various policy options would be preferred.

#### **1.3 Complexity**

In today's highly interconnected societies and economies, policymakers addressing one issue must consider the impacts of their decisions not only on the issue being addressed but also if and how those decisions may impact other aspects of society over time. We are all living in a multicomponent environment and dealing with multicomponent systems, as illustrated in Fig. 1.2. Hence, taking a systems approach to managing them makes sense. A systems approach focuses on the performance of the system as a whole, not of each component separately. How one component of a system is designed and managed may impact the performance of one or more other components of that system or even of other systems. These possibilities are worth being identified and evaluated, ideally before policy decisions are made. Better to prevent major problems or crises than to deal with their consequences although politicians, and indeed most of us, probably get more credit and fame from solving crises than from preventing them.

The more complex the issue is, the more likely some application of systems analysis methods may be helpful when considering ways of addressing the

**Fig. 1.1** A theoretical sequential modeling process on the left looks like a water cascade. The modeling process in practice on the right has many possible feedbacks requiring model modifications or even having to begin parts of the process over again

issue. What is a complex issue? Factors characterizing complex issues include the following:


Certainly, there are many public policy decisions that have these characteristics. For example, consider the fossil fuel industry's argument that production and pipeline transport contributes to job creation and economic benefits. Positioning themselves as friends of working people, they counter those concerned about potential environmental damage and global warming by arguing that they are protecting oil and gas workers' livelihoods. It happens often. A company proposes some big project, environmentalists oppose it. Or a government agency proposes new regulations intended to reduce air pollution. Public health experts say it will improve human health and reduce premature deaths, but unions say it will destroy jobs. These are examples of conflict of criteria.

Decisions that have multiple conflicting criteria and many alternatives are difficult to make. These are examples of public policy issues for which systems analysis methods can help identify and evaluate the consequences of alternative policy decisions that could be taken to address them.

#### **1.4 Are You Ready?**

Decision sciences are typically taught in engineering, mathematics, and economics departments including business schools. Because of their wide applicability, they are increasingly being offered in public affairs programs as well. To reassure those who may not have quantitative backgrounds, you do not need a mathematics or engineering or economics background to learn how to use the tools presented in this introductory text. All that is expected and assumed is some proficiency in algebra. The emphasis in this book is on learning the art of developing and solving models that address particular public policy issues. Having these skills can only benefit you as an employee in a public service organization. What public organization does not need to analyze data, make decisions, and interact with those having a large diversity of backgrounds and expertise in law, engineering, the natural sciences, the social sciences, and in communications, to mention a few?

#### **1.5 Book Outline**

Chapter 2 offers some insights into public systems and how models of such systems may help inform those responsible for their design and operation. The advice offered in Chap. 2 is backed up with some case studies involving the application of modeling and factors that contributed to their success or failure. Chapters 3 and 4 begin the introduction to developing and solving models applied to some simple policy and infrastructure design problems.

Many of the models used to address policy and infrastructure issues include economic functions that define benefits and costs over time. Chapter 5 reviews the methods used to compute present and future and annual benefits and costs, and the influence of inflation and taxes on how we manage our personal as well as public investments. Those who develop models do so in part because they assume they can be solved. Many of the modeling examples used in this book to illustrate different modeling approaches can be solved on a computer using Excel. Chapter 6 reviews how to apply the Solver component of Excel to solve a wide variety of optimization models.

Chapters 7, 8, and 9 focus on constrained optimization modeling, again using policy and infrastructure issues as example problems to model and solve. Chapters 10 and 11 introduce ways calculus can be used to analyze problems that are characterized by continuous non-linear functions. These chapters are written for those not yet familiar with calculus and how slopes (marginal values) of functions are derived and used to find optimal solutions. Issues such as the privatization of public utilities and the impacts that may follow such decisions are addressed using these calculus-based methods.

Chapters 12 and 13 introduce ways of dealing with uncertainty when developing optimization or simulation models. They review the basics of probability and statistics and introduce stochastic processes and how such processes can be included within models applied to various public policy issues. Chapter 14 describes how reliabilities associated with relationships within systems can be considered and introduces methods for generating values of random variables and how they can be applied in simulation models.

Simulation modeling is introduced in Chap. 15, again through its application to policy and infrastructure planning problems, taking advantage of the information presented in previous chapters. The chapter serves to reinforce many of the modeling and solution approaches covered throughout the book. Chapter 16 addresses situations where multiple system performance criteria or goals exist, and some of them may conflict with others. In such cases, tradeoffs among the values of multiple performance measures can be identified using various modeling and other analysis approaches reviewed in this chapter, thereby informing the political negotiation process as it attempts to identify the most preferred policy or plan.

The book concludes with an introduction on how to include qualitative expressions of goals or constraints in optimization and simulation models. Chapter 17 explains how qualitative expressions of economic, environmental, and social concerns can be considered along with the system conditions that can be expressed quantitatively. Final Chap. 18 briefly summarizes the role this modeling plays in the political decision-making process where public policies and infrastructure plans are approved and implemented.

#### **1.6 Conclusion**

'Data-driven decision-making' and 'evidence-based decision-making' are popular topics these days, especially as a counterweight to the misinformation that seems to influence many aspects of today's public sector decision-making. The terms refer to the analyses of observed scientific data to inform decision-making processes. The keyword is 'to inform'. Experienced decision analysts addressing public policy challenges recognize that no analysis, including their own, can by itself tell one what the best decision is pertaining to a particular public issue. Analyses are always limited in what they include or consider.

Nevertheless, analyses can provide insights about potential outcomes and uncertainties and clarify what the implications may be of any decision or action taken regarding a particular issue or problem. Applying these tools could very well increase the probability of achieving agreements among stakeholders, or at least elucidate the causes of disagreements that may exist. As mentioned earlier, they may also help identify new, preferred alternatives. These tools can also be used to help people outside of the decision process better understand why an alternative policy was selected. In sum, modeling approaches can provide structure, consistency, transparency, and understanding about public sector decisions, which would benefit the public as well as the decision-makers.

#### **Exercises**


#### **References**

Checkland, P. (1999a). *Systems thinking*. Wiley.


#### **General References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **2 Public Sector Systems**

#### **ABSTRACT**

A discussion of the nature of public systems and their management. Examples of public systems and the services they provide show how complicated and complex they can be, and the challenges analysts have in providing information useful to those responsible for providing and managing them. Case studies involving modeling to improve system performance are briefly described as are the lessons learned from them.

#### **2.1 Introduction**

Let us begin with some definitions. Each discipline has its jargon, and the decision sciences and systems analysis disciplines are no exception. Probably the most common term used in this book on public policy modeling is the term 'system'. For us, a system refers to a set of interdependent components that work together to accomplish the desired outcome. Wikipedia defines a system as a group of interacting or interrelated elements that act according to a set of rules to form a unified whole. A system, surrounded and influenced by its environment, is described by its boundaries, components, structure and purpose.

What distinguishes systems analyses from other analysis exercises is their focus on the performance of the system as a whole, rather than on each of the system's components separately. They address the question of how each component, say of an urban transportation system or a community public school system, should be designed and operated to provide the maximum net benefits, however, measured, derived from the system. Determining just what is included in the system, as opposed to its environment, and how to describe that system in mathematical expressions, is part of the art of systems modeling, an art that this book introduces.

There are many types of systems, of course, and in this case, we are primarily interested in those in the public sector, such as those managed by governmental

D. P. Loucks, *Public Systems Modeling*, International Series in Operations Research

<sup>&</sup>amp; Management Science 318, https://doi.org/10.1007/978-3-030-93986-1\_2

agencies or non-governmental organizations. Figure 2.1 illustrates a public health system, where depending on the issues being addressed, each of the components could be a system of interacting components itself. Most systems are systems of systems. It is up to the analyst to define the appropriate detail to include in each component of any model depending on the issues being addressed, and the data and time available for the study, among other factors.

This public health system is just one sub-system of any urban system, even relatively small ones as shown in Fig. 2.2.

The systems referred to in Figs. 2.1 and 2.2 are obviously both complicated and complex. There are many possible ways of designing and managing them and many possible measures of performance. Furthermore, given any decision, the results are not always predictable. The purpose of this book is to introduce some tools that may help identify, analyze, and evaluate the estimated impacts of alternative system design or management policies that one could face working in public or non-governmental organizations. Such information should be helpful to anyone having to decide what decision to make or what course of action to take to address a particular issue or problem. Depending on the problem or issue being addressed, the possible impacts of any decision may be physical (including medical), economic, environmental or ecological, political, and/or social. Models can be developed and used to estimate any or all these impacts, as appropriate. It is up to those developing and using models to decide what to include in any analysis and what information is needed to best inform those involved in the decisionmaking processes.

**Fig. 2.1** A public health system of interacting interdependent components

**Fig. 2.2** A community consisting of interacting systems that provide the educational, environmental, public health, recreational, social, and transportation services people need and expect

#### **2.1.1 Managing Public Systems**

Some public agencies are using systems approaches to successfully manage complicated issues (e.g., banking regulation, trade treaties, community transportation, and healthcare systems). Such systems may have many components and uncertainties, but it is possible to understand how each of these systems can be designed and managed to achieve specified goals. However, the nature of other public sector problems, frequently referred to as wicked or messy ones, are more difficult to assess and, therefore, are more challenging to manage. Rather than having discrete components linked together in ways that are clear, often the functioning of components as well as their interactions with others in public systems are not clear. For example, it might be hard to establish whether the reduced use of plastic is a result of improved industrial packaging, changing consumer habits, or stricter plastic disposal controls. Policy decisions for such wicked systems can have unintended consequences. For example, the construction of a simple road overpass in Somerville, Massachusetts—which was needed from an infrastructure development perspective—led to a rise in childhood obesity rates due to part of the community being cut off from leisure and sporting facilities (Curtatone & Esposito, 2014).

Systems approaches have been usefully applied in a variety of public policy fields. For example,


In complex systems, cause and effect may only be obvious in hindsight, highlighting the need for different analytical tools that together can identify and evaluate adaptive policies and produce a better understanding of how particular systems function. It is important to understand the systems being analyzed and not underestimate the possibility of being surprised.

Few would disagree that the public policy world of today can be volatile, uncertain, complex, and ambiguous. Solutions proposed to address problems or opportunities are often strongly contested. Not everyone has the same goals or desires. Therefore, many policies developed to address problems fail because of a lack of sufficient political support or from unforeseen side effects or difficulties in communication, coordination, and monitoring. The challenge for systems analysts is, therefore, to generate meaningful (and useful) policy options that can adapt to future surprises and conditions that are today unknowable, while satisfying today's goals and needs. To introduce more jargon, some call such policies robust.

The process of *solving* a problem involves *understanding* the nature of that problem. Those advising policymakers have a collective responsibility to collect, verify, and synthesize information in pursuit of a more coherent and complete knowledge, say for 'what can be done about x'. However, no amount of modeling and data analyses will answer political or normative questions like 'what *should* be done about x'. That is a political decision. But again, models and data can inform those who make such decisions.

**Politics is more difficult than physics.** Albert Einstein (Conference in Princeton, N.J. January 1946.)

Public systems modelers will be working in a political environment and will likely find that more challenging than the modeling itself. Examples of public systems challenges can include the following:

• Criminal justice system reform with respect to the death penalty, controlling the use of addictive drugs, reducing gun violence, and prison terms and conditions.


These, like many public sector systems, often have design, organization, and management issues that can be analyzed to identify and evaluate alternative ways of addressing them. Obviously, we can't address each of these issues in this introductory book but we can begin to introduce some of the tools that one might use to analyze such issues. The problems in this book are simpler than those listed above, but still interesting or complex enough to warrant and illustrate the use of what is called systems analysis. Systems analysis includes developing and solving models of systems. Solutions of models can help us determine what, where, when, and how much to do to accomplish some goal or objective. We will use various modeling approaches to identify preferred system designs and operating policies with respect to various objectives or goals that might be considered.

#### **2.2 Why Apply a Systems Approach to Public Policy?**

The increasing development and use of technology and the automation and information it brings into our lives are creating challenges in our workplaces as well as for both our education and health and welfare systems. Ensuring a high-quality, active life for an aging population puts pressure on developing improved ways of providing medical and social care. Climate change, obesity, radicalization of social behavior, income inequality, and poverty are all issues faced by today's public policymakers. What causes these and other public policy challenges and to what extent? How can they be effectively addressed without generating even more problems?

More holistic policy approaches that can define the major factors impacting a policy issue, that can identify the interactions among relevant components of systems, that can focus on the performance of the whole system rather than only on its separate components, and that embrace the goals of stakeholders have the potential to substantially improve the policy-making process. Such systems approaches can inform policymakers on the impacts of what they might decide to do and thus allow them to focus on the bigger picture, i.e., on the areas where change can have the greatest impact and on the goals they want to achieve.

Government agencies and those NGOs and others who serve them are increasingly using systems approaches to address problems and to identify and evaluate possible decisions impacting the performance of their policies and programs. Public institutions are slowly changing from a procurement-driven policy of only using external consultants and contractors to perform systems studies, toward employing systems analysts to have systems analysis capabilities within their organizations and to be able to perform analyses continually as part of their everyday practice.

Implementing change in the public sector can often be difficult. Not everyone wants the same change, or even any change. Decision-makers are typically risk averse especially regarding the possibility of failure. In many cases, one cannot stop providing an existing public service, such as air traffic control, or water and wastewater treatment, or protection from natural hazards, as changes are made in providing those services. Systems approaches can help navigate such transitions. Systems approaches can help organizations continue to provide services while changing the design and/or operation of the entire system at the same time.

Changing a system or service often requires building new skills into organizations to help them face and adapt to new circumstances. Systems changes impact people as well as infrastructure. As such, they invariably spur debates about the relative value of policy choices and the tradeoffs among conflicting goals to be made. Consider the efforts of public health experts attempting to achieve higher percentages of vaccinated people. This has proved to be more difficult than expected even when it would seem the best decision for each individual is obvious, at least for those wishing to avoid sickness or death. In the case of car-sharing in Canada, having a flexible transportation system took precedence over other work condition concerns. In Iceland, domestic violence had to be labeled a public health issue rather than a private matter to gain public support. It is not easy to transform public systems and public opinion. But again, applying systems methods to identify and evaluate alternatives and their benefits, costs, and possible environmental, ecological, and social impacts can help provide the information needed to help generate the support and understanding needed to enable change to happen (OECD, 2017).

Complexity and uncertainty are common properties of public systems. The defense and intelligence communities refer to this state as 'VUCA', a state of Volatility, Uncertainty, Complexity, and Ambiguity. One can argue that VUCA characterizes much of the public sector as a whole, even if administrations do

**Fig. 2.3** Getting into the detail may reveal entirely different perceptions of urban sub-systems needs than at higher levels of policy-making

not understand how, where, or why. One key concern is how best to account for uncertainty while managing greater complexity and still deliver effective services. To a degree, the answer lies in a policy-making approach that leads to robust systems and adaptive policies. The effectiveness of the decisions made to address a problem or issue will depend on how completely the problem and the system it is a part of are understood. It also requires acknowledging uncertainty as part of everyday decision-making. Changing public policy dealing with problems stemming from interconnectivity, cyber threats, climate change, changing demographic profiles, and migration, to mention a few of today's issues, is not easy. The complex process of seeing, understanding, and deciding is fundamentally challenging our institutions. Appropriate use of systems approaches and modeling can often help inform those involved in this process. They can help policymakers identify what, at a more detailed systems level, may be impacting their view of the system at a higher level. Figure 2.3 shows, at least conceptually, how a system may look quite different at a detailed, say at ground level, compared to at 3000 feet or 1000 m—the higher level. Both reveal information the other does not.

Public policymakers have traditionally dealt with social problems by making only incremental change decisions. While often perceived as being a safer approach in terms of political risk, such incremental changes may only shift consequences from one part of the system to another or just address symptoms while ignoring causes. Part of learning the art of developing and applying systems models is in defining the system that is to be analyzed. Typically, each component of a system is a system in itself, and hence, the detail to be included in a model of a system of systems is determined by the modeler. Clearly, it also depends on the issues being addressed, the time and data available to address them, and the questions being asked and the decisions being considered by policymakers, which indeed can change over time. The umbrella phrase 'systems approaches' is used to describe a set of processes, methods, and practices that aim to define systems and improve their performance. Using systems approaches to address public sector problems and issues can prove challenging for many reasons, and one may be due to limited institutional authorities and capabilities, but applying them can sometimes motivate changes in institutional missions and structures as well.

#### **2.2.1 When to Use the Systems Approach**

It is reasonable to ask when does it make sense to consider using a systems approach to address a public policy issue. What are the necessary conditions? What unknown decision variables should be considered? In other words, what is to be decided? What is to be achieved? There are no common answers to these questions because each situation is different. However, in general, if the following conditions apply, the use of systems analysis methods within an institution may be beneficial.


Policing, community recreational services, environmental protection, planning, forest, crop and water management, housing, infrastructure capacity expansion planning, waste disposal, and energy production and use are all domains in which systems approaches have shown to be of value. In later chapters, you will have an opportunity to model such systems. The common denominator is that these services directly interface with the needs and lives of people whose expectations and realities are changing in an environment of technological, economic, and global change. Successfully addressing an issue today does not mean it will not have to be addressed again at a later time.

#### **2.3 Data: Are There Ever Enough?**

To understand policy problems better, analysts require data. Models can be helpful in identifying just what data are needed to make decisions. Modeling can be helpful in identifying not only the types or kinds of data but also their needed accuracy. Just how this is done will be illustrated in some of the following chapters of this book. For example, a model developed in Chap. 8 for finding the least-cost pollution control policy can identify the least-cost decisions even without knowing the precise costs of those decisions themselves. Hence, the common temptation to divide a systems study into two parts, the first being to collect all the available data, and the second part to think about how to use these data, should be replaced with a simultaneous coordinated modeling and data collection effort. Models can help identify what is needed, and data collection can identify what data are potentially available.

Today, collecting 'enough' of even the needed data for some policy analysis studies may be too resource-intensive or even impossible. The sufficiency of information is always an issue. In such situations, how to proceed with confidence? There is often no definitive answer. But it is worth remembering that the results of models are always based on assumptions. They address and provide answers to 'what if' questions. This allows decision-makers to focus on what they think the best assumptions might be rather than on what is best given some assumptions.

#### **Appendix**

#### **Some Case Study Summaries**

(a) Tackling domestic violence in Iceland.

The Icelandic government has used systems analysis to develop and implement a program addressing violence against women. The program introduces a new integrated support system for victims based on the concept that domestic violence is a social (and not private) harm affecting everyone. Following research findings on domestic violence, and supported by new legislation, the program supports the victim and concentrates on stabilizing the family, rather than focusing on providers and authorities (lawyers, police, social services, etc.). Today, the police, social, and child protective services (and increasingly schools and healthcare providers) are working in a coordinated fashion to detect and respond effectively to domestic violence across Iceland (OECD, 2017).

(b) Reshaping the child protection services in The Netherlands.

CYPSA (Jeugdbescherming Regio Amsterdam) is a regional Dutch organization certified to provide Child and Youth Protection Services in the Amsterdam area. Since 2008, the organization has worked to redefine its purpose using a systems approach. As a result, the organization adopted a new mission for its activities entitled "Every Child Safe, Forever." CYPS redesigned its entire system to fulfill that purpose and ensure it had a meaningful impact (OECD, 2017).

(c) Regulating Public transportation in Toronto, Canada.

Disruptive technological change and the emergence of the ride-sharing economy are at the core of this case study. In Canada, digitalization impacts all levels of government—city, province, and federal. Policies connected to emerging fields of the economy (e.g., housing and transportation, insurance, taxation, etc.) are regulated at different levels of government. This creates a problem—who has ownership over a governance issue? In 2014, the transportation network company Uber started to operate in Toronto without specific regulatory oversight. To tackle the regulatory challenge and simultaneously preserve the beneficial aspects of a sharing economy, an independent arbiter using systems methods proposed a sharing economy strategy for Toronto (and by extension cities across Ontario). They also helped develop new legislation that enables the city and its citizens to both regulate and benefit from new entrants that disrupt old businesses (OECD, 2017).

(d) Deciding how to share the Nile (Ethiopia).

The continuing conflict in the Nile River Basin between Egypt, Sudan, and Ethiopia over the filling of Ethiopia's newly built Grand Ethiopian Renaissance Dam is perhaps one of the best examples of an international 'wicked' water management problem. So far, after a considerable number of modeling studies by just about every academic, consulting firm, NGO, and agency or research institution that models water, including modeling studies designed to check up on the results of other modeling studies, no acceptable solution is apparent. This is in spite of negotiations that continue to take place at the highest government, and even international, levels. Downstream Egypt and Sudan do not want any increased risk of not having the water they consider they are entitled to, and upstream Ethiopia wants to fill the dam so as to maximize hydropower production to help meet the considerable demand for electrical energy in their country and in the surrounding region. Water stored in a reservoir or that evaporates from the reservoir is not then available downstream and that scientific fact for Egypt and Sudan is unacceptable. All water allocation issues can turn into wicked ones that have no solutions when there is an unwillingness to compromise or think outside the box in order to enlarge the options for achieving an acceptable water management policy (El-Fekki & James, 2021)*.*

(e) Modeling ecosystems in the Great Lakes (Canada and US).

A joint Canadian-US five-year 20-million-dollar systems study to identify improved operating policies for controlling the lake levels and river flows of the lower Great Lakes basin began over two decades ago. The study was undertaken by the International Joint Commission that oversees the management and operation of all boundary waters between the two countries. The Great Lakes serve multiple purposes and users. These purposes include hydropower production, shipping, commercial fishing, recreational boating, shoreline protection, and ecosystem enhancement. Ecosystem enhancement is often in conflict with other goals, especially shoreline preservation. Floodplain ecosystems benefit from some variation in water levels and flows, whereas shoreline owners would prefer low constant levels that cause less erosion. Higher and more constant lake levels are preferred for other purposes if they are below flood stage. Furthermore, benefits derived from all the purposes but ecosystem enhancement can be expressed in monetary terms. But the main motivation for this study was to find operating policies that better protected, and in fact restored, wildlife habitat along the shores of the lakes and downstream river. At one point during this study, the US co-chair of the IJC requested a benefit–cost analysis that included all the purposes served by the Lower Great Lakes system, including ecological habitat restoration. He specifically wanted to know the dollar value of a muskrat since the main conflict was between what shoreline owners wanted and what ecologists assumed muskrats (representing wetland habitats) wanted. Without being able to justify a specific dollar value for ecosystem enhancement, the study ended after 5 years without that benefit–cost analysis and thus without a decision. The commissioner claimed later that not getting that analysis was one of the reasons no decision on a revised operating policy was made—until nine more years of further analyses and political debates (IJC, 2006).

(f) Needing an interested client (Ghana).

A few years ago, the African Development Bank funded a project exploring the possible reoperation of the Akosombo Dam on the Volta River. This hydroelectric dam in southeastern Ghana is operated by the Volta River Authority. Since the beginning of its operation in 1965, the dam's discharges have degraded the downstream ecosystem of the river and its floodplains. This in turn has adversely impacted those living downstream of the dam. The aim of the project was to find an alternative operating policy that would restore the downstream ecosystems while still meeting electrical energy demands. The institution overseeing the project was the power authority. It had the authority to alter the dam's operating policy, but producing power and generating electricity were their main missions and objectives. Here come these foreign scientists and modelers on relatively short visits to work with the authority and to help them obtain the data and develop the necessary models needed for establishing a reoperation policy and estimating its impacts. While spending considerable time with many of the impacted stakeholders as well as with the staff of the power authority during those visits to Ghana, the authority made it clear during each visit that ecosystem restoration was not their mission or interest. It might not have made any difference, but not being able to work closely and continuously with all involved in the project surely contributed to the failure of the modelers to gain the level of trust and understanding needed to enable a successful reservoir reoperation result (Opgrand et al., 2019).

(g) Modeling the Great Man-made River (Libya).

The Great Man-made River in Libya is a system of wells, pumps, pipes, and reservoirs designed to bring water from aquifers in the Sahara Desert to where water is needed along the *Mediterranean Sea* coast where most Libyans live and irrigate crops. Optimization models were used to identify cost-effective designs and operating and capacity expansion policies and to compare their costs to the costs of other alternatives for satisfying Libya's water demands. Getting the data to enable that modeling proved to be a challenge. Individual government agencies considered the data they had gave them power and were not willing to give that up. Only until some degree of trust was developed (on the squash courts) between the foreign modelers and agency personnel did it become possible to obtain the needed data.

As a footnote, during the planning and construction of the Great Man-made River, several engineers convinced the New York Times, a major and trusted newspaper in the US, that instead of being a water distribution system the project was really intended for transporting troops and tanks in trucks and trains to where Libya could invade Libya's neighboring countries without being seen by satellites. This 'news' was published on the front page of the New York Times, whose motto is 'all the news that is fit to print,' on December 2, 1997. Indeed, it supported the popular notion that Libya's government was not to be trusted (Bonner, 1997).

(h) Water and qat security (Yemen).

Sana'a, the capital of Yemen, depends on an aquifer for its water. Years ago a groundwater modeling study showed that this aquifer would be depleted in a decade or two due to excessive withdrawals. Most of the groundwater withdrawals were being used for growing qat, a green-leaved plant that has been chewed by Yemenis for centuries for its stimulant effect. Asking Yemenis to restrict their chewing of qat would be similar to asking coffee drinkers to restrict their drinking of coffee. Finding a socially as well as economically acceptable solution to this water management problem proved to be difficult. When suggesting to policymakers that perhaps this issue should be discussed in public in hopes of enlisting their help and support in identifying a suitable solution, they, the policymakers, rejected the suggestion. "Why should we worry about this potential crisis? When it happens, we may not even be alive."

(i) Restoring the Florida Everglades (United States).

An example of having to adapt to unforeseen consequences involves the long-term project to restore the ecological health of the vast Everglades wetlands in the state of Florida in the US. Begun two decades ago, this project is arguably the most ambitious ecosystem recovery effort anywhere. It is in some sense in response to past management decisions that focused on development and did not consider preserving this unique environment. The project is essentially a vast re-plumbing scheme aimed at replicating as nearly as possible the historical freshwater flows over the flat wetlands of the Everglades—often called the River of Grass—that once made South Florida a biological wonderland. These flows were diverted when in the late 1940s the US Army Corps of Engineers initiated a flood control project aimed at protecting land for urban and agricultural development. Over a half-million acres were drained by a network of levees, canals, and pumping stations. While making Florida's eastern coast and midlands safer for development, it also destroyed much of the Everglades ecosystem including its wildlife. Now people care more about this unique ecosystem and the environment than they did when the decision was made to 'drain the swamp'. The ongoing restoration project involves taking out much of that drainage and diversion infrastructure and restoring the overland flows to their original patterns to the extent possible to maintain what remains of this unique environment and ecosystem. The project is being informed by numerous simulation models and modelers from multiple federal and state agencies, each responsible for addressing a range of issues. The hope is that this unique ecosystem will continue to motivate people to visit (and spend their time and money in) Florida (Grunwald, 2006).

(j) More water management modeling (Africa, Asia, Europe, and US).

Successful examples of effective ongoing use of the systems approach to inform those managing water include the Mekong River Commission's Decision Support Framework (Mekong DSF), the Nile Basin Initiative's Decision Support System (NB DSS), and the flood forecasting model, FloRiAn, of the International Commission for the Protection of the Rhine (ICPR), *the Corps' Water Management System (CWMS)* used by the U.S. Army Corps of Engineers to support its regulation of river flows through reservoirs, locks, and other water control structures located throughout the US. Other water allocation models are being used to inform managers of the Senegal and Zambezi Rivers in Africa and the Euphrates and Tigris Rivers in the Middle East, the South-North water diversion project in China, and in the operational management of Lake Como in Italy (FAO, 2021; Stakhiv et al., 2020; Todini, 2014).

(k) Educating young modelers (US).

When in the 1970s the Clean Water Act and its Amendments were passed in the US, they required all point sources of wastewater to be treated using 'best management practices' (that generally meant secondary treatment that removes about 80% of oxygen-demanding pollutants from wastewaters) before discharging them into receiving surface water bodies. The CWA policy became an expensive national public works program. Model studies showed that considerable money could be saved by adopting cost-effective policies, policies that met surface water quality standards at a minimum cost. In terms of infrastructure construction and operation costs, the CWA policy was expensive, but politically it was cheap. To enforce the CWA policy required monitoring only the quality of wastewater treatment plant influents and effluents, an easier task than monitoring the quality of wastewater influents and effluents and receiving surface water bodies. Modelers who could identify more cost-effective wastewater treatment policies for particular watersheds and river basins did not have to defend their models, along with their assumed model parameter values, in court. Every potential polluter was treated equally. Investigations into which polluter upstream contributed to a water quality standard violation downstream, and by how much, were not necessary. Politically, the CWA policy was a much easier and less costly policy to implement. So much for the education of those advocating cost-effectiveness.

(l) Food security (Algeria).

To become more self-sufficient in feeding its people, the government of Algeria initiated a study (in the 1970s) aimed at identifying the sites, design capacities, and operating policies of infrastructure needed to capture, store, and deliver irrigation water to parts of the Sahara Desert for growing crops. The system performance measures the government wanted considered were infrastructure instillation and operating costs and the amount and reliability of water delivered. The task of the modelers was to identify alternatives that represented efficient tradeoffs among these three conflicting objectives. Upon presenting some results for one region of the country the government chose an inferior solution, one that cost more, was less reliable and produced less water than many other possible solutions. When asked why that plan was chosen, the answer was that their chosen plan satisfied other objectives better. This is an example of the fact that the set of project objectives and their relative importance can change during a modeling, planning, and policymaking process, especially as all involved learn more from the modeling and other sources about what is possible and hence what can be achieved.

(m) Asking the right questions (Cambodia).

In the Mekong basin, as in many other river basins in this world, hydroelectric dam builders are busy practicing their trade to meet increasing demands for energy. In one recent study, the question being addressed was where to site and how to design and operate a series of dams to produce hydroelectric power. Framing the question in this manner leads one to identify dam sites and hydropower plant capacities and reservoir operating policies needed to meet specified energy targets. Framing the question to be how to produce more energy leads to a broader range of options including the consideration of solar panels on existing reservoirs. In the Lower Mekong, solar power was shown to be a much less expensive option than building and operating more dams and less damaging to the ecosystems and biodiversity of the river. This information had an impact on a decision not to build a particular dam that was planned. For how long that decision will apply, who knows (Ratcliffe, 2020; Thomas et al., 2017).

(n) Achieving cleaner air (Europe and India).

Where several different goals compete, modeling can help to find a balance. A highly successful example is the Regional Air Pollution Information and Simulation Model (RAINS). In the 1990s, RAINS helped to guide Europe's policy on six air pollutants, including particulates and sulfur dioxide (the chief cause of acid rain), calculating costs and health effects of various policies. RAINS results in Europe and India have shown the power of cooperative action on air pollution, which is much more effective than efforts by any single state and, therefore, more politically attractive. Now extended to include greenhouse gases, the Greenhouse Gas and Air Pollution Interactions and Synergies (GAINS) Model reveals how clean-air policies can have co-benefits, improving the health of people and ecosystems while also curbing climate change (Battersby, 2021).

#### **Lessons from These Case Studies**

The application of systems studies of public policies is often triggered by a perceived crisis or opportunity. This may take the form of an actual crisis or a perception that the current performance of a public system could be better. All the case studies highlight that someone needs to have a vision and take direct ownership of the problem. All the case studies outlined above exhibited either some level of urgency or obvious opportunity to serve the public better that motivated the systems analyses. This in turn created a window of opportunity. Would the domestic violence project have developed if Iceland had not experienced a social or fiscal crisis? Would the modeling projects in the Nile, in Libya, and in Florida have taken place without some sense of urgency? Probably not. In short, the acknowledgment of cumulative severe effects can lead to a sense of urgency or crisis. However, the case studies from the Netherlands and Algeria and Yemen indicate that it is difficult to implement changes during truly chaotic moments in organizations, as some level of stability must be reached to initiate a broader systems study. The stakeholders involved in such situations need to retain a sense of urgency, even in a stable environment. Maintaining the political will is an essential part of implementing change in more static conditions. Those at the highest level of an agency need to acknowledge that change is needed in the services they provide. While achieving an agreement that there is a problem or opportunity is the first step, it is not enough. There has to be an agreement that something should be done to address the problem or take advantage of an opportunity. This agreement has to become actionable involving people and place.

Once organizations recognize the need to change, they must invest the time to understand and articulate both the problems to be addressed and the objectives to be achieved. In the case of the Netherlands, this meant long internal discussions and the identification of a new mission: "Every Child Safe, Forever." The organization understood that they needed to focus on children's safety and to start treating adults as parents first and individuals second. In the case of Iceland, broader community discussions with the police, social services, child protection, the church, and so on were initiated. These reaffirmed the notion that domestic violence is a public health issue and not a private matter, thus prioritizing the social effects of violence over privacy. In Canada, the value debate made it clear that a more flexible, affordable transportation system was preferred over other concerns. In the case of Ghana, the responsible organization never considered a change to be in their interest, as indeed it might degrade the service they were currently providing.

When implementing change, stakeholders may suggest many objectives or goals to be achieved. Some goals may conflict with others. This was the case in the Great Lakes, Algeria, Nile, Ghana, and Florida Everglades studies. In these cases, systems modeling was able to identify the tradeoffs among conflicting objectives or performance measures. Chapter 16 in this book is devoted specifically to how this can be done.

Meaningful measurement, modeling, and monitoring are key to addressing and finding acceptable solutions to complex problems. Without them, causality and the effects of interventions are often difficult to assess. In the Netherlands, a specific measure was used to evaluate child safety—'acute child safety'. In Iceland, a new risk framework was adopted. In the Canadian case study, the whole process was initiated to produce a legitimate evaluation of the impetus for change. Consequently, modeling served as a communication tool used to justify the process of systems change and the use of systems approaches themselves. The evaluation carried out by the Institute for Gender, Equality, and Difference at the University of Iceland, regarding the domestic violence project, helped to keep the process going. In Toronto, the facilitator's evaluation, alongside additional federal and nongovernmental reports, paved the way for the city to advance the sharing agenda. Agencies involved in the restoration of the Florida Everglades are typically spending over \$50 million annually for modeling and monitoring and data management. They clearly believe if you cannot measure and monitor, you cannot manage needed change.

A number of other factors emerged from these case studies. First, contextual factors impact systems change. Timing is important and supporting elements must come together to create a 'window of opportunity'. Second, different resources are needed for systems change - , time, finances, capabilities, and legitimacy, all of which require leadership and sustained political support.

However, leadership alone is not sufficient. Based on the case studies, it is difficult to say which factors were the most influential, but it is clear that different elements have to be in place to make change possible. Moreover, systems change is a continuous process and it is essential to ensure feedback with regard to unintended consequences and unforeseen conditions during the implementation phase and beyond. Monitoring is critical to being able to decide if and when to adapt and make further changes.

Modeling, as objective and value-free as it tries to be, cannot insulate itself from value judgments and decisions. Values enter the modeling process even in the framing of questions to address and objects of study, in decisions about what gets funded, in the selection of data to be collected, and in the analytical methods to be used and the scope of the analyses. Values also play a role in deciding what scientific evidence, including modeling results, are deemed appropriate to be communicated, and how they are to be presented. Just how effective modeling studies are in informing stakeholders and policymakers depends on just how much trust exists between them. Trust in modeling increases if modelers are engaged and open with the people they want to inform and influence.

#### **Exercises**


#### **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **3 Creating Models**

#### **ABSTRACT**

Introduces the approach to developing optimization models for identifying and evaluating alternative designs of some infrastructure. The chapter distinguishes between two general types of models, optimization and simulation, and continues the discussion of the advantages and possible pitfalls of modeling.

System analyses involve modeling. The only way I know how to become good at model development and use is to practice. Opportunities to practice are given throughout the remaining chapters of this book starting in this chapter.

#### **3.1 Let's Model**

To develop mathematical models, we need to use some notation for defining systems and their inputs, outputs, and various measures or indicators of performance. This chapter uses some simple examples to illustrate the modeling process and some common notations modelers use.

Many models consist of equations and inequalities that contain variables whose values are unknown and parameters whose values are assumed known. Together they define the system components and their interactions, and the system performance measures.

For example, consider creating a local community park having a specified area, *A*, that is to be surrounded by a fence. The perimeter of the park, *P*, i.e., the total length of fencing, is to be determined (Fig. 3.1).

Depending on the area's dimensions, which we don't know, there are many possible values of *P* for a fixed area *A*.

Consider a rectangular area as illustrated in Fig. 3.2. If the area is rectangular with length *L* and width *W*, then the area *A* is *LW* and the total length of fencing *P* is 2*L* + 2*W*.

D. P. Loucks, *Public Systems Modeling*, International Series in Operations Research

<sup>&</sup>amp; Management Science 318, https://doi.org/10.1007/978-3-030-93986-1\_3

**Fig. 3.1** A park area surrounded by a fence

**Fig. 3.2** A rectangular area having length *L* and width *W*

Minimize *P* the length of the fence needed

and expressions that define *P* in terms of the dimensions of *A*.


**Fig. 3.3** A circular area having radius *R* and circumference *P*

*L* ≥ 0, *W* ≥ 0 The variables *L* and *W* are non-negative.

The objective function and all the inequality constraints just listed make up a model of this rectangular park. The variables *P*, *L*, and *W* are the unknown decision variables. The known area A is a parameter, along with the number 2.

If the area of the park is a circle, the radius, *R*, of the circle is unknown but is constrained by *A* (Fig. 3.3).

$$A \le \pi R^2$$

The value of π is a known parameter, 22/7.

The needed fencing must at least surround the circular park.

$$P \ge 2\pi R \text{ and } R \ge 0. P \ge 0.$$

The two unknown variables are non-negative.

Now obviously the solution to the circle problem is *<sup>P</sup>* <sup>=</sup> <sup>2</sup> <sup>π</sup> *<sup>R</sup>* and *<sup>R</sup>* <sup>=</sup> <sup>√</sup>(*A*/π) so we don't need an optimization model to find the minimum value of *P*. But in the case of a rectangle, it may not be obvious what the values of the *L* and *W* are that minimize *P* given *A*. But even here a little thought will convince anyone that *L* will equal *W* and thus each will equal the square root of *A*, √*A*. But if the fence had to be of different types for the four different sides, each costing different amounts per unit length, and the objective was to minimize total cost, the solution would not be so obvious.

Before leaving this park problem, an equivalent modeling approach is to maximize the area, *A*, of the park given a fixed known length of fencing, *P*, available. Its solution will be the same as the solution to the previously defined models if the input parameter values are the same.

In the real world, this community park fencing problem may be a little more complex in that neither a rectangle nor a circle is desired or possible. Also of possible interest may be the gain in fencing that may be required for a unit gain in the area. One can determine these values by changing the parameter value *A* and resolving the model.

These simple examples serve to illustrate what modeling may look like and some of the notation used in defining models. Models consist of mathematical expressions that define the objectives or system performance measures as well as the constraints that specify conditions that have to be satisfied while minimizing or maximizing an objective function. The mathematical expressions contain decision variables whose values we seek and parameters whose values we assume we know.

The models just developed involving areas and their perimeters can be extended to consider three dimensions, i.e., volumes, rather than just two. Referring to the tanks shown in Fig. 3.4, there are many possible combinations of values of their dimensions that will satisfy any specified required volume, *V*. The best combination of values for the dimensions will depend on the design objective. One possible objective might be to minimize the area of material used for the tank's sides, its base, and top. Another may be to minimize the total cost of the tank's surfaces, where the costs per unit area of each surface can differ. Models can be developed that when solved will identify the values of *l*, *w*, and *h* of a rectangular tank, or *R* and *H* of a circular tank, as shown in Fig. 3.4, that achieve some objective, while meeting a volume *V* constraint.

There are many ways one can model this design problem. Different people may create different models, all of which when solved will yield the same solution if the assumed objective and parameter values are the same. Modeling is an art, and different artists rarely paint the same scene in the same way. But all models consist of equations and inequalities and each term within each equation or inequality has the same units of measure.

Assume the goal of a community public works department is to increase the reliability of the community water supply. They can do this by building a water storage tank. The greater the tank capacity, the greater will be the water supply reliability. But the greater the tank's capacity, the greater its cost. Assume the community doesn't want to spend more money than it has to but it has not decided what that amount should be. To help them make such a decision, they would like to know the relationship between cost and tank volume. Obviously, for a specified volume, there could be many costs depending on the tank's dimensions. Hence, what is desired is the function defining the minimum cost associated with any specified tank volume. In other words, it wants to know the tradeoff between tank volume capacity and its minimum total cost. This tradeoff can be defined using an optimization model.

What costs money are the surfaces of the tank. For a rectangular tank, these surface areas are defined by the tank's length *l*, width *w*, and height *h*. The cost per unit surface area may depend on the particular surface area, whether it is the tank's bottom, sides, or top.

The rectangular tank's capacity or volume, *V*, is the product of its length, width, and height, *lwh*.

To minimize the tank's total cost, we are minimizing the cost of the sides having a total area of 2(*wh* + *lh*) and the top and bottom each having a total area of *lw*. Multiplying the unit cost (cost per unit area) of each surface area (CSIDE, CTOP, and CBASE) times the area defines the total cost of that surface area. Adding these total surface costs gives us the total tank cost.

The minimum cost model can be written as follows:

Minimize Total\_Cost = CSIDE2*h*(*l* + w) + (CTOP + CBASE) (*l*w) Subject to: *l*w*h* ≥ *V*.

Solving this model for various values of the volume, *V*, will define the minimum cost function for storage volume, as illustrated in Fig. 3.5. Knowing the minimum (and marginal) cost associated with any particular volume should be useful information to those having to decide what the tank's capacity should be.

In this example as with the others, there are many possible feasible solutions, i.e., solutions that satisfy the constraints. We identify and use an objective to determine the best value of all the unknown decision variables (in this case *l*, *w*, and *h*) associated with that objective. Different objectives may result in different 'best' solutions for various volumes *V*.

Before leaving this example problem, it is worth mentioning that there is often more than one way to view an optimization problem. For example, this problem could be viewed as finding the maximum volume V that can be obtained given a budget constraint, i.e., the money available to spend on the surfaces of the tank. The variable 'Total\_Cost' in the above model is now known, and the objective becomes Maximize *V*. Nothing else changes. Again, for various values of Total\_Cost, the model solution will identify the maximum volume that can be obtained and its associated dimensions *l*, *w*, and *h*.

Clearly, the values of the cost per unit area parameters, CSIDE, CTOP, and CBASE, will influence the resulting values of *l*, *w*, and *h*. If these unit costs are all the same, then we are finding the minimum total surface area associated with any volume *V*. In this case, the tank becomes a cube where *<sup>l</sup>* <sup>=</sup> *<sup>w</sup>* <sup>=</sup> *<sup>h</sup>* <sup>=</sup> <sup>√</sup><sup>3</sup> *<sup>V</sup>*.

#### **3.2 Types of Models**

The examples just discussed involve finding the 'optimal' values of all the unknown decision variables of a particular 'system'. Optimization models are used to find those decision variable values that maximize or minimize some function that represents some system performance goal or objective. Examples are the maximization of net economic benefits; the minimization of costs; the maximization of equity; the minimization of risks of various types; the maximization of measures of ecological, environmental, or human health; and so on. There are many different types of optimization models. The following chapters introduce some of them. They all have their advantages and limitations, and there is no one optimization method that is best for all optimization problems. But all optimization models focus on addressing 'what should be' the values of all the unknown decision variables given all the assumed parameter values, constraints, and system performance goals.

As opposed to optimization, simulation models focus on addressing 'what if'. What will be the performance of the system given assumed values of all parameters and decision variables? In these models, the values of all decision variables are specified, and the model output indicates how the system performs given the various inputs and decision variable values.

The difference between optimization and simulation is illustrated in Fig. 3.6.

**Fig. 3.6 a** Schematic of optimization modeling where the optimal decision variable values of a system are determined based on an assumed performance goal. **b** Schematic of simulation modeling where decision variable values of a system are specified, and the performance of the system is to be evaluated

#### **3.3 Why Model?**

The reason we develop and solve models of systems is to better understand how to improve their performance and to estimate the impacts of doing so.

In both public and private sectors, there are often certain systems that may not be functioning as well as expected or desired, or there may be opportunities for modifying existing systems or building new ones that would increase social welfare or economic benefits or environmental quality or better satisfy some other system performance objective or goal. When there are many possible decisions or actions that could be taken and the best set of decisions or actions is not obvious, it often makes sense to use models to identify what decisions may have better outcomes than others. Solving models is one way of estimating the various impacts resulting from various decisions. We build and solve models to get useful information. We use models to aid us in identifying and evaluating alternative decisions in our search for the best.

Public policy modeling involves the use of tools taken from the disciplines of economics, planning, political science, operations research, statistics and probability theory, and applied mathematics. When applicable and depending on the issue or system being analyzed, it will also draw on agriculture, ecology, environmental management and policy, transportation engineering, law, and other disciplines as applicable and needed.

We often deal with systems that are so complex as to be beyond the limits of our intuitive understanding. If it is not obvious what decisions to take that will maximize system performance, then by definition, the system is complex. In these cases, we can construct models to help us study that which we seek to understand better.

Whether a model is right or wrong or too simplistic or too complex is simply a value judgment. Whether it is correct or incorrect, or a good model or bad model, depends on how well it serves its purpose, given the information needed and the time and data available. The most important question to ask is how well it promotes our understanding of how to improve the design and/or management or operation of a system and the resulting impacts. The extent to which a model aids in the development of our understanding is the basis for deciding how good the model is. Many find that just the process of building models gives them a greater understanding of the system they are modeling even before attempting to solve them.

When developing models there is always a tradeoff between reality and simplicity. A model is inevitably a simplification of reality. The question is always what to include and what to exclude. If relevant components are excluded, there is a chance that the model will be too simple to be useful. On the other hand, if too much detail is included, the model may become so complicated that, again, it fails to promote the stakeholder trust needed to fully accept its output. A recommended approach to model building is to start simple and add detail only as needed and after successfully solving the simpler model.

#### **3.3.1 Some Cravats**

Our job as modelers is to construct models with sufficient detail to provide decision-makers with the understanding and precision they need or want about the system or process of interest and for which decisions will be made. They may want to know the following:


These questions should be answered at the level of detail, and in terms, appropriate for the level of decision-making and issues being addressed.

Modeling can help address these questions but will be based on a given set of assumptions. What are the best assumptions? Models can be helpful in determining the best decisions given the assumptions, and the objective(s), but not on identifying what assumptions are best, or correct, or true. Modeling can, therefore, help focus the political debate on just what assumptions are best rather than spending time determining what decisions are best given any assumptions.

This suggests that a modeler's job is not over until a 'sensitivity analysis' is performed. In a sensitivity analysis, the assumptions should be varied over their likely values to determine just how sensitive the model's decision variable values are to changes in the assumptions. If, as one hopes, the changes in those decision variable values are not significant, there may be less need to spend a lot of time debating the assumptions. Otherwise, there may be a greater need to find a robust set of decision values that will ensure satisfactory system performance no matter what assumptions turn out to be true.

#### **3.3.2 Limitations and Common Sins**


**Fig. 3.7** We all have mental models, and we should not ignore them when evaluating our mathematical ones

#### **3.3.3 A Word of Caution**

For anyone learning how to develop and solve various types of mathematical models to address various problems and issues, it is easy to become enamored with the potential power of this methodology for identifying and evaluating alternatives, and indeed for finding mathematically optimal solutions. This especially applies to those who enjoy the subject and enjoy solving puzzles. They tend to trust their models. But when a computer program says an optimal solution is found, one should look at it and ask, does the solution make sense? Are the results surprising? If so, there may be a good chance that there is an error in the model or its input. If you cannot find one, then maybe you should do all the tests and sensitivity analyses you can think of to be sure you have actually created some new knowledge or understanding. If that is the case, then brag about it! But more to the point, we all have mental models of what may be the best decision, at least generally if not in its details. These mental models may be influenced by factors not included in the mathematical ones. Hence, do not ignore your mental models and others who have them, including those as illustrated in Fig. 3.7.

#### **3.3.4 Subscripted Variables**

When constructing models, it is often convenient to use subscripts or superscripts to distinguish among different variables. For example, consider allocating a resource to *n* different activities. Let the subscript *i* represent a particular activity. Then *Xi* can represent the allocation to the *i*th activity. If *R* is the total amount of resources available, then an obvious constraint on all the allocations is that their sum cannot exceed *R*.

$$X\_1 + X\_2 + \dots + X\_l + \dots + X\_n \le R.$$

.

This can also be written using the summation sign -.

$$\sum\_{i=1,n} X\_i \le R \text{ or } \sum\_{i=1}^n X\_i \le R.$$

If for some reason you wanted to know the product of all the *Xi* variables, it could be written using the product sign .

$$X\_1 X\_2 X\_3 \cdots \cdot X\_i \cdot \cdots \cdot X\_n = \prod\_{i=1}^n X\_i \cdot \cdot$$

Assuming each of these allocations must be non-negative, then

$$X\_i \ge 0, \ i = 1, 2, \cdots, n$$

or if *n* is understood you can use the 'for all' sign ∀.

$$X\_{l} \ge 0, \,\forall l$$

It doesn't matter what letters are used for subscripts or superscripts as long as what they signify are defined.

For example, if the subscript *i* denotes a location and the subscript *j* a particular product, and if *X*ij is the number of products of type *j* sent to location *i*, then

$$\sum\_{j} X\_{ij} = \text{total number of all products } j \text{ sent to location } i,$$

$$\sum\_{i} X\_{ij} = \text{total number of product } j \text{ sent to all locations } i,$$

$$\sum\_{j} \sum\_{i} X\_{ij} = \text{total number of all products sent to all locations.}$$

where it is assumed understood how many locations *i* and how many different products *j* exist and each sum includes all the values of the associated subscript.

There will be other symbols we will be using, some of which are shown in Table 3.1. We will define others when we need them.

#### **Exercises**



**Table 3.1** Some modeling operations and notations (The use of the constant *e* will be discussed later.)



Which alternative would be the best in your opinion and why? Why might a decision-maker select alternative E even realizing other alternatives exist that can give more security and road maintenance?

9. Define a mathematical model for finding the dimensions of a cylindrical tank that minimizes the total cost of storing a specified volume of liquid. What are the unknown decision variables? What are the model parameters? How would you solve this model?

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **4 Modeling Examples and Solutions**

#### **ABSTRACT**

This chapter illustrates the development of optimization models for various example problems and introduces the hill-climbing approach for solving them, as and if appropriate.

#### **4.1 Introduction**

In this short chapter, the problem of allocating scarce resources to multiple users will be introduced and modeled. The so-called hill climbing method will be used to find the allocations that best satisfy some objective. Later chapters will introduce other methods of solving this allocation problem. The purpose here is not to emphasize resource allocation issues but to use that problem as an example to illustrate the model building and solution process.

#### **4.2 Resource Allocation**

Consider the common problem of having to supply multiple agencies with the resources they need to function but there are not enough to meet their requested allocations. In this case, assume there are three such agencies and *R* units of the resource available as illustrated in Fig. 4.1 Let each variable *A*<sup>i</sup> be the unknown allocation to user i, (i = 1, 2, 3). For any non-zero value of *R*, it is clear there are many possible combinations of allocations that could be made. The problem is to find the best values of the allocations, *A*i.

There are various criteria one could use to identify just what allocations are best. If the benefits, *B*i(*A*i), associated with each allocation *A*<sup>i</sup> can be identified, then one criterion could be to maximize the total benefits, *TB*, obtained from all three allocations and then determine what fraction, *f* i, of those total benefits should

<sup>&</sup>amp; Management Science 318, https://doi.org/10.1007/978-3-030-93986-1\_4

**Fig. 4.1** Schematic of a resource allocation problem involving *R* units of a resource and three potential users of those resources. Each

be allocated to each use in some equitable way. Some economists liken this to maximizing the size of the economic pie (Fig. 4.2). This provides more benefits available to distribute. This redistribution approach assumes the existence of some institutional arrangement that could implement such a policy.

A model of this problem is as follows:

$$\text{Maximize } TB = \sum\_{\mathbf{i}} B\_{\mathbf{i}}(A\_{\mathbf{i}}) \text{ total benefits}$$

Subject to the following:

 <sup>i</sup> *A*<sup>i</sup> ≤ *R* Total allocation cannot exceed the resources available

*A*<sup>i</sup> ≥ 0 Non - negative allocations for *i* = 1, 2, 3.

If the total benefits are to be redistributed, then the portion of the total benefits, *TB*i, allocated to use i will be some fraction, *f* i, of the total benefits, *TB*. Determining the best values of the fractions *f* <sup>i</sup> is a political issue.

$$TB\_{\mathbf{i}} = f\_{\mathbf{i}}TB \quad \forall \mathbf{i} \text{ and } \sum\_{\mathbf{i}} f\_{\mathbf{i}} = 1.$$

Other possible criteria include the following:


What each user wants or expects, *D*i, is often called a target. Deviations from targets usually result in economic or other types of losses. In situations where the targets themselves are unknown and to be determined, the objective or criterion could be the maximization of the sum over time of benefits associated with target values less the losses associated with allocations that are less than the targets. Such models will be discussed in more detail in later chapters of this book.

#### **4.3 An Example Allocation Problem**

Assume for this example that the resources being allocated are apples. The available apples are allocated to three community farmer's markets that modify (clean and package) the apples they get and then sell these apples to various customers. The maximum unit price they can charge their customers and still sell all they have is dependent on the number of apples they have available for sale. For farmer's market 1 this unit price function (also called a demand function) is (6 − *A*1). The total income derived from an allocation of A1 apples is, therefore, the unit price (6 − *A*1) times the quantity A1. This product equals 6 *A*<sup>1</sup> − *A*<sup>1</sup> <sup>2</sup> and defines the function *B*1(*A*1). Assume *B*2(*A*2) is 7 *A*<sup>2</sup> − 1.5 *A*<sup>2</sup> <sup>2</sup> and *<sup>B</sup>*3(*A*3) is 8 *<sup>A</sup>*<sup>3</sup> <sup>−</sup> 0.5 *A*3 2. These are concave functions that look like hills whose slopes decrease as the allocations *A*<sup>i</sup> increase. Their maximum income values result when the allocations are 3, 7/3, and 8, respectively, for a total of 13.33. While not necessarily realistic, these functions will serve to illustrate various model solution methods.

If the total apples available, *R*, equals or exceeds the sum of the allocations, 13.33, that result in the maximum incomes, then there is no need to model the problem. Just make those allocations to obtain the maximum possible total income. However, if the available apples, *R*, is less than 13.33, solving a model can help define the allocations to each market that will maximize the total income that can be obtained from those *R* apples.

The optimization model for finding this maximum total income can be written as follows:

Maximize *T B* = total income or total benefit.

Subject to the following:

*T B* = B1 + B2 + B3 Defines total benefit as sum of individual benefits. B1 <sup>=</sup> <sup>6</sup>*A*1−*A*<sup>2</sup> 1. B2 <sup>=</sup> <sup>7</sup>*A*2−1.5*A*<sup>2</sup> 2. B3 <sup>=</sup> <sup>8</sup>*A*3−0.5*A*<sup>2</sup> 3. 3 *i*=1 *Ai* ≤ *R* Total allocation cannot exceed the resources available. *Ai* ≥ 0 Non - negative allocations for *i* = 1, 2, 3.

#### **4.4 Hill Climbing**

One approach to solving this model is to divide the resources available, *R*, into discrete values and then allocate each successive discrete unit of resource to whichever market that will result in the largest additional benefits. This works for this example because each benefit function is smooth and continually concave, i.e., the slopes of the function decrease as the allocations increase. This method for finding the best allocations is called the steepest hill approach. It works for finding a maximum value of an objective function when the functions are concave or for minimizing when the functions are convex. The smaller the discrete values of the allocations, the more accurate will be the solution.

The sketches in Fig. 4.3 illustrate this steepest hill climbing approach for solving the above model. Each plot shows the benefits (on the vertical axes) associated with integer allocations (shown on the horizontal axes). The numbers shown

**Fig. 4.3** User benefit functions *B*<sup>i</sup> associated with integer units of allocations *A*i. Also, shown between the red dashed lines are the slopes of the benefit function segments, -*B*i/-*A*i, where all -*A*<sup>i</sup> equal 1.

between the red dashed horizontal lines are the additional benefits obtained from an additional allocation unit. It is the slope of the 'hill' in that interval of the function. Hill climbing involves finding the steepest hill among all those remaining, and climbing it, i.e., allocating another unit of resources to that user. This process continues, allocating one unit of resource at a time, until there are no more resources available to allocate or, in this example, until any additional allocation results in a decrease of benefits.

Referring to Fig. 4.3, each user would like to have the resources that maximize the value of their benefits, i.e., their income. User 1 would like 3 discrete units of resource, user 2 would like 2 discrete units, and user 3 would like 8 discrete units, adding up to 13 discrete units.

Assume only 6 units of resource, *R*, are available. Clearly, all 6 units will be allocated since increasing benefits will result in increasing allocations up to 13. One way to determine how 6 units of resource could be allocated that maximizes the total benefits obtained from them is to divide the 6 units of resource into discrete units (e.g., integer values) and allocate each of them in succession to the user that gains the most additional benefits. Once an allocation is made, there is no need to change it later. Once again this is because each user's benefit function is a continuous concave function. Additional benefits decrease as allocations increase. Thus, during the allocation process, one attempts to keep the slopes the same at each allocation. These slopes are called marginal benefits.

Referring again to Fig. 4.3, if only one discrete integer unit of resource is available, it should be allocated to Use 3. This is because 7.5 additional benefits obtained from Use 3 are greater than 5.5 obtained from Use 2 or 5 from Use 1. This results in allocations to the three uses of 0, 0, and 1, respectively.

The next unit of resource also goes to Use 3 since 6.5 is greater than 5.5 from Use 2 or 5 from Use 1. The allocations to the three uses are now 0, 0, and 2, respectively.

The third unit of resource can go to either Use 2 or Use 3 since 5.5 is obtained from both and is greater than 5 from Use 1. Say it goes to Use 2. The allocations to the three uses are now 0, 1, and 2, respectively.

The fourth unit of resource goes to Use 3 since 5.5 obtained from Use 3 is greater than 5 from Use 1 and 2.5 from Use 2. The allocations to the three uses are now 0, 1, and 3, respectively.

The fifth discrete unit goes to Use 1 since 5 from Use 1 is greater than 4.5 from Use 3 and 2.5 from Use 2. The allocations to the three uses are now 1, 1, and 3, respectively.

The sixth unit goes to Use 3 since 4.5 from Use 3 is greater than 3 from Use 1 and 2.5 from Use 2. Hence, the final allocations are *A*1=1, *A*2=1, and *A*3=4. Plugging these values into the total benefit function yields 34.5.

Note that the slopes, [*B*i(*A*<sup>i</sup> + 1) − *B*i(*A*<sup>i</sup> − 1)]/[(*A*<sup>i</sup> + 1) − (*A*<sup>i</sup> − 1)], of each of these benefit functions at their optimal allocations all equal 4. For Use 1 at *A*<sup>1</sup> = 1, the slope between *A*<sup>1</sup> = 0 and *A*<sup>1</sup> = 2 is (8−0)/2 = 4. For Use 2 at *A*<sup>2</sup> = 1, the slope between *A*<sup>2</sup> = 0 and *A*<sup>2</sup> = 2 is (8−0)/2 = 4. For Use 3 at *A*<sup>3</sup> = 4, the slope between *A*<sup>3</sup> = 3 and *A*<sup>3</sup> = 5 is (27.5 − 19.5)/2 = 4. If discrete allocations are being made as they were in this example, it is likely the marginal benefits, the slopes of the benefit functions associated with the total allocation to each user, will not be the same as they will be if the allocations are not discrete.

For those who know calculus, you can verify that the exact slopes at each optimal allocation are indeed 4 for all users. For this problem, it turns out that the optimal continuous solution for 6 available resources is the same integer solution: *A*<sup>1</sup> = 1, *A*<sup>2</sup> = 1, and *A*<sup>3</sup> = 4. (For those not yet acquainted with calculus, it will be introduced and used to solve this allocation problem in Chap. 10.)

#### **4.5 Shadow Price**

Before leaving this example allocation problem, it is of interest, especially to economists dealing with the allocation of scarce resources, to see what additional benefits (or some other measure of performance serving as the objective) can be obtained from an increase in the amount of the scarce resources (denoted as *R* in the previous example). These additional benefits can be compared to the cost of getting more resources to see if that will yield more net benefits. This additional value of the objective function that is either being maximized (e.g., total benefits) or minimized (e.g., total costs or losses) is often called the *shadow price* or the *dual variable* associated with the resource constraint; in this case, <sup>i</sup> *A*<sup>i</sup> ≤ *R*. In this example, its value is the slope of each of the benefit functions at their optimal allocations. For this example allocation problem, that slope is 4. What this means is that if *R* were increased by 0.1 to 6.1 instead of being 6, the additional benefits obtained would be about 0.4. Since in this non-linear problem the slopes of the benefit functions decrease as *R* increases, this shadow price or dual variable value is valid only for small changes in *R*. Obviously when *R* ≥ 13.33, the shadow price will equal 0. Having more resources will not yield greater benefits. In this case, the constraint on *R* ( <sup>i</sup> *A*<sup>i</sup> ≤ *R*) is not binding, meaning that it does not impact the optimal solution.

In general, for any optimization problem containing an objective *f* (*X*) and constraints *g*i(*X*) ≤ or ≥ or = *b*i, the shadow price of constraint i is the change in the objective function *f* (*X*) given a unit change in *b*i.

#### **Exercises**

	- (a) State what you think would be a fair way to allocate the limited funds you have. In other words, what would be your criterion for allocating funds that you could defend at a public hearing?

There are three farmer's markets that sell organically and locally grown blueberries. The farmer who grows these blueberries gets 90% of the income from their sales; the markets get the other 10%. The demand for blueberries differs at each market. Some smart economist has determined that the demand (unit price) functions for blueberries at the three markets (m = 1, 2, 3) are 6/(1+Q1), 7/(1+1.5Q2), and 8/(1+0.5Q3), respectively, where the Qm values are the available blueberries at those markets.

How should the farmer distribute a crop ranging from 1 to 6 bushels of blueberries each week to maximize the total amount of income received from all three markets?



**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

**5 Models for Managing Money**

#### **ABSTRACT**

The chapter reviews ways of computing equivalent present, future, or equal annual values that can be used to compare different time series of costs and benefits. It defines both simple and compound interest modeling, and the impacts of within-year compounding, inflation, and income taxes.

#### **5.1 Introduction**

This chapter serves two purposes. One is to introduce some methods used to convert costs and benefits at different time periods to equivalent values at other time periods, and the other is to show how to evaluate options for managing our own financial resources. All this involves modeling.

#### **5.2 The Time Value of Money**

Figure 5.1 illustrates the time value of money. For example, assume you have won a cash prize of \$10,000. You can either receive it now, option A, or receive it in three years, option B. The offer is hypothetical, but play along. Which option would you choose, and why (Fig. 5.2)?

If you're like most people who prefer having more rather than less money, you would choose to receive the \$10,000 now, option A. After all, three years is a long time to wait. Why would any rational person prefer being paid later when he or she could have the same amount of money now? For most of us, preferring to have money now than later is just plain instinctive. And why?

Having \$10,000 now allows you to spend it now. If you do not need it, you can loan it to someone who does need it now, and for that loan, the receiver can

**Fig. 5.1** The value of money can grow over time and the more time the more money. The initial investments shown are assumed to continue each year up to the age of 65 compounding at an annual rate of 5%

**Fig. 5.2** Schematic of the two options for receiving \$10,000. The amounts shown in blue are the equivalent values three years later for option A, or three years earlier for option B

promise to give it back to you later, plus some additional money, called interest. Indeed, that is what banks do with the money you 'loan' them to save for you.

Having money now rather than later is worth paying for by those who need that money now. Those who borrow money, say from a bank, usually have to pay it back later with interest. What they payback is more than what they borrow. This is true even for banks in countries where earning interest by individuals is considered unethical. Otherwise, how could those banks survive?

By receiving \$10,000 today, you can increase the future value of your money by investing it and gaining interest over time. If you invested it in a savings bank for three years, you would have the \$10,000 plus the interest earned that the bank pays you for the use of your money over that time. If you wait until the end of three years to get the \$10,000 cash prize, all you will have is the \$10,000. The interest the bank pays you is based on the amount you give to them to save for you and the time they have used it. The interest rate is usually expressed as a percent of that amount per unit time period, typically a year. The interest rate is commonly denoted by the fraction, or percent, i.

Example: Assume that the interest is paid at the end of each year based on the amount invested in the savings account at the beginning of the year. If the annual interest rate is 4.5%, then at the end of the first year your \$10,000 becomes \$10,000 (1 + 0.045) = \$10,450. The interest earned that year is \$450.

If the \$10,450 in your investment account at the end of the first year remains for another year, at the end of that second year you would have that plus another year of interest: \$10,450(1 + 0.045) = \$10,920.25.

This value at the end of the second year is

 $ $10,000 \times (1 + 0.045) \times (1 + 0.045) = \$ 10,000 \,(1 + 0.045)^2.$ 

Investing this amount for three years would give you

 $ $10,000(1+0.045)^3 = $ 11,411.66.$ 

The annual interest rate of 4.5% is a *compound interest rate*, as interest is reinvested and earns interest along with the initial investment, the principal. If the interest earned is removed from the savings account each year, the 4.5% interest rate is called a *simple interest rate*. The total amount one would accumulate after n years of investing at 4.5% simple interest rate per year would be \$10.000 (1 + n(0.045), i.e., the \$10,000 principal plus n years of \$450 interest payments.

#### **5.3 Computing Present Values of Future Cash Flows**

If you received \$10,000 today, the present value would of course be \$10,000. If \$10,000 were to be received in a year, the equivalent present value of the amount now at the beginning of the year would not be \$10,000 but rather the amount if invested today would total \$10.000 in a year. And that depends on the interest rate you can earn on that investment.

Letting P0 be the present value (at the end of year 0) and Fn be the future value at the end of year n, the basic equation for finding either P0, Fn, or the assumed constant compound interest rate i, is (Fig. 5.3)

$$\mathbf{F\_n = } P\_0(\mathbf{l} + \mathbf{i})^\mathbf{n}.$$

**Fig. 5.3** Cash flow diagram showing present and equivalent future values

Finding a future amount at the end of period n, Fn, given a present amount, P0, and period interest rate i, is called compounding into the future. The opposite is called discounting a future value to the present. The distinction between compounding and discounting is shown in Fig. 5.4.

One can use the above single payment compound amount equation to find that \$8,762.97 invested today at an annual compound interest rate of 4.5% for three years will equal \$10,000 at the end of that third year, assuming again that interest is paid and reinvested at the end of each year. \$8,762.97 is the present value of \$10,000 at the end of three years. \$10,000 is the future value of \$8,762.97 invested today. Both statements assume an annual compound interest rate of 4.5% with interest paid at the end of each year.

What if in option B the cash prize payment in three years is more than \$10,000, the amount you would receive today in option A? Say you could receive either \$10,000 today (option A) or \$13,000 at the end of three years. Which would you choose? The decision is now less obvious. If you choose to receive \$10,000 today and invest the entire amount, you may actually end up with an amount of cash at the end of three years that is less than \$13,000. To decide which option is better you could compute either the future value of \$10,000 three years from now and compare it to the \$13,000, or compute the present value of \$13,000, and compare it to the \$10,000.

For example, if interest rates are currently 4%, using the above equation, the equivalent present value of \$13.000 three years from now is \$11,556.95. Thus, the choice is between \$10,000 and \$11,556.95. Most would choose to postpone prize payment for three years. If you really needed \$10,000 today and could borrow it at an annual interest rate less than 9%, you would be able to pay off the debt in three years and still have some leftover.

#### **5.4 Computing Equivalent Constant End-of-Period Amounts**

Many benefit-cost calculations use annual costs and benefits. For example, if you want to borrow \$200,000 to buy your first house, you typically go to a bank and get a loan. The bank tells you how much money you need to pay the bank, in equal payments, *A*, at the end of each year for a given number of years, to pay back the

loan plus interest. To calculate this constant annual amount, *A*, paid at the end of each year, we find the sum of the present values of each of those annual payments of *A* and equate that sum to the original present value of debt of \$200,000. If n is the number of years of payments

$$P\_0 = 200,000 = A/(1+\mathbf{i}) + A/(1+\mathbf{i})^2 + A/(1+\mathbf{i})^3 + \cdots + A/(1+\mathbf{i})^n.$$

This is equivalent to

$$P\_0 = A \left[ (1+\mathbf{i})^\mathbf{n} - \mathbf{l} \right] / \left[ \mathbf{i} (1+\mathbf{i})^\mathbf{n} \right] \text{or} \\ A = P\_0 \{ \mathbf{i} (1+\mathbf{i})^\mathbf{n} / \left( (1+\mathbf{i})^\mathbf{n} - \mathbf{l} \right) \}.$$

This is how the banks determine what you owe to pay back a loan with equal end-of-period payments over n time periods assuming an interest rate of i per period. The period most banks use is a month, not a year. If i represents an annual interest rate, the monthly rate is i/12 (Fig. 5.5).

When one gives money to an organization's endowment, they usually expect it will provide income to that organization forever. The end-of-year annual equal payment *A* from an endowment of Po that can be paid forever can be calculated using the above equation when n goes to infinity. The result is the same as if simple interest were being used. The equal annual payment *A* = Po(i).

#### **5.5 Within-Year Compounding**

If you are saving money in a bank savings account, the interest you earn each day is the minimum amount you have in your account that day times the daily interest rate. This daily rate is the annual 'nominal' rate (say 5%) divided by 365. This daily rate can be applied in any of the above equations, where instead of the time period being a year, it is a day.

Hence, F1 at the end of a day = P0 (1 + annual nominal interest rate/365).

This is daily compounding. Interest is earned and paid to the account each day.

F365 at end of a year of daily compounding = P0 at the beginning of the year times the factor (1 <sup>+</sup> annual nominal rate/365)365.

The future value after n years of daily compounding at a nominal annual rate of 5% is

$$\mathbf{F\_n = } P\_0(1 + \, 0.05/36 \mathbf{S})^{365 \,\mathrm{n}}.$$

If r is the nominal annual interest rate, but compounding occurs in each of m equal periods within a year, then the corresponding effective annual rate i that assumes compounding occurs only once in a year is

$$(\mathbf{l} + \mathbf{i})^\mathsf{l} = (\mathbf{l} + \mathbf{r}/\mathbf{m})^\mathsf{m} \text{ or } \mathbf{i} = (\mathbf{l} + \mathbf{r}/\mathbf{m})^\mathsf{m} - 1.$$

The annual effective rate i associated with within-year period compounding is clearly greater than the annual nominal rate r. For example, monthly compounding at a nominal annual interest rate of r is equivalent to annual compounding at an effective interest rate of (1 <sup>+</sup> r/12)12 <sup>−</sup> 1.

Daily compounding, which many bank savings accounts offer, is almost equivalent to what is called continuous compounding ~ compounding every nanosecond! If the nominal annual rate of interest is r, the corresponding effective continuous compounding annual rate turns out to be er <sup>−</sup> 1, where e is the base of natural logarithms, e <sup>=</sup> 2.718281828. The factor (1 <sup>+</sup> i) becomes (1 <sup>+</sup> er <sup>−</sup> 1) or (e<sup>r</sup> ). Thus, for continuous compounding over n years, an investment of P0 at the beginning of year 1 (or end of year 0) will yield

$$\mathbf{F}\_{\mathbf{n}} = \ \mathbf{P}\_{\mathbf{0}}(\mathbf{e}^{\mathbf{r}})^{\mathbf{n}}$$

at the end of n years.

#### **5.6 Inflation**

Prices of goods and services usually increase over time. This is called inflation. The actual rate of inflation varies depending on the item. The increase (or decrease) in home prices is not the same as, for example, the increase in university tuition. General consumer price index (CPI) inflation rates mentioned in the media are commonly based on the prices of a set of goods and services that are included in the CPI. The rate of inflation varies over time, of course, just like interest rates. The inflation rate is commonly designated by the letter f. Hence, assuming an annual inflation rate of f, something that costs \$100 today will cost \$100(1 <sup>+</sup> f)n at the end of n years from now. If there is no other reason to invest money, it is to keep up with inflation. Otherwise, even if you have the same amount of money now and n years from now, you will be poorer then in the sense you will not be able to buy as much then as you can now with that amount of money. Obviously, one tries to build wealth at a rate greater than the rate of inflation. Taking into account the effects of inflation, the 'real' uninflated rate of return, r, on any investment earning an interest rate of i is (Fig. 5.6)

$$(\mathbf{l} + \mathbf{r}) = (\mathbf{l} + \mathbf{i})/(\mathbf{l} + \mathbf{f}) \text{ or } \mathbf{r} = (\mathbf{l} + \mathbf{i})/(\mathbf{l} + \mathbf{f}) - \mathbf{l}.$$

The real rate of return, r, is often called the true or real time value of money. (Do not confuse this r with the r denoting the nominal annual interest rate applicable to within-year compounding).

**Fig. 5.6** Impact of 4% inflation on the purchasing power of today's \$1 over the next 25 years

To compute the inflation adjusted annual payments so that each payment has the same purchasing power, the real uninflated interest rate r can be used to compute the constant payment *A*, and then each *A* is inflated at the time of payment. Hence, instead of using

$$A = P\_0 \{ \left( \mathbf{i} (\mathbf{l} + \mathbf{i})^\mathbf{n} / \left( (\mathbf{l} + \mathbf{i})^\mathbf{n} - \mathbf{l} \right) \right),$$

use the real rate of return r in that equation in place of i to compute *A* and then inflate it at the time of payment.

> *A*<sup>n</sup> = the actual payment at end of year n = *A(*1 + f*)* n*.*

#### **5.7 Income Taxes**

In addition to wanting the interest rate you are getting on your investments to be greater than the rate of inflation, you also want it to be greater than the inflation rate after you paid your income taxes on the interest earned. The net interest rate after taxes depends on the tax rate. Letting t be the tax rate, then the net interest rate after taxes is i(1 − t). This expression assumes you pay the taxes when the interest is earned. Even though this is rarely the case, it is a good enough assumption for most economic calculations we will be performing (Fig. 5.7).

Thus, the future value, Fn, after taxes, on an investment of P0 for n years at an annual before tax interest rate i will be

$$\mathbf{F\_n = } P\_0(1 + \mathbf{i}(1 - \mathbf{t}))^\mathbf{n}.$$

**Fig. 5.7** There are only two things that are certain in life: death and taxes. November 13th, 1789, Benjamin Franklin. http://www.clker. com/cliparts/4/9/f/1/151676 0576154679115death-andtaxes-clipart.hi.png, http:// www.clker.com/clipart-744 320.html. Public domain

If the investment is placed in a tax-deferred account, the income tax is paid only when the money is withdrawn, say at the end of n years. In this case, the after-tax amount will be

$$F\_{\mathbf{n}} = P\_0(\mathbf{l} + \mathbf{i})^{\mathbf{n}} - \left[ P\_0(\mathbf{l} + \mathbf{i})^{\mathbf{n}} - P\_0 \right](\mathbf{t}) \operatorname{or} \\ P\_0 \Big[ (\mathbf{l} + \mathbf{i})^{\mathbf{n}}(\mathbf{l} - \mathbf{t}) + \mathbf{t} \Big].$$

Obviously, if you can do this, tax-deferred investments offer more at the end of such investment periods than do accounts where taxes have to be paid each year. But this may depend on the tax rates that can differ over time as well.

In any event, unless the rate of interest one earns exceeds both the inflation and tax rates, the monetary gains recorded in bank statements over time will be losing purchasing power.

#### **5.8 Comparing Alternatives**

It is important to know how to calculate the value of money over time so that you can distinguish between the worth of alternative investments that offer different returns, or costs and benefits, at different times over different time periods. Remember that you cannot move money around over time without using the applicable interest rate unless, of course, it is 0. \$100 today is not the same as \$100 tomorrow. To compare different alternatives having different time streams of costs and benefits, we must move money around over time to compute equivalent present values, P0, future values, Fn, or annual equal end-of-year values, *A*. When doing this comparison of alternatives, one must be considering what to do with the same amount of money invested (costs) over the same amount of time for all alternatives being compared.

For example, consider the following. There are two alternatives, A and B, that involve different initial investments. These initial investments along with the present values of the future net benefits are given in the table below. Both the net present values and the present benefit/cost ratios are also shown. You will see that based on an objective of maximizing net benefits alternative A is best. But based on the objective of maximizing the benefit/cost ratio alternative B is best (Table 5.1).


Both the net benefit and the benefit/cost criteria should indicate the same best alternative. What is missing in this analysis?

In this example, the issue is how best to invest the \$40 that is apparently available since alternative A is being considered. So the issue is what to do with the \$40. The amount left over after investing 10 in alternative B is 30 and this plus 15 is the present value of the benefits. Thus, the benefit/cost ratio for alternative B is really 45/40 = 9/8. This is less than the benefit/cost ratio of 5/4 for alternative A, and hence based on both the net benefit and benefit/cost criteria, alternative A is best.

#### **5.9 Investing for Retirement**

Assume you can invest \$5500/year of earned income into a tax-free account. In the US, it might be a Roth Individual Retirement Account (IRA). Also, assume that you can start investing at age 25 and you plan to retire 40 years later at age 65. Finally, assume that you can earn an average annual rate of interest of 8% over the 40-year period. Investing \$5500 at the beginning of a year will result in 5500(1 + 0.08) = \$5940 at the end of the year. Interest earned is \$5500(0.08) = \$440.00 and is tax free when it is withdrawn after you retire. At the beginning of the second year, you invest another \$5500 in the account. At the end of two years of investing, you have

$$(\$\\$\\$940 + \\$\\$\\$00)(1 + 0.08) = \\$12,3\\$\\$.20.$$

At the end of three years of investing \$5500 at the beginning of each year

$$(\\$12355.20 + \\$500)(1 + 0.08) = \\$19,283.62.$$

Notice the model one can use to compute how much you will have, Fn, at the end of n years of investing P at the beginning of each year, at 8% per year, is

$$\begin{aligned} \mathbf{F}\_1 &= \mathbf{P}(1 + 0.08), \\ \mathbf{F}\_2 &= (\mathbf{F}\_1 + \mathbf{P})(1 + 0.08), \\ \mathbf{F}\_3 &= (\mathbf{F}\_2 + \mathbf{P})(1 + 0.08) \dots \end{aligned}$$

and so on for each year y until y = n. This model can be written as

$$\mathbf{F\_{y}} = (\mathbf{F\_{y-1}} + \mathbf{P})(1 + 0.08) \text{ for } \mathbf{y} = 1, 2, 3, \dots, \mathbf{n} \text{ and } \mathbf{F\_{0}} = \mathbf{0}.$$

In this example, all the beginning-of-year investments, P, are \$5500. There are more elegant ways of computing any Fn, but the above sequence of equations, solved sequentially for each time period y, works. At the end of 10 years of investing \$5500 at 8% per year, you will have \$86,050.18. After 30 years of investing, you will have \$672,902.30.

Consider two options:


You invest more (\$165,000 − \$55,000) and get less (\$865,893.40 − \$672,902.30) using option 'b' than if you use option 'a'. Of course, investing over the entire 40 years of your working life will give you a total of \$865,893.40 + \$672,902.30 = \$1, 538,796.

That amount of money may seem like a lot, but will it be enough when you retire? At the end of 40 years, the price of what you might want to buy will be more than what it is now. For an annual inflation rate (fraction) of f, what you could buy for a dollar at age 25 after 40 years will cost (1 <sup>+</sup> f)40 dollars. You can see that if the inflation rate f is say 3% per year, you will need \$17,941.21 40 years from now to buy what \$5500 could buy today. The message: Needing money for retirement is real. So is inflation. Hence, how to invest now to be ready to retire sometime in the future with the desired lifestyle is worth some thought and planning, and as the previous example shows, the sooner the better (Fig. 5.8)!

**Fig. 5.8** Retirement. How much will you need to implement it?

#### **Exercises**



What additional information is needed before one can determine which project is the most economical project?

8. Bonds are often sold to raise money for infrastructure project investments. Each bond is a promise to pay a specified amount of interest, usually semiannually, and to pay the face value of the bond at some specified future date. The selling price of a bond may differ from its face value. Since the interest payments are specified in advance, the current market interest rates dictate the purchase price of the bond.

Consider a bond having a face value of \$10,000, paying \$500 annually for 10 years. The bond or 'coupon' interest rate based on its face value is 500/10,000, or 5%. If the bond is purchased for \$10,000, the actual interest rate paid to the owner will equal the bond or 'coupon' rate. But suppose that one can invest money in similar quality (equal risk) bonds or notes and receive 10% interest. As long as this is possible, the \$10,000, 5% bond will not sell in a competitive market. In order to sell it, its purchase price has to be such that the actual interest rate paid to the owner will be 10%. In this case, what is the bond currently worth?

The interest paid by some bonds, especially municipal bonds, may be exempt from state and federal income taxes. If an investor is in the 30% income tax bracket, for example, a 5% municipal tax-exempt bond is equivalent to about a 7% taxable bond. This tax exemption helps reduce local taxes needed to pay the interest on municipal bonds, as well as provides attractive investment opportunities to individuals in high tax brackets.

9. Assume a particular university's tuition and fees are \$C today.

Assume the after-tax interest rate you can earn in the next 24 years is 5%.

Assume the inflation rate of tuition and fees in the next 24 years will be 4%. Show how to determine how much would be enough to invest today to pay

	- (a) If you decide to wait a year and invest the \$10,000 during the year, earning an annual interest rate i, describe how would you determine the extra money you would have at the end of the year after paying the inflated cost of lessons at that time?
	- (b) Assume you forgot to consider the fact that you will owe income taxes on the interest earned. Your income tax rate is t. How would your analysis change so as to include the tax payment?

(As the debt decreases so do the interest payments in each successive A. The interest paid, Iy, at the end of a year y is based on the debt, Py-1, at the beginning of that year.)

The bank tells you the annual interest rate is 5%.

Show how to compute the principal and interest contained in each of the three end-of-year payments 'A' using the following steps:


(e) Given A, P1, and I1, solve for the remaining debt at beginning of 3rd year: You can deduct 30% of the annual interest payment from your income tax each year. Given all the interest payments Iy and A, show the equation you could use to compute the actual interest rate you are paying on your debt.

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

© The Author(s) 2022 D. P. Loucks, *Public Systems Modeling*, International Series in Operations Research

& Management Science 318, https://doi.org/10.1007/978-3-030-93986-1\_6

# **6 Solving Models Using Excel**

#### **ABSTRACT**

This chapter offers examples illustrating how the 'Solver' feature of Excel can be used to solve simultaneous equations and unconstrained and constrained optimization models. This and other features of Excel can be used to solve any of the optimization or simulation models or equations introduced in this book.

#### **6.1 Introduction**

Recall the model developed in Chap. 3 for finding the dimensions of a tank that minimized its cost, or the model introduced in Chap. 4 for estimating the most beneficial way of allocating scarce resources to multiple users. In each case, there were multiple possible solutions, and the best solution was not obvious. These situations motivate the development of optimization models but the models themselves are of little value unless they can be solved. This book introduces ways of developing and solving optimization models. Each method has its advantages and limitations, as was evident for the hill climbing approach presented in Chap. 4. This chapter shows how optimization models can be solved using 'Solver' contained in the Microsoft spreadsheet program Excel.

Software programs such as Excel change over time. Hence, what is described in this chapter is only an outline of what is needed to be able to use Solver and take advantage of other capabilities of Excel when solving optimization models. It reflects the version of Excel available when this book was written. This chapter is not a substitute for the documents available from Microsoft and others that explain Excel's features in more detail.

#### **6.2 Using Solver in Excel**

To use Excel to solve optimization problems, we need to use 'solver'. If it is not already available under the Data menu item, it must be installed. To do this, find and click on 'Options' under 'File'. Then find and click on 'Add ins'. Then find and click on 'Solver Add in'. Once this 'Solver Add in' line is highlighted, click on 'Go' at the bottom of the page. The following dialog box will appear. As shown below, click on the box next to 'Solver Add-in' and then 'OK'. Then you can go to the 'Data' page of Excel, and you should see 'Solver' at the far right of the top row of menu items (Fig. 6.1).

The following examples are used to illustrate how the optimization component in Excel works.

1. Benefit–cost analysis:

Assume a decision variable *x* can range between 0 and 12. Any value of *x* will yield benefits and incur a cost. The benefit function for this decision variable is <sup>80</sup>*x*0.55. Its cost function is 7 <sup>+</sup> <sup>4</sup>*x*1.5. Given these functions as shown in Fig. 6.2, the optimization problem is to determine the value of *x* that maximizes the benefits less the costs, i.e., the net benefits.

Before entering this optimization model into Excel, we can also include equations that define the slopes of the benefit and cost functions associated with any value of *x*. As one can see from Fig. 6.2, when the net benefits are at their maximum value, the slopes of the benefit and cost functions are equal. We can use Excel to not only find the best value of x, but also verify that at that value, the marginal benefits equal the marginal costs, i.e., the slopes are the same.

Using calculus, which will be described later in Chap. 10, we can find the equations that define the marginal values or slopes of these benefit and cost functions

**Fig. 6.2** Benefit and cost functions together with the net benefit function

at any value of x.

$$\text{marginal benefit} = (0.55)(80)x^{(0.55-l)}$$

$$\text{marginal cost} = (1.5)(4)x^{(1.5-l)}.$$

Next, we can set up the model in Excel: Fig. 6.3 illustrates one way to do this.

Once the model is entered into the Excel spreadsheet, we can find the optimum (maximum net benefit) solution by clicking on the Solver menu item, which again is among the menus found under the Data menu. The dialog box shown in Fig. 6.4 will appear.

In this example, the cell containing the objective function is F5. It is to be maximized. The value of the decision variable *x* is in cell E6. There are no constraints. The non-linear solver is to be used to find the best solution since the model is non-linear. Solver assumes that all unknown variables are non-negative unless otherwise specified in the constraint section.

Clicking on Solve (having the blue border in Fig. 6.4) results in the solution shown in Fig. 6.5.


**Fig. 6.3** Model for finding Net Benefits entered into an Excel spreadsheet


**Fig. 6.4** Dialog box for identifying the type of optimization, the function to be maximized or minimized or for just finding any solution, the unknown decision variables in the model, the method used for optimization, and the constraints, if any


**Fig. 6.5** Solution of Benefit–Cost model in which the net benefits, cell F5, is a maximum

Note that the net benefits are a maximum when *x* is 8.144. At this *x* value, the slopes of the benefit and cost functions are the same, namely 17.123. Knowing that this condition will always apply, unless constrained otherwise, the value of *x* could have been obtained by simply equating the marginal values and solving for *x*. This would require adding the constraint that equates the two marginal values, as illustrated in Fig. 6.6.

Clicking on Solve in the dialog box shown in Fig. 6.6 will result in the same output as shown in Fig. 6.5.

2. Designing a cylindrical tank.

This second example involves determining the least-cost dimensions of a cylindrical tank. The design variables are the radius and the height. The known parameters are the unit (per unit area) costs of the side area, the top area, the bottom area, the required volume, and the constant pi (π).

This optimization problem has a constraint requiring the volume to be at least equal to 100 units.


**Fig. 6.6** Solving the benefit–cost model by simply equating the marginal benefits and costs. This requires the constraint shown in the constraint section of this dialog box

**Fig. 6.7** Setting up and solving for the least-cost values of the radius and height of a circular tank

Figure 6.7 shows the Excel model and the steps needed to define the objective, the decision variables, and the constraint. It also shows how to get the sensitivity information related to the constraint, called the Lagrange Multiplier. Its value indicates the additional cost if the volume were increased by one unit (i.e., the slope of the total cost function at the optimal value of the radius and height). It is also called the shadow price or dual variable as discussed in Chap. 4.

The first step is to define the model variables, and parameters, and functions in any way that makes it clear where their values will be shown. This is shown in the upper-left portion of Fig. 6.7, except in this case, where the values shown are the ones obtained after the solution is known. When setting up the model, most of the values of the decision variables and functions will be 0.

Once the model is complete, select Solver and fill in the dialog box as shown in the upper right of Fig. 6.7. To add a constraint, select the 'Add' button in the constraint section of the dialog box and another dialog box will appear as shown just under the model. After entering the constraint, clicking on OK will make that constraint appear in the larger dialog box as shown above. Clicking on 'Solve', if there are no errors, will result in the dialog box shown at the bottom right of the figure. Selecting 'Sensitivity' (as shown in blue) will generate the report shown at the bottom left of the figure. That report will be on a separate page of the Excel file. This option will be demonstrated in the next example problem.

3. Resource allocation.

This example problem is to find the allocations *X, Y*, and *Z* to three users that maximize the total benefits obtained, given only 6 units of resource available. The benefit functions for each use are:

$$B1 = 6 \ast X - X^2; \\ B2 = 7 \ast Y - 1.5 \ast Y^2; \\ B3 = 8 \ast Z - 0.5 \ast Z^2.$$

The objective is to maximize *B1* + *B2* + *B3*

$$\text{Subject to:}\\X + Y + Z \le 6.$$

This is the same problem that was used to illustrate the hill climbing approach in Chap. 4 for solving models that contain continuous concave objective functions for maximization, or convex functions for minimization. Here we use Excel to solve the same model. In this case, we can assume each allocation is a continuous variable, rather than a discrete variable as was assumed for hill climbing (Figs. 6.8 and 6.9).


**Fig. 6.8** The resource allocation problem is set up for solution using Solver in Excel


**Fig. 6.9** Solution of the resource allocation problem, and dialog box used to access the solution shown on left and sensitivity reports shown in Fig. 6.10

**Fig. 6.10** Sensitivity report associated with the resource allocation model



#### **6.3 Conclusion**

This chapter and its examples serve just as an introduction to using the Solver within Excel to find solutions to simultaneous equations or to constrained or unconstrained optimization problems. There is much more to learn besides what has been demonstrated here, and some of these additional features will be covered as we work through various policy problems introduced in the following chapters.

Relying on a computer to solve problems does not eliminate the need to think. Steve Jobs suggests programming a computer, and we assume that may also apply to using Excel, helps us think.

<sup>&</sup>quot;Everybody in this country should learn to program a computer… because it teaches you how to think".

Steve Jobs, co-founder and CEO of Apple, Inc. (1995–2011)

#### **Exercises**

1. Regression involves finding functions that best fit some observed data. One criterion is to minimize the sum of squared deviations from observed and predicted values. Suppose you have a set of observed (known) x, y values, say x(i) and corresponding y(i).

> y*(*i*)*: 4 10 18 11 22 7 10 14 19 3 x*(*i*)*: 2 4 8 6 10 3 5 7 9 1

Define and solve an optimization model to determine the parameters of a non-linear function y <sup>=</sup> <sup>a</sup> <sup>+</sup> bxc that best fit the above data.

2. Find the four linear functions that best fit the following four sets of data. Then plot the data. What does this tell you about fitting functions to data?


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **7 Discrete Optimization Modeling**

#### **ABSTRACT**

Using examples, the chapter introduces discrete dynamic programming that converts an overall optimization problem into many simpler sub-optimization problems. The chapter discusses the advantages and limitations of this optimization method.

#### **7.1 Discrete Dynamic Programming**

When most read the word 'programming' they typically think of computer programming, creating a set of instructions that tell a computer how to perform a task. The term 'mathematical programming' refers to algorithms (methods) used by computers or manually to solve constrained optimization problems. The term refers to ways of solving constrained optimization models. In Chap. 4, the hill climbing method was introduced as an approach for solving discrete optimization problems. Hill climbing is one of many mathematical programming methods. Recall that this method only works if the functions to be maximized are continuous and concave, or convex if they are to be minimized. But what if those conditions are not satisfied? A mathematical programming method that is available for solving discrete optimization problems where the objective functions can be discontinuous, and of any shape, is called discrete dynamic programming.

Dynamic programming is an approach that transforms discrete multi-variable multi-stage optimization problems into networks of nodes and links and then solves for the best paths through such networks. Stages could be time periods or locations or activities. The nodes represent discrete states of the system that can exist at each stage either before or after a decision has been made. The links connecting those nodes in successive stages represent discrete decisions that are feasible, given the state of the system.

For example, recall the resource allocation problem introduced in previous chapters. The problem involved finding the allocations of resources to multiple users that maximized the total benefits derived from those allocations. Think of each user as being at a different location and an allocation decision process that proceeds in steps from one user to the next. The first step begins with deciding how many resources to allocate to the first user. Then, with the resources remaining, the second step involves making an allocation to the second user. Finally, with what resources remain, the third step is to make an allocation to the third user. Each step is called a stage of the dynamic programming process. The remaining available resources are a state of the system, represented by nodes. The links represent allocation decisions. A network representation of this process defines all possible discrete alternative allocations at each stage to each remaining user. The discrete dynamic programming procedure is a way of identifying the best path through this discrete network.

Converting an optimization problem into a discrete network of nodes and links representing different discrete states and decisions at each stage is the main challenge in using dynamic programming. Solving for the sequence of best decisions once a network is constructed is relatively easy, as will be shown for the following several example optimization problems.

#### **7.1.1 Traveling Problem**

Figure 7.1 could represent a map showing possible routes from the first state, node 1, to the end state, node 10. The problem is to find the best route from node 1 to 10. In this case, the states are just locations. The links are possible routes between two locations in each time step, or stage. The numbers on the links could represent travel time, or costs, or some relative measure of benefits. Suppose these link numbers represent costs and we wish to minimize the total cost of going from location 1 to location 10. Using a dynamic programming procedure, we can do

**Fig. 7.1** A dynamic programming network showing nodes as locations, links as routes between two successive locations, and stages as the succession of decisions made over time or space

**Fig. 7.2** Results of dynamic programming for finding the best decision at each node at the beginning of the last stage, 4. The F(j) values are the total minimum costs of going from node j to node 10

this without having to consider all possible combinations of routes from node 1 to node 10.

Referring to Fig. 7.1, we cannot immediately see how best to travel from node 1 to node 10. However, if we could determine the best (cheapest cost to node 10) link to take from each node in the network, then it would be easy to determine how to go from node 1 to node 10 the cheapest way. Dynamic programming provides an efficient way of doing that without the need to look at all possible alternative routes. To start the dynamic programming procedure, we can start where the decision is obvious, say at nodes 8 and 9, and then work backward, from right to left, toward node 1. At each node, we want to determine and record the cheapest way to go from that node to node 10. Call F(j) the cheapest cost to go from node j to 10. We also want to keep track of the best decision, or link, at each node j.

We begin at the last stage by determining how best to travel from node 8 to node 10, and from node 9 to node 10. There is only one choice at each of those nodes. The results of those decisions are shown in Fig. 7.2.

Moving backward to the previous stage, stage 3, we can find the minimum total cost to go to node 10 from nodes 5, 6, and 7. F(5) = min{5 + F(8), 3 + F(9)} = min{5 + 6, 3 + 7} = 10. F(6) = min{7 + F(8), 8 + F(9)} = 13. F(7) = min{2 + F(8), 4 + F(9)} = 8. We can mark the decisions that are best in each case with an→as is shown in Fig. 7.3. Keep in mind that the F(j) values are the minimum costs to proceed from node j to node 10.

Note that we cannot compute the values of the minimum costs at each node at the beginning of stage 3 without first computing those values for each node at the end of stage 3 or equivalently at the beginning of stage 4. The same applies to each remaining stage, namely stages 2 and 1. In general, for each node or state (location) j at the beginning of a stage that is linked to node k at the end of the stage:

F*(*j*)* = minimum over all nodes k {cost of link from j to k + F*(*k*)*} for each node j in each stage*.*

**Fig. 7.3** Results of dynamic programming for finding the best decision at all nodes at the beginning of the third stage

In this case, at stage 3, the beginning nodes j are 5, 6, and 7, and the ending nodes k are 8 and 9.

Moving to stage 2, we can compute the minimum cost to go from nodes 2, 3, and 4 to 10, in a similar manner, again denoting the best decision by→. Note that these total remaining minimum cost values, F(j), computed for each node j at the beginning of each stage can be determined without the need to look beyond the stage we are in because we know the minimum costs of proceeding beyond that stage. At each ending node k.

> F*(*j*)* = the minimum among all links from node j to nodes k of {cost of link from j to k + F*(*k*)*}

Once we know the minimum costs of going from nodes 2, 3, and 4, namely F(2), F(3), and F(4), to node 10, we can move backward to the first stage and determine the total minimum cost to travel from node 1 to node 10, and the best decision to make at node 1 to achieve that minimum total cost, F(1). For this example, the minimum total cost is 15.

Now we can determine the optimal (minimum cost) path just by following the arrows beginning at node 1. This path is 1, 4, 5, 9, and 10 for a total cost of 3 + 2 + 3 + 7 = 15.

What has just been demonstrated is how discrete dynamic programming breaks down multiple variable optimization problems into many single variable optimization problems. Instead of finding the minimum total cost of traveling from node 1 to node 10, one could use the exact same procedure for a maximization problem where the maximum value at each node is recorded instead of the minimum value. Because the problem is discrete, there is no restriction on the shape of any cost or benefit or other objective functions. There could be restrictions or constraints limiting the possible decisions or links at any node, and hence only the feasible decisions should be included in any dynamic programming network. In other words, for this example, going from a beginning node j to an ending node k in any stage has to be feasible.

**Fig. 7.4** Results of dynamic programming for finding the best decision at all nodes at the beginning of stage 2

**Fig. 7.5** Final stage of dynamic programming approach for finding best decision at node 1 to go to node 10 and the route to take

The sequence of steps shown in Figs. 7.2, 7.3, 7.4 and 7.5 is called a backward moving approach for solving a dynamic programming network model. We began where we wanted to end up and worked backward, from right to left over each state in each successive stage to an initial state where we are before solving the model, namely node 1 at the beginning of stage 1. Once we know the best decision to make at each node in the network, we can use that knowledge beginning at node 1 to work our way through the network following the arrows from node to node to finally reach node 10. When solving for the best decisions at each node in any stage, there is no need to consider any of the link costs in other stages.

#### **7.1.2 Resource Allocation**

Consider the previously defined resource allocation problem in which 6 resources are to be allocated to three users, each resulting in net benefits. Let *X* be the allocation to the first user, user #1. The net benefits are 6*<sup>X</sup>* <sup>−</sup> *<sup>X</sup>*<sup>2</sup> for a maximum at *X* = 3. More than that reduces the net benefits. Let *Y* be the allocation to user #2. The net benefits are 7*<sup>Y</sup>* <sup>−</sup> 1.5*Y*<sup>2</sup> for a maximum when *<sup>Y</sup>* <sup>=</sup> 7/3. Allocating *<sup>Z</sup>* to user #3 yields net benefits of 8*<sup>Z</sup>* <sup>−</sup> 0.5*Z*<sup>2</sup> for a maximum when *<sup>Z</sup>* <sup>=</sup> 8. The sum of all the desired allocations is 13.33. If the available resources are less than 13.33, solving the following optimization model will identify the allocations that maximize the total net benefits.

Maximize B1*(X)* + B2*(Y )* + B3*(Z)* Subject to: B1*(X)* <sup>=</sup> <sup>6</sup>*X*−*X*2;B2*(<sup>Y</sup> )* <sup>=</sup> <sup>7</sup>*Y*−1*.*5*<sup>Y</sup>* <sup>2</sup>; B3*(Z)* <sup>=</sup> <sup>8</sup>*Z*<sup>−</sup> <sup>0</sup>*.*5*Z*<sup>2</sup> *X* + *Y* + *Z* ≤ 6*.*

Making discrete (e.g., integer) allocations allows us to draw a network of this allocation problem such as shown in Fig. 7.6.

The nodes of Fig. 7.6 represent the amount of resources available for the remaining allocations, and the links represent the allocation to a particular user. The numbers on the links are the benefits resulting from that decision. The problem is to find the best path from the initial node representing 6 resources available to allocate to the three users to an ending node after making allocations to the three uses. Since the maximum of all allocations the users would like is 13.3, clearly the final state of the system after all allocations are made will be 0. There will not be any unallocated resources in an optimal solution.

Assuming a backward moving approach, designate Fi(*S*) as the maximum net benefits that can be obtained in remaining allocations given *S* resources available at the beginning of stage i. Starting at stage 3, we compute all the F3(*S*) values

before moving to compute all the F2(*S*) values, and finally, we compute F1(*S* = 6).

Fi*(S)* = maximum over all integer allocations ≤ *S* {allocation benefits + Fi+1*(S* − allocation*)*} for all values of *S.*

We also keep track of the best decision at each node (shown by an arrow). This backward moving approach is illustrated in Fig. 7.7.

The maximum total benefits that can be obtained from allocating 6 resources available is F1(6) = 34.5. Arrows in Fig. 7.7 show that allocation to user #1, *X* = 1 leaving 5 resources, so the allocation to user #2, *Y* = 1 leaving 4 resources, and hence the allocation to user #3, *Z* = 4.

Discrete dynamic programming models can often be solved using a forward rather than a backward moving approach. In this case, we begin at the initial node(s) in the network and for each node find f1(*S*) = Maximum net benefits that can be obtained from past allocation decisions given *S* resources available at end of stage i. All values of f1(*S*) are computed before moving to compute all of f2(*S*), and finally compute f3(*S* = 0), keeping track (e.g., using an arrow) of the best decision to get to where you are at the end of a stage. At each node, you are asked

**Fig. 7.7** The backward moving approach to solving the resource allocation problem. The numbers next to each node are the maximum remaining benefits, Fi(*S*), and the arrows signify the best allocation link given the available resources, the numbers in the nodes. The link benefits in stage 3 are the F3(*S*) values shown next to the nodes at the beginning of stage 3

what is the best node to have come from to get to where you are. This approach is illustrated in Fig. 7.8.

To backtrack to find the optimal allocations, note that the best allocation to user #3 is 4. Therefore, the optimal state to be in at the beginning of that last stage is 4. This is the same state to be in at the end of stage 2. The arrow into that state shows that the best state to come from is state 5. And to get to state 5 at the end of stage 1 is to come from state 6. Hence, the best allocation to user #2 is 1, and to user #1 is 1, for the same total benefits of 34.5.

#### **7.1.3 Capacity Expansion**

Public works departments are often faced with determining when and how much infrastructure capacity to add to meet increasing demands over time. Why is this an issue? Why not just add the amount of capacity needed when it is needed? The answer is shown in Fig. 7.9.

The costs of adding additional capacity to meet the increasing demand over time are not defined by nice continuous convex functions. If they were, one could just add the capacity needed when it is needed and not be concerned with the uncertainty of future demands and costs. Typical infrastructure capacity cost functions have a fixed component and exhibit economies of scale, i.e., decreasing average and marginal costs with increasing capacity additions. A fixed cost exists if any capacity is to be added, otherwise, it is 0. The more times the capacity is increased the greater the sum of fixed costs. Fixed cost is a function of existing capacity

**Fig. 7.9** Typical demand and cost functions for infrastructure capacity

among other factors. Hence, it makes economic sense to overbuild—to add more capacity than is needed so as to reduce the number of times capacity is to be added and to achieve lower average costs.

The dilemma of course is that we are not certain of both future demands and costs. We will return to that issue later. First, consider an example where it is assumed future demands are known and must be met. Meeting the demand is the condition most public works departments consider as a constraint. A general capacity expansion model that can be used to identify least-cost expansion schedules that meet future demands can be stated as

Minimize the present value of future expansion costs subject to meeting future demands.

Let *A*(t) be the capacity added to the existing capacity *K*(t) in period t at a cost of Ct(*K*(t), *A*(t)) that is to be paid at the beginning of period t. Let r(t) be the discount rate in period t, D(t) the capacity demanded by the end of period t, and n, the number of time periods being considered. A basic capacity expansion model (assuming no capacity decay over time) can be written as

$$\text{Minimize} \sum\_{t=1}^{n} \mathbf{C\_t}(K(\mathbf{t}), A(\mathbf{t})) \left[ 1/(1+\mathbf{r}(\mathbf{t})) \right]^{t-1}$$

Subject to:

*K(*0*)* = existing capacity at beginning of period 1*. K(*t*)* + *A(*t*)* = *K(*t + 1*)* ≥ D*(*t*)*t = 1*,* 2*, ...,* n

The data needed to solve a discrete example of this model are specified in Table 7.1.

The capacity expansion problem whose data are shown in Table 7.1 can be solved using discrete dynamic programming. It assumes 4 construction periods of 5 years each. It provides estimates of the present value of the costs of additional capacity needed at the end of each 5-year period for the next 20 years.

The discrete options in the first 5-year period are to add either 2, 4, 6, 8 or 10 units of capacity. In period 2, one can add any discrete even amount of capacity up to a total capacity of 10 units. Hence, if the beginning period capacity is 2, at least 4 and at most 8 units can be added. And so on to the last period that must


**Table 7.1** Data showing future demands and costs of a capacity expansion problem

have an initial capacity of at least 8, and if it is 8 two units can be added to reach 10 units total.

The dynamic programming network for this example problem is shown in Fig. 7.10.

Solving this problem, using either a backward or forward-moving approach, will result in two different least-cost solutions, for a total present value of 26. The added capacities in successive construction periods are either 10, 0, 0, 0 or 6, 0, 4, 0. Which is better and why? They both cost 26, so the decision has to be based on other criteria.

**Fig. 7.10** A network representation of the capacity expansion problem is defined in Table 7.1. Links represent possible discrete feasible capacity expansion alternatives given the existing capacity at the beginning of each construction period. The numbers on the links are the present values of the costs of expansion

How should we deal with the uncertainty of future demands and costs? How should we deal with the assumed time horizon of 4 periods, as clearly there is a future after that time in which additional capacity may be needed? In other words, how should we use a model like the one just presented?

Perhaps the answer to these questions will become clearer by asking another question. What should we do after implementing the first period's decision, *A*(1)? Wait five years and then refer to this model's output and implement the second decision, *A*(2)? Obviously not. Conditions may have changed and there are new estimates of future costs, demands, interest rates, and time horizons.

What is of interest when using a model such as this one is what to do now. How does the assumed time horizon and estimates of future demands and costs and interest rates impact this first decision, *A*(1)? If they do not, one can be more confident in the robustness of that first decision, at least with respect to the assumed objective, which in this case is minimizing the present value of the total cost.

#### **7.2 Conclusions**

Dynamic programming like all optimization methods has its advantages as well as limitations. It is well suited to address optimization problems which can be viewed as having to make a sequence of decisions and in which there are only a limited number of state variables and their discrete values, such as existing capacity, or resources available to allocate, in the examples just discussed. It is not dependent on the form of the objective function as are other methods previously discussed. While network representations of the dynamic programming optimization problems were used in this chapter to illustrate the two solution approaches, mathematical recursion equations can be created for finding the best decisions at each state (node) in each successive stage of a problem. These equations can be incorporated into a spreadsheet and would be used for solving larger problems than those presented in this chapter. These equations will be developed for solving more complex problems presented in later chapters (Fig. 7.11).

**Fig. 7.11** The shortest distance problem. User: Dcoetzee, Wikimedia Commons CC0 1.0 Universal Public Domain Dedication

#### **Exercises**

1. Consider the allocation problem of allocating resources to three users. The allocations are X, Y, and Z. User 1 total revenue is 6X <sup>−</sup> X2. User 2 total revenue is 7Y – 1.5Y2. User 3 total revenue is 8Z – 0.5Z2. The goal is to determine the values of X, Y, and Z that maximize {6X – X2 +7Y – 1.5Y2 +8Z – 0.5Z2} given 6 units of resources available.

Show how to solve this allocation problem using discrete dynamic programming with integer allocations. Show how the dynamic programming network would be modified to be able to consider 8 integer resources as well as 6 resources to allocate to the three users having the same net benefit (total return) functions. What would the integer allocations and total returns be given 8 available resources? Show how this can be solved using the forward-moving and backward-moving approaches.

To show that DP was used, show all F(S) values for each node representing a state S, and the best decision (arrow or heavy line) if more than one possible decision.

2. (a) Using dynamic programming (network) solve the following capacity expansion problem for the next 20 years (45-year construction periods) using forward and backward moving approaches.

The following table provides estimates for the costs of additional water treatment plant capacity needed at the end of each 5-year period for the next 20 years. Find the capacity expansion schedule that minimizes the present values of the total future costs. If there is more than one least-cost solution, indicate which one you think is better, and why.


Note: The discrete options in the first 5-year period are to add 2, 4, 6, 8 or 10 units of capacity. In period 2, one can add any discrete even amount of capacity up to a total capacity of 10 units so if the beginning period capacity is 2 at least 4 and at most 8 units can be added. And so on to the last period which must have an initial capacity of at least 8, and if so only two units can be added to reach 10 units total.


#### Available Data:

Streamflow <sup>=</sup> 1000 m3/day at all sites. 1 kg/day/1000 m3/day <sup>=</sup> 1 mg/l; Fraction of waste discharged into the stream at site 1 that reaches site 2: 0.25. Fraction of waste discharged at site 1 that reaches site 3: 0.15.

Fraction of waste at and discharged into the stream at site 2 that reaches site 3: 0.60.

Limits of treatment: removal of 30 % required, but no more than 90%, for both sites. The initial concentration just upstream of site 1 is 32 mg/l.

The marginal cost of treatment at site 1 is 30 over the range of possible treatment fractions.

The marginal cost of treatment at site 2 is 20 over the range of possible treatment fractions.

Find the least-cost solution that meets the quality standards using dynamic programming.

#### 4. Blueberries

There are three farmer's markets that sell organically and locally grown blueberries. The farmer who grows these blueberries gets 90 percent of the income from their sales; the markets get the other 10%. The demand for blueberries differs in each market. Some smart economist has determined that the demand (unit price) functions for blueberries at the three markets (m = 1, 2, 3) are 6/(1 + Q1), 7/(1 + 1.5Q2), and 8/(1 + 0.5Q3), respectively.

At each market m, the unit price varies each week depending on the amount of blueberries available, Qm, to be sold. How should the farmer distribute a crop ranging from 1 to 6 bushels of blueberries each week to maximize the total amount of income received from all three markets?

Solve for the maximum revenue obtainable from a total of 6 bushels using discrete dynamic programming, assuming integer allocations. Use both backward and forward approaches. Show your work on a network, not just the solution.

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **8 Linear Optimization Modeling**

#### **ABSTRACT**

The chapter introduces linear programming, arguably the most used optimization method applicable when all the model terms are linear. Graphical solution approaches to solve two-variable linear models are used to illustrate how linear programming algorithms solve models containing many more variables as are typical of most real-world problems.

#### **8.1 Introduction**

Undoubtedly the most commonly used of all the mathematical programming (constrained optimization) methods is linear programming. Developing and solving linear optimization models is often the first topic addressed in courses in systems analysis. This is not because the world is linear, but because the algorithms (solution methods) used to solve linear models are so efficient and are able to solve problems with many—even thousands—of variables and constraints, as long as they are linear. Thus, many tricks exist for making non-linear functions linear. They are often employed just because of the efficiency and widespread availability of the solution methods for linear models. Linear programming has found many applications in the military, in government agencies, industry and in agriculture, ecology, economics, engineering, public health, and urban planning to mention only a few subject areas.

Hence, it seems reasonable to show how linear problems are solved, at least graphically, and when necessary, how some non-linear components of a model may be made linear to take advantage of linear optimization solution methods.

If a model is linear and has only two variables such as

$$\begin{aligned} \text{maximize } X + Y\\ \text{subject to } : \ 2X + Y \le 4, \\ X \ge 0, \ Y \ge 0 \end{aligned}$$

a method for solving linear programming models can be illustrated graphically. The first step is to find the region of values of *X* and *Y* that satisfy all the constraints. This region is called the feasible region. The combinations of *X* and *Y* values in this region meet all the constraints. They are called feasible solutions. This region of feasible solutions can be shown by a plot of each constraint on a graph whose axes are the two variables. In this case, there are three constraints (Fig. 8.1)

$$2X + Y \le 4, \quad X \ge 0, \quad Y \ge 0.$$

All the *X Y* pairs of values in the shaded region and its boundaries, called the feasible region, satisfy all the constraints. Optimization problems that do not have feasible regions have no feasible solutions, meaning that not all constraints can be satisfied. Unbounded feasible regions result from one or more variables going to infinity as would be the case if there were no constraint 2*X* + *Y* ≤4 or if the constraint had to be greater or equal to 4 or any other number.

To find the best combination of *X* and *Y* values in this feasible region, set the objective function equal to some value, such as *X* + *Y* = 2, and then plot that equation. This is shown as a dashed line in Fig. 8.2. Since that function is to be maximized, our goal is to find the maximum value of its right-hand side while some part of that function is in the feasible region or on its boundary. Changing the right-hand side moves the objective function, the dashed line, up and down but doesn't change its slope. If we change the 2 to a 4, we get the dash-dot line shown in that same figure. This is as high as the line can be raised, i.e., as large a value as the right-hand side of that objective function can be, while some part of that function is in or on the boundary of the feasible region.

This plot shows that the optimal values of *X* and *Y* are 0 and 4, respectively. For all continuous variable linear optimization problems, the optimal solution will be

one of the corner points of the feasible region. Thus, computer programs solving such linear optimization models need only to compute and compare the objective function values at the corner points (intersections of constraints) of the feasible region, rather than searching among the infinity of feasible solutions within the feasible region. Furthermore, once a corner point produces an objective value greater than that of all immediately adjacent corner points, the search for the best solution can end. No more corner points need to be considered. Some of you may be interested in thinking about why this is true.

Even though computer programs (e.g., Solver in Excel) will always produce corner point solutions it is possible that there are multiple optimal solutions, other than corner point ones, when the objective function has the same slope as one of the binding constraints. In this example, if we were maximizing 2*X* + *Y*, any combination of non-negative *X* and *Y* values in which 2*X* + *Y* = 4 would maximize that function.

Before leaving this problem, it should be obvious that if this objective were to be minimized, the optimal solution would result when the objective line in the plot would be lowered until it went through the origin of the plot where *X* = *Y* = 0.

#### **8.2 Dual Variables**

Of interest to many using optimization models involving constraints is the sensitivity of the objective function value to changes in bounds of those constraints. In this model, the upper bound on the constraint 2*X* + *Y* is 4. With 4 as an upper bound on that constraint, the maximum value of the objective function *X* + *Y* is 4. If the upper bound were 5 instead of 4, the maximum value of the objective function would be 5, an increase of 1. Similarly, if 4 were decreased to 3, the objective function value would decrease by 1. This change in the objective function per unit change in the bound on the constraint is called the shadow price or dual variable or Lagrange multiplier associated with that constraint. It signifies the change in the objective function value associated with a unit change in the upper or lower bound of the constraint.

For any linear or non-linear model containing a vector of decision variables *X* and m constraints of the form

> Maximize or Minimize F(*X*) Subject to : gi(*X*) ≤ or ≥ bi for i = 1, 2, ..., m.

each dual variable of each constraint i signifies the change in the optimal value of the objective function, F(*X*), given a unit change in the value of bi. It is the slope of the objective function at the optimal values of the decision variables when the constraint equals bi. For non-linear models, the shadow price of any binding constraint i changes as bi changes. Hence, the shadow price applies for only small changes in bi relative to the value of bi. For linear models, the range of change in bi for which the value of the shadow price applies can be larger and will depend on the particular model.

Computer programs, such as Solver in Excel, used to solve optimization models not only provide the optimal values of the decision variables *X*, assuming they exist, but also the values of the shadow prices, also called dual variables or dual prices or Lagrange multipliers) associated with each constraint i. Again, these values are based on a unit change in the value of each bi. For linear models, the output of Solver also specifies the range of each bi value over which its dual variable value applies (See Chap. 6).

#### **8.3 A Production Model**

Suppose for a community fundraising project, two products are to be produced, Product A and Product B. Each product is offered for sale for \$60 and \$80, respectively. Each product takes one unit of wood and the total amount of wood available is 80. Making each Product B requires 2 h of labor, half of what product A requires to make, and the total amount of labor hours available is 280. Desired are the amounts of Product A, denoted as A and Product B, denoted as B, that maximize the total income (Fig. 8.3).

This optimization problem can be expressed as

```
Maximize income = 60A + 80B
 Subject to :
 Material Constraint : A + B ≤ 80
 Labor Constraint : 4A + 2B ≤ 280
 Non - negativity Constraints : A ≥ 0, B ≥ 0
```
Since this is another two-variable problem, we can solve it graphically (Fig. 8.4).

As one can see from this plot, only two constraints of the four are binding, namely *A* + *B*≤80 and *A*≥0 meaning that instead of inequalities they are equalities. Thus, the dual variable value of the labor constraint is 0. Having more labor doesn't increase income. But having another unit of wood, in this case, would increase income by \$80. As seen from this plot, this rate of change of \$80 per unit of wood would apply from 0 up to a supply of wood of 140. After that labor would be limiting the total obtainable income. If we were forced to produce a unit of *A*, we would have to produce one less *B* and the maximum total income would **Fig. 8.3** Putting things together after determining how much wood and labor are available. (Public domain. Bureau of Labor Statistics (BLS)) www.bls.gov/ooh/pro duction/woodworkers.htm

decrease by 80–60 = 20. This is called the 'reduced cost' of *A*. Reduced costs only apply to variables whose optimal values are 0.

Also, evident from Fig. 8.4 is that if the coefficient of *A*, 60, in the objective function, 60*A* + 80*B*, increased by 20, or if the coefficient of *B* decreased by 20, then any non-negative values of *A* and *B* that summed to 80 would be optimal. Any additional changes until the coefficient of *A* is twice that of *B* would result in an optimal solution where the two constraints intersect. At this point, *A* is 60 and *B* is 20. Beyond that, the optimal solution would be at *A* = 70 and *B* = 0.

**Fig. 8.4** Graphical solution to the production model

#### **8.4 Crop Production**

Each year farmers have to decide what crops to grow, where, and how much. Assume a farmer can grow three types of grains (Fig. 8.5). The farmer wants to determine how much of each type of grain to grow taking into account the labor, land and water resource requirements, the resources available, and the incomes per hectare of each crop. The resource requirements for each crop, the available resources, and the incomes per hectare of each crop are given in Table 8.1.

Letting the decision variables be the number of hectares of each crop, denoted as *Corn*, *Wheat*, and *Oats*, an optimization model for finding the hectares of each crop that maximize total income can be written as

> Maximize total income : 400 *Corn* + 200 *Wheat* + 250 *Oats* Subject to :

> > *Corn* + *Wheat* + *Oats* ≤ 625 land constraint. 3 *Corn* + *Wheat* + 1.5 *Oats* ≤ 1000 water constraint. 0.8 *Corn* + 0.2 *Wheat* + 0.3 *Oats* ≤ 300 labor constraint.

**Fig. 8.5** Harvesting a grain crop from farmland. CC BY-SA 3.0. https://en.wikipe dia.org/wiki/Harvest#/media/ File:Agriculture\_in\_Volgog rad\_Oblast\_002.JPG

**Table 8.1** Data required to determine how much of each grain crop to grow to maximize total income


The non-negativity constraints will obviously be satisfied and hence need not be included in the model.


Using a computer to solve this model, one solution is

This solution shows that both land and water limit how much the farmer can grow. The dual variable values show that If the farmer could add one more unit of water, or land, the income would increase by \$100. In addition, the solution shows no oats being grown, yet forcing a unit of oats to be grown does not reduce the total income, as indicated by Its 'reduced cost' of 0. This suggests that there are multiple optimal solutions, i.e., different values of corn, wheat, and oats that give the same maximum total income.

For example, if a constraint were added forcing the hectares of oats to be 100, the solution becomes


The range of optimal solutions is shown in the sketch below (Fig. 8.6)

#### **8.5 Police Scheduling**

A community has minimum requirements for the number of police (Fig. 8.7) that need to be on duty during each 4-h period. These requirements are shown in Table 8.2. The actual number employed cannot be less than that. Each police person works 8 consecutive hours per day. (For simplicity assume no days off.) There are no part-time police, and union regulations prohibit split shifts. The problem is to


find a daily schedule that employs the fewest number of police officers. Table 8.2 also defines the variables, *xt*, used to represent the number of police who begin their work at hour t.

The objective is to find the minimum total number of police needed to be hired throughout the day.

$$\text{Minimize } \ge 0 + \ge 4 + \ge 8 + \ge 12 + \ge 16 + \ge 20;$$

Subject to the requirements for each 4-h period during the day:


One solution is as shown in Table 8.3.

Once again zero 'reduced costs' for variables ×8 and ×16 whose values are 0 suggests there are many optimal solutions requiring a total police force of 80. Hence, it is possible to alter the times some police can start their shifts to better satisfy other personnel or police department objectives, if any, without requiring more police. For example, if it were desired-to minimize the maximum shift size while also minimizing the total number of police needed, one solution is given in Table 8.4.

This policy tends to reduce the variation in the number of police beginning their work in each time period.


#### **8.6 Project Scheduling**

Large infrastructure projects involving many personnel and machines and materials are commonly divided into a number of tasks. Each task needs to be completed before the entire project is completed. Of interest to project managers is when to begin each task and how to allocate the personnel, machines, and materials among tasks to minimize the total time and cost needed to complete the entire project (Fig. 8.8).

A number of methods exist to estimate task start times. One is to create an optimization model that when solved will identify the task start times that minimize the total project time. Clearly, if each task had to be done one after another, the total project time would simply be the sum of all the task durations. In reality, some tasks can be worked on at the same time, or stated another way, what tasks need to be completed before others can begin depends on each particular task. The constraints of the model need to identify the sequencing of the tasks.

To illustrate, assume a particular project consists of 6 distinct tasks. One task can begin right away (task A), and all the other tasks can't begin before some of the others are completed. These conditions along with the expected duration, **Fig. 8.8** Deciding when to schedule various project tasks to complete an entire project. iStock licence number 2075982143

in weeks, of each task, are given in Table 8.5 below. The plot also shows the necessary sequencing as specified in the table.

To find the minimum number of weeks, *T*, required to complete the project and the corresponding starting times of each task, designated by *A, B, C, D, E,* and *F*, the following linear model can be solved:

> Minimize *T* Subject to : *B* ≥ *A* + 5 *C* ≥ *A* + 5 *D* ≥ *B* + 3 *D* ≥ *C* + 6 *E* ≥ *C* + 6 *F* ≥ *D* + 7 *F* ≥ *E* + 4 *T* ≥ *F* + 2

Its solution is shown in Table 8.6.




The minimum total project time, *T*, is 20. In any project such as this one, usually, only some of the tasks determine the total project time. In this example, this sequence of tasks is A, C, D, and F. Tasks B and E could start somewhat later if they do not alter the start times of the following tasks. This may be advantageous with respect to the management of personnel, material or machines. Of course, it may be advantageous to extend the total project time if cost savings result. However, extending total project completion times could result in penalties.

Assume that a penalty of 2000 per week will apply for each week the project time is over 18. Now the question is can this project time be reduced and if so at what cost, and will that cost be less than the penalty. The objective becomes one of minimizing the total additional project cost of exceeding the target time of 18. Assume the cost of reducing the duration Di of task i by <sup>i</sup> is a known function, Ci(i), of that reduction. The objective of the model now is one of finding the task reductions, i, that minimize the sum of task reduction costs, - <sup>i</sup> <sup>=</sup> A, F(Ci(<sup>i</sup>)), and the penalty cost, 2000 (*T* − 18).

> Minimize 2000 (*T*−18) <sup>+</sup> i=A, F (Ci(i))

Subject to :

*B* ≥ *A* + 5 − -*A C* ≥ *A* + 5 − -*A D* ≥ *B* + 3 − -*B D* ≥ *C* + 6 − -*C E* ≥ *C* + 6 − -*C F* ≥ *D* + 7 − -*D F* ≥ *E* + 4 − -*E T* ≥ *F* + 2 − -F

This model assumes the total project time, T, will be no less than 18. If we were not sure that T would be at least 18, then we could add the constraint defining the positive difference, *P*, of *T* − 18.

$$T - 18 \le P \text{ and } P \ge 0.$$

The objective function would now be to

$$\text{Minimize } 2000 \ P + \sum\_{\mathbf{i} = \mathbf{A}, \,\,\mathbf{F}} (\mathbf{C}\_{\mathbf{i}}(\Delta\_{\mathbf{i}})).$$

This modification makes sure there is no negative penalty if *T* < 18.

#### **8.7 Trash and Pollution**

The management of trash is an issue facing every community. Assume a particular city burns a total of 3000 tons of trash per day in three incinerators. All three have antipollution devices. Their emissions differ, as shown in Table 8.5. At present, all three incinerators are operating at full capacity. The remainder of the city's trash, another 1500 tons per day, is dumped into a sanitary landfill area. This landfill option is very expensive compared to incineration. The city is under court order to reduce the total emissions of sulfur dioxide to 400,000 units per day and particulate emissions to 50,000 per day. These maximum allowable emissions are less than what is being discharged at the present time. The city wants to know the most economical way to meet these standards (Fig. 8.9 and Table 8.7).

**Fig. 8.9** Burning trash at an incineration plant. *Credit* Pixabay/CC0 public domain. https://phys.org/news/2021- 11-life-carbon-capture.html

**Table 8.7** Capacity and emission data pertaining to the incineration of trash


Let the variables *A*, *B*, *C* be the tons of trash burned per day in incinerator A, B, and, C, respectively. The city's objective is to burn as much trash as possible while meeting the emission and capacity constraints.

This is an optimization problem that can be written as

Maximize *A* + *B* + *C* Amount of trash burned per day. Subject to : 250*A* + 150*B* + 220*C* ≤ 400, 000 maximum sulfur dioxide emission 20*A* + 30*B* + 24*C* ≤ 50, 000 maximum particulate emission *A* ≤ 1200 maximum capacity of incinerator A *B* ≤ 800 maximum capacity of incinerator B *C* ≤ 1000 maximum capacity of incinerator C

The solution of this model is given in Table 8.8.

The solution shows that all three incinerators should be used, but only B at capacity. The dual variables of the emission constraints indicate the additional tons of trash that could be burned per unit increase in the emission standards. For example, if 100 more units of SO2 could be released, then 0.25 more tons of trash could be burned. Depending on the cost savings that would result from reducing the amount of trash taken to the landfill, the city might wish to argue for less strict standards. Alternatively, it might offer to further reduce its emissions in the interest of improving the public's health or reducing the adverse impacts of climate change.


#### **8.8 Modeling Fixed Cost Problems**

Minimizing costs is a common objective, among others, in optimization models. Many cost functions include fixed costs, as illustrated in Fig. 8.10. In addition, some decision problems involve finding optimal integer variable values instead of continuous values. For example, allocating fractions of trucks or workers to various construction sites in a community makes no sense. Non-negative integer variables can take on values 0, 1, 2, etc. Variables having only integer values must be specified as such as part of the input to the computer program, such as Solver in Excel, used to solve the model. Binary integer variables that can take on only values of 0 or 1 must also be designated as such in computer programs used to solve any model containing them. Non-negative integer variables constrained to be no greater than 1 can also represent binary (0, 1) variables.

Many cost functions contain fixed costs, such as shown in the sketch below. In this sketch, the variable costs are linear with slopes Ci and the fixed costs are C0i. Each cost function i equals

$$\begin{aligned} \text{Cost}\_{\mathbf{i}} &= \mathbf{C}\_{0\mathbf{i}} + \mathbf{C}\_{\mathbf{i}}X \quad \text{if } X > \mathbf{0}.\\ &= \mathbf{0} \quad \text{otherwise.} \end{aligned}$$

The fixed costs, C0i, only apply if the variable *X* is greater than 0. If *X* = 0, the Costi = 0.

The use of binary variables makes it possible to include such cost functions in linear optimization models. For example, suppose one wants to find the minimum cost associated with a value of the variable *X* in Fig. 8.11. The answer is obvious just from looking at the two cost functions and picking the one having a lower value. If the value of *X* is to the left of the breakeven point where the two cost functions meet and have the same value, clearly Cost2 having the lower fixed cost

is cheaper. Otherwise, if the value of *X* is to the right of the breakeven point, Cost1 having the higher fixed cost is cheaper.

If we entered either cost function into a computer to have it identify the cost associated with any given value of X, it would give us the correct answer unless the value of *X* was 0. In that case, it would give us the fixed cost. Hence, we need some way to let the computer know that if *X* = 0, the total cost is 0. That constraint needs to be included in the model, and ideally, that constraint should be linear.

One approach for doing this is to multiply the known fixed cost by an unknown binary variable. Let *Z* be that binary variable. Considering just one cost function, the objective becomes

$$\text{Minimize Cost} = \text{C}\_0 \mathbf{Z} + \text{CX},$$

for any value of *X* and where *Z* can be either 0 or 1.

When the binary *Z* variable is 1, the fixed cost, C0, is included in the total cost. When the value of *Z* is 0, it is not included in the cost. Hence, if the cost is to be minimized the value of *Z* will be 0 no matter what the value of X is. The challenge is to create a linear constraint that will force that binary variable *Z* to equal 1 when *X* is strictly greater than 0. Otherwise, as just stated, since the cost function is to be minimized, that binary variable will want to be 0.

If we require

$$X \le 999Z$$

then if the value of *X* is greater than 0, the binary variable *Z* must equal 1. This constraint also defines the upper bound on the value of *X*. If there is no upper bound, then any large number that will exceed any value *X* could assume can be used. In this example, it is 999.

This trivial example can be made more interesting by assuming the two cost functions shown in Fig. 8.11 represent the cost of buying and operating two cars that are for sale. For each car j, the fixed cost, C0j, is the annual value of the purchase price, and the variable cost, Cj*X*<sup>j</sup> is the annual operating cost of driving it *X*<sup>j</sup> miles. Car 1 is more expensive to buy but cheaper to operate. Car 2 is less expensive to purchase but more expensive to operate. Whichever car is selected, it will be driven over a three-year period in which the predicted miles the car will be driven each year will differ. The question is which car will result in a lower present value of the total annual cost.

If there were no difference in fixed costs, it is obvious the car with the smaller variable operating cost (slope Cj) would be the less expensive car to buy. But a difference in fixed costs makes a difference. If the predicted miles driven include some that are less than the breakeven point and others in other years that are greater than the breakeven point, which car to buy may not be so obvious.

To model this problem, let My be the predicted non-zero number of miles that are expected to be driven in year y. If there were only one car to consider, then the present value of the total cost over the three years is

$$\text{Cost} = \text{C}\_0 + \text{CM}\_1/(1+\text{i}) + \text{CM}\_2/(1+\text{i})^2 + \text{CM}\_3/(1+\text{i})^3 - \text{R}/(1+\text{i})^3$$

where i is the annual interest rate and R is the resale value at the end of 3 years. One could plug in the values of C0, C, and R for each car and compare the results to determine which car would be less expensive. It would also make sense to vary the assumed values of these parameters, along with the My estimates, to see how sensitive the decision of which car to buy is to those assumed, but uncertain, values.

Alternatively, one could include both cars in the same model and have its solution indicate which car to buy. This requires allowing the use of both cars. Let the variable *X*jy be the miles driven using car type j in year y. Their sum in each year y must be at least My. Let *Z*<sup>j</sup> be a binary variable associated with car type j. Now the objective of minimizing the present value of the total costs can be written as

$$\text{Minimize Cost} = \sum\_{\mathbf{j}} \left[ \mathbf{C}\_{\mathbf{0}\mathbf{j}} Z\_{\mathbf{j}} + \sum\_{\mathbf{y}} \left\{ \mathbf{C}\_{\mathbf{j}} X\_{\mathbf{j}\mathbf{y}} / (1+\mathbf{i})^{\mathbf{y}} \right\} - \mathbf{R}\_{\mathbf{j}} / (1+\mathbf{i})^{3} Z\_{\mathbf{j}} \right]$$

Subject to:

$$\begin{cases} \sum\_{\mathbf{y}} X\_{\mathbf{j}\mathbf{y}} \le \left( \sum\_{\mathbf{y}} \mathbf{M}\_{\mathbf{j}} \text{ or more} \right) Z\_{\mathbf{j}} \text{ } \forall \mathbf{j} \text{ forcing } Z\_{\mathbf{j}} \text{ to be 1 if car type j is driven,} \\ \text{i.e., any } X\_{\mathbf{j}\mathbf{y}} > 0. \end{cases}$$


The solution of this linear model, once the values of the fixed and unit variable costs, the interest rate, the miles to be driven in each year, and the annual resale value, are specified, will show that only one of the binary variable values, *Z*j, is 1. The less expensive car j is the one whose *Z*<sup>j</sup> = 1. The constraint *Z*<sup>1</sup> + *Z*<sup>2</sup> ≤1 insuring only one, if any, the car is to be used, can be added to the model's constraints but it is not necessary. Selecting both cars, while feasible, would clearly increase the total cost. Just how sensitive the choice of car is to the mileage requirements

will be indicated by the applicable ranges of the dual variable values of the second set of constraints.

There are many more ways of using integer and binary variables in models. Chapter 9 contains more information on how various non-linear terms and functions can be approximated by linear ones using these integer and binary variables. Again, the motivation for doing this is evident when trying to solve large nonlinear optimization problems. At the same time, one should minimize the use of integer variables to the extent possible, for they too can challenge some computer programs designed to solve mixed-integer models containing both continuous and integer variables. Rounding continuous variable values to their nearest integer values does not always guarantee optimal or even feasible solutions (Fig. 8.12).

#### **Exercises**

1. Bake Sale

For a community fundraising event cakes and pies are to be sold. Find how many cakes and pies should be baked to maximize total income.

Let A and B be the number of cakes and B the number of pies produced. The following data apply:


There are 80 pans and 280 person hours available, and because of limited cake ingredients, no more than 50 cakes (A) can be produced.

#### 2. Diet model

You manage the local SPCA (Society for the Prevention of Cruelty to Animals) that keeps stray dogs. Your dogs need to eat and there are two varieties of dog food available: foods D and C. Their unit costs are \$1.10 and \$0.90, respectively. Your job is to find the least cost combination of pounds of D and C for each dog that meets various nutrition constraints shown in the table below. The amounts of the ingredients shown are in each pound of D and C.



A social welfare program involves three projects. Projects A, B, and C require 18, 12, and 30 person months to complete. Four qualified social workers are available to work on these projects.

Their monthly salaries are \$3000, \$3500, \$3200, and \$3900, respectively.

All projects must be completed in 18 months, and each social worker can be assigned only to one project in each 6-month period. Multiple workers can be assigned to the same project.

Find the allocation of each worker to each job that minimizes the total cost of completing the projects.

4. A transportation problem

Assume there are 4 warehouses containing *Personal protective equipment*, commonly referred to as '*PPE,*' supplies being used at 6 hospitals. Given the supplies available at each warehouse and the demand at each hospital, and the unit costs of transporting them (all known values), construct a model to determine how much gets transported from each warehouse to each hospital that minimizes the total transportation costs.

To do this, you need to make up your notation for all variables and parameters. Plug in values of the parameters of the model and solve it to find how much is shipped from each warehouse to each hospital.

What condition must be satisfied for your model to be feasible?

5. Forest management

A particular State Forest has four different subareas whose characteristics such as species composition, age distribution, drainage, soil characteristics, etc., are similar. The areas of these subareas are known. Recent growth studies have produced predictions of the volumes per hectare for each subarea for the next 50 years. The forest manager is responsible for defining a cutting schedule that will produce a steady supply of logs to be cut into lumber over the 50-year life span of the forest. Her goal is to find the maximum constant amount of wood (volume) that can be converted to lumber every year.

Develop a model for determining just how much volume can be cut in each subarea in each of 5 10-year periods. Once any area is cut trees in that area cannot be cut over again for another 50 years. Cutting trees from the forest in this sustainable way increases water yields, the quality of wildlife habitat, and timber income.

Define the variables, parameters, and constraints you need, and use them to build and solve a model for identifying the best cutting schedule—i.e., how much to cut, where, and when.

6. Water Quality Management Model

Find the wastewater treatment efficiencies at sites 1 and 2 that meet stream quality standards at sites 2 and 3 at a minimum total cost. Currently, there is no treatment. All the wastewaters at sites 1 and 2 are discharged into the stream.

Available Data:

Streamflow <sup>=</sup> 1000 m3/day at all sites. 1 kg/day/1000 m3/day <sup>=</sup> 1 mg/l; Fraction of waste discharged into the stream at site 1 that reaches site 2: 0.25 Fraction of waste discharged at site 1 that reaches site 3: 0.15

Fraction of waste at and discharged into the stream at site 2 that reaches site 3: 0.60

Limits of treatment: removal of 30 % required, but no more than 90%, for both sites. The initial concentration just upstream of site 1 is 32 mg/l.

Can you find the least cost solution that meets the quality standards without knowing the cost functions for treatment?

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **9 Some Linearization Methods**

#### **ABSTRACT**

Because linear programming algorithms are so efficient and in widespread use, together with the limitations of non-linear optimization solvers applied to large models, modelers faced wanting to solve very large models often attempt to linearize the non-linear terms in their models. This chapter introduces various approaches for accomplishing this, often using binary (0, 1) variables.

This chapter reviews some methods and approaches for incorporating non-linear and other conditions into linear programming models. The motivation, of course, is to take advantage of the power of linear programming algorithms in solving linear as opposed to non-linear models.

#### **9.1 If-Then-Else Conditions**

There exist a number of ways if–then-else conditions, i.e., decision trees, can be included in linear programming models. To illustrate some of them, assume that *X* is an unknown decision variable in a model whose value depends on the value of another unknown decision variable *Y*. Assume a maximum value that *Y* would not exceed. Let this upper bound be *U*Y. Similarly, assume a maximum value that *X* would not exceed, *UX*. These upper bounds and all the linear constraints defining 'if–then-else' conditions must not restrict the values of the original decision variables X and *Y*. Four 'if–then-else' and 'and/or' conditions are presented below using additional binary variables and, in the last three examples, continuous variables. All the X, Y, and Z variables in the constraints below are assumed to be unknown. Greek letters are known parameters whose values are less than the upper bounds on the variables. These linear constraints would be included in models where these if–then-else or and/or conditions apply.

(a) If *Y* ≤ α then *X* ≤ β, else *X* ≥ γ. Define constraints:

> *Y* ≤ α*Z* + *U*Y(1 − *Z*) where *Z* is a 0, 1 integer variable. *Y* ≥ α(1 − *Z*) *X* ≤ β*Z* + *UX* (1 − *Z*) *X* ≥ γ (1 − *Z*)

(b) If *Y* ≤ α then *X* ≤ *Y*, else *X* ≥ *Y*. Define constraints:

> Y = *Y*<sup>1</sup> + α*Z*<sup>1</sup> *Y*<sup>2</sup> ≤ (*U*<sup>Y</sup> − α)*Z*<sup>2</sup> *Z*<sup>1</sup> + *Z*<sup>2</sup> ≤ 1 where each *Z* is a 0, 1 integer variable. *X*<sup>1</sup> ≤ α*Z*<sup>1</sup> *X*<sup>1</sup> ≤ *Y X*<sup>2</sup> ≤ *UX Z*<sup>2</sup>

(c) If *Y* ≤ α or *Y* ≥ β then *X* = γ, else *X* ≥ δ. Define constraints:

> *Y* ≤ α*Z*<sup>1</sup> + β*Z*<sup>2</sup> + *U*Y(1−*Z*1−*Z*2) *Y* ≥ α*Z*<sup>2</sup> + β(1−*Z*1−*Z*2) Z1 + *Z*<sup>2</sup> ≤ 1 where each *Z* is a 0, 1 integer variable. *X*<sup>1</sup> = γ *Z*<sup>1</sup> *X*<sup>2</sup> = γ (1−*Z*1−*Z*2) *X*<sup>3</sup> ≥ δZ2 *X* = *X*<sup>1</sup> + *X*<sup>2</sup> + *X*<sup>3</sup>

(d) If α ≤ *Y* ≤ β but (and) not γ <Y < δ where γ > α and δ < β, then *X* ≤ ε, else *X* ≥ φ.

Define constraints:

*Y* ≤ α*Z*<sup>1</sup> + γ *Z*<sup>2</sup> + δ*Z*<sup>3</sup> + β*Z*<sup>4</sup> + *U*Y(1 − *Z*<sup>1</sup> − *Z*<sup>2</sup> − *Z*<sup>3</sup> − *Z*4) *Y* ≥ α*Z*<sup>2</sup> + γ *Z*<sup>3</sup> + δ*Z*<sup>4</sup> + β(1−*Z*1−*Z*2−*Z*3−*Z*4) *Z*<sup>1</sup> + *Z*<sup>2</sup> + *Z*<sup>3</sup> + *Z*<sup>4</sup> ≤ 1 where each Z is a 0, 1 integer variable. *X*<sup>1</sup> ≤ ε*Z*<sup>2</sup> *X*<sup>2</sup> ≤ ε*Z*<sup>4</sup> *X*<sup>3</sup> ≥ φ(1 − *Z*<sup>2</sup> − *Z*4) *X*<sup>3</sup> ≤ *UX* (1 − *Z*<sup>2</sup> − *Z*4) *X* = *X*<sup>1</sup> + *X*<sup>2</sup> + *X*<sup>3</sup>

#### **9.2 Fixed Costs in Cost Functions**

The cost function: Cost = *C*<sup>0</sup> + C *X* if *X* > 0, but equals 0 otherwise, includes a fixed cost *C*<sup>0</sup> (Fig. 9.1).

To include such cost functions in a linear optimization model, define Cost = C0 *Z* + C *X* and constrain *X* ≤ *M Z, where M* is the upper bound of *X*, and *Z* is an unknown 0,1 variable.

#### **9.3 Minimizing the Maximum or Maximizing the Minimum of a Set of Unknown Variables or Functions**

Let the set of variables be {*X*1, *X*2, *X*3, …, *X*n}

Minimize maximum {*X*1, *X*2, *X*3,..., *X*n} is equivalent to : Minimize *U* subject to *U* ≥ *X* j, *j* = 1, 2, 3,..., *n*.

Maximize minimum {*X*1, *X*2, *X*3,..., *X*n} is equivalent to : Maximize *L* subject to *L* ≤ *X* j, *j* = 1, 2, 3,..., *n*.

The same applies to a set of functions fj(**X**) of unknown decision variables contained in the vector **X**.

#### **9.4 Minimizing the Absolute Value of the Difference Between Two Unknown Non-negative Variables**

Minimize |*X–Y*| is equivalent to

Minimize *D*

subject to *X* − *Y* ≤ *D*; *Y* − *X* ≤ *D*; *X* , *Y* , *D* ≥ 0.

or

$$\begin{aligned} \text{Minimize } &(PD + ND) \\ \text{subject to } &X - Y = PD - ND; \; PD, ND, X, Y \ge 0. \end{aligned}$$

#### **9.5 Minimizing Convex Functions or Maximizing Concave Functions**

See Figs. 9.2, 9.3 and 9.4.

Maximize *G*(*X* ) ∼= Maximize *B*

**Fig. 9.2** A piecewise approximation of a concave function with slopes Si

**Fig. 9.3** Piecewise linear approximations of convex (*F*(*X*)) and concave (*G*(*X*)) functions

**Fig. 9.4** Piecewise linear approximations of convex (*F*(*X*)) and concave (*G*(*X*)) functions. Unknown weights are assigned to each segment endpoint

Subject to: I1 + S1*X* ≥ *B* I2 + S2*X* ≥ *B* I3 + S3*X* ≥ *B*

Minimize *F*(*X* ) ∼= *S*1*x*<sup>1</sup> + *S*2*x*<sup>2</sup> + *S*3*x*3; Maximize *G*(*X* ) ∼= *S*1*x*<sup>1</sup> + *S*2*x*<sup>2</sup> + *S*3*x*<sup>3</sup> *X* = *x*<sup>1</sup> + *x*<sup>2</sup> + *x*3; *x*<sup>1</sup> ≤ a; *x*<sup>2</sup> ≤ b − a.

Using unknown weights:

$$\begin{aligned} \text{Minimize } &: F(X) \cong F(0)w\_1 + F(\mathbf{a})w\_2 + F(\mathbf{b})w\_3 + F(\mathbf{c})w\_4\\ \text{Maximize } &: G(X) \cong G(0)w\_1 + G(\mathbf{a})w\_2 + G(\mathbf{b})w\_3 + G(\mathbf{c})w\_4\\ X = 0w\_1 + \mathbf{a}w\_2 + \mathbf{b}w\_3 + \mathbf{c}w\_4; w\_1 + w\_2 + w\_3 + w\_4 = 1 \end{aligned}$$

#### **9.6 Minimizing Concave Functions or Maximizing Convex Functions**

See Fig. 9.5.

$$\begin{aligned} \text{Minimize } G(X) &\cong \mathfrak{k}\mathfrak{x}\_1 + (20\mathfrak{z}\_2 + 3\mathfrak{x}\_2) + (44\mathfrak{z}\mathfrak{z} + 2\mathfrak{x}\_3) \\ \text{Subject to } : \\ \mathfrak{x}\_1 + (4\mathfrak{z}\_2 + \mathfrak{x}\_2) + (12\mathfrak{z}\_3 + \mathfrak{x}\_3) &= X; \mathfrak{z}\_8 = 0 \text{ or } 1 \text{ for } \mathfrak{s} = 1, 2, 3. \\ \mathfrak{x}\_1 \le 4\mathfrak{z}\_1; \mathfrak{x}\_2 \le 8\mathfrak{z}\_2; \mathfrak{x}\_3 &\le 99\mathfrak{z}\_3; \mathfrak{z}\_1 + \mathfrak{z}\_2 + \mathfrak{z}\_3 = 1. \end{aligned}$$

**Fig. 9.5** Concave function *G*(*X*)

#### **9.7 Minimizing or Maximizing Combined Concave-Convex Functions**

See Figs. 9.6, 9.7 and 9.8.

$$\begin{aligned} \text{Maximize } C(X) & \stackrel{\sim}{=} (\mathfrak{S}z\_1 + 6\mathfrak{x}\_1 + 3\mathfrak{x}\_2) + (\mathfrak{S}3z\_3 + \mathfrak{x}\_3) \\ \text{Subject to } : \\ (\mathfrak{x}\_1 + \mathfrak{x}\_2) + (12z\_3 + \mathfrak{x}\_3) &= X; \\ \mathfrak{x}\_1 \le 4z\_1; \mathfrak{x}\_2 \le 8z\_1; \mathfrak{x}\_3 \le 99z\_3; z\_1 + z\_3 = 1; z\_1, z\_3 = 0, 1. \end{aligned}$$

Maximize *C*(*X* ) ∼= (5*z*<sup>1</sup> + 6*x*1) + (29 *z*<sup>2</sup> + 3*x*<sup>2</sup> + 5*x*3) Subject to :

$$x\_1 + (4z\_2 + x\_2 + x\_3) = X;$$

*x*<sup>1</sup> ≤ 4*z*1; *x*<sup>2</sup> ≤ 8*z*2; *x*<sup>3</sup> ≤ 99*z*2;*z*<sup>1</sup> + *z*<sup>2</sup> ≤ 1;*z*1,*z*<sup>2</sup> = 0, 1.

Maximize or Minimize *F*(X)

*F*(*X* ) ∼= (5*z*<sup>1</sup> + 6*x*1) + (35*z*<sup>2</sup> + 3*x*2) + (32*z*<sup>3</sup> − 2*x*3) + 22*z*<sup>4</sup> Subject to :

$$\begin{aligned} \mathbf{x}\_1 + (4\mathbf{z}\_2 + \mathbf{x}\_2) + (12\mathbf{z}\_3 + \mathbf{x}\_3) + (17\mathbf{z}\_4 + \mathbf{x}\_4) &= X; \\ \mathbf{x}\_1 \le 4\mathbf{z}\_1; \mathbf{x}\_2 \le 8\mathbf{z}\_2; \mathbf{x}\_3 \le 5\mathbf{z}\_3; \mathbf{x}\_4 \le 99\mathbf{z}\_4; \sum\_{\mathbf{s}} \mathbf{z}\_\mathbf{s} = 1; \mathbf{z}\mathbf{s} &= 0, 1 \,\forall \mathbf{s}. \end{aligned}$$

$$\begin{aligned} \text{Maximize } C(X) & \cong (\mathfrak{z}z\_1 + 6\mathfrak{x}\_1 + 3\mathfrak{x}\_2) + (-17z\_3 + 5\mathfrak{x}\_3) \\ \text{Subject to } & \\ (\mathfrak{x}\_1 + \mathfrak{x}\_2) + \mathfrak{x}\_3 &= X; \, z\_1, z\_3 = 0, 1. \end{aligned}$$

$$\mathfrak{x}\_1 \le 4 \text{ } \mathfrak{z}\_1; \, \mathfrak{x}\_2 \le 8\mathfrak{z}\_1; \, \mathfrak{x}\_3 \le 99\mathfrak{z}\_3; \, z\_1 + z\_3 = 1.$$

**Fig. 9.8** Mixed concave–convex piecewise linear function

Maximize *C*(*X* ) ∼= (5*z*<sup>1</sup> + 6*x*1) + (17*z*<sup>2</sup> + 3*x*<sup>2</sup> + 5*x*3) Subject to : *x*<sup>1</sup> + (4*z*<sup>2</sup> + *x*<sup>2</sup> + *x*3)=*X* ; *z*1,*z*<sup>2</sup> = 0, 1. *x*<sup>1</sup> ≤ 4 z1; *x*<sup>2</sup> ≤ 12*z*1; *x*<sup>3</sup> ≤ 99*z*2;*z*<sup>1</sup> + *z*<sup>2</sup> ≤ 1.

(© Sidney Harris in American Scientist, Nov-Dec 1977).

https://www.spiedigitallibrary.org/conference-proceedings-of-spie on 24 May 2019 Terms of Use: https://www.spiedigitallibrary.org/terms-of-use.

Creative Commons Attribution 4.0 (CC BY).

#### **Exercises**

1. Groundwater pumping:

This is an exercise in the use of fixed costs and piecewise linear variable costs.

	- 1. Fixed = 0, variable = 10,
	- 2. Fixed = 0, variable = 5,
	- 3. Fixed = 0, variable = 8 to S = 5, then 15.
	- 4. Fixed = 20, variable = 5,
	- 5. Fixed = 14, variable = 4 to S = 6, then 12,
	- 6. Fixed = 20, variable = 5 to S = 7, then 3.

(b) Develop models for finding the minimum cost to meet a demand from two sources of groundwater using pairs of cost functions given above and assuming known maximum flow capacities at each well field. Assume:

Qa <sup>=</sup> flow from source A – unknown m3/day, Qb <sup>=</sup> flow from source B – unknown m3/day, Ca(Qa) = cost function, as above \$, Cb(Qb) = cost function, as above \$, Demand <sup>=</sup> required to be met m3/day, Ka, Kb = maximum flow capacity of well fields A and B, respectively, m3/day.


To meet the growing demand for public housing, a community has decided to build more housing units. There are two sites where this can be done, and the question is which site is less expensive over time. Assume these sites are named A and B. Let A(t) and B(t) be the capacity of each of those sites at the beginning of period t. Let KA(t) and KB(t) be the added capacity in period t, costing Ca(KA(t)) and Cb(KB(t)). Construction periods last 5 years; hence each period t will be a 5-year period. Costs must be paid at the beginning of each period.

Cost functions:

Ca(KA(t)) = 15 + 8 KA(t)if KA(t) > 0; otherwise = 0.

Cb(KB(t)) = 5 + 9 KB(t)if KB(t) > 0; otherwise = 0.

Assume these apply in each period t.

r = annual interest rate. Discountfactor : 1/((1 + *r*) ∧ (5 ∗ (*t* − 1)))

Projections of future demands for public housing have been made. Estimates of total capacity requirement are:


Solve using linear programming, and show the sensitivity of the solution to the value of the annual interest rate r.

	- (a) What are the allocations that result in the maximum total income?
	- (b) If you have only 14 resources to allocate, show how you could get an approximate solution using linear programming.
	- (c) Show how the model could be modified to obtain the maximum equal income for both users.

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **10 Solving Models Using Calculus**

#### **ABSTRACT**

Solutions to many economic models are based on marginal values of functions, such as marginal costs, marginal benefits, and marginal net benefits, or whatever the function being maximized or minimized represent. These marginal values are the slopes of functions. This chapter introduces how to use differential calculus to find the slopes and solutions to problems characterized by continuous non-linear functions. The reverse, called integral calculus, is also introduced for finding areas under functions that can represent total costs, benefits, and/or other values such as probabilities that are discussed in later chapters.

#### **10.1 Introduction**

Many optimal solutions of models having continuous non-linear objective functions are based on the slopes of those functions rather than the functions themselves. Slopes are the change in the function value per change in the value of the function's argument. If the function is f(x), its slope is -(f(x))/x. The maximum or minimum value of a function is when its slope is 0. The hill climbing approach used in Chap. 4 to solve a discrete version of the resource allocation problem involved finding the steepest slope of multiple user benefit functions and making an allocation to the user having the steepest remaining slope. The benefit–cost example introduced in Chap. 6 involved finding the allocation where the slopes of the benefit and cost functions were equal. In fact, the optimal solutions to both problems occurred when the slopes of the objective functions were equal. Slopes play a significant role in economic decision-making. Economists call these slopes marginal values, such as marginal benefits or marginal costs or marginal yields. This chapter introduces ways of finding slopes of continuous functions and how they can help us address various policy issues. To do this, we can use some procedures included in what is termed differential calculus.

<sup>&</sup>amp; Management Science 318, https://doi.org/10.1007/978-3-030-93986-1\_10

**Fig. 10.1** Founders of the 'mathematics of change,' Gottfried Wilhelm Leibniz and Isaac Newton. (Image: Christoph Bernhard Francke/Public domain, Image:Dr Project/Shutterstock, Image: After Godfrey Kneller/Public domain) https://www.thegreatcoursesdaily.com/invented-calculusnewton-leibniz/

This chapter assumes that many using this book may not have had much if any calculus and hence this basic introduction may be helpful. If you already know this subject, you can probably skip this chapter and go on to others (Fig. 10.1).

#### **10.2 Finding Slopes**

Differentiation is a method of calculus that lets us find the slope of any point on a function. If we are interested in finding the maximum value of the non-linear function f(*x*) shown in Fig. 10.2, we know that happens when the slope is 0, so we can use differentiation to find the function that is the slope of the original function, f(x), and then set that slope function equal to 0 and solve for x. The value of *x* where the slope of f(*x*) = 0 is where the black dot is in Fig. 10.2.

Slopes define the rate of change of a function f(*x*) at any point on the function, i.e., at any value of *x*. As the function's variable value, i.e., *x*, changes, the function's slope may also change, such as is the case in Fig. 10.2.

**Fig. 10.2** A concave function f(*x*) whose maximum value is indicated by the dot. At this point, the slope is 0

An easy way to find slopes for any continuous function is by differentiation. Differentiating a function results in another function whose value for any value *x* is the slope of the original function f(*x*) at *x*. This function is known as the derivative of the original function and is denoted by either a prime sign, as in f'(*x*), or by the differential operator notation, *d*f/*d*x. The operator '*d*' replaces the change notation '-' as in f(*x*)/*x* and signifies what the change in f(*x*) is as *x* goes to 0.

The slope of any continuous function f(*x*) at any value of *x* is a line tangent to it at that value of *x* such as shown in Fig. 10.2. The slope of the tangent line is the slope of the function at that value of *x*.

If the function is concave, as shown in Fig. 10.2, its slope decreases as x increases. The slope of a convex function increases as x increases. The slope, also called the gradient*,* of a function, tells us how steep the function f(x) is at a particular value of x. A linear function, i.e., a horizontal line has slope 0; a line with a positive slope increases in value as x increases. A line with a negative slope decreases in value as x increases in value.

#### **10.3 Maxima and Minima**

Finding the value of *x* of a function f(*x*) that results in a 0 slope does not always guarantee a maximum or minimum of the function. The function may have multiple values of *x* that result in slopes of 0. For now, this is just a warning that finding the value(s) of *x* where the slope of f(*x*) is 0 does not always tell us what we want to know without some additional tests to be sure the solutions are indeed global, rather than a local maxima or minima, or whether it represents a maximum or minimum (Fig 10.3).

One way to know if a point on a function where the slope is 0 is a true maximum or minimum is to just graph the function and see if it looks like a global maximum or minimum. You can also find the slope of the function for a slightly smaller value of *x* to determine if the function was at a maximum or a minimum value. If the newly computed slope is positive, the zero-slope value of the function was a maximum. Otherwise, the function was at a minimum value.

**Fig. 10.3** A graph of a function having local maximum and minimum values. At those points, the slopes of the function are 0. The global maximum (*y* = 10) and minimum (*y* = −10) points are at the end points of the function where the slopes are not zero

#### **10.4 Finding Slopes Using Differentiation**

A derivative of a function defines its slope. The derivative of a function is another function that is the slope of the original function. For example, consider the function 5*x*2. Its slope at any value of *x* is found by differentiating it, i.e., by finding *d*(5x2)/*dx*. Most of the functions we will be working within this book are power functions having terms of the form a*x*<sup>b</sup> where 'a' and 'b' are known constants.

Consider the function f(*x*) <sup>=</sup> <sup>a</sup>*x*b. The slope of this power function is found in two steps:


This is the slope of axb for any value of x. Differentiation is as simple as that for continuous power functions. Even constants can be expressed as a power function. Any constant C is also Cx0 since any term raised to the 0th power is 1. Hence, the slope of any constant C is 0. The linear function 2*x* can also be expressed as 2x1 and hence its slope is 1(2)*x*1−<sup>1</sup> or 2.

The slope of this 'slope function' is the derivative of a derivative, called the second derivative, which is designated as *d*2f(*x*)/*d*x2.

*<sup>d</sup>*2f/*dx*<sup>2</sup> <sup>=</sup> *<sup>d</sup>* [(*d*f/*d*x)/*d*x]/*d*<sup>x</sup> <sup>=</sup> *<sup>d</sup>*[ba*x*(b−1)]/*d*<sup>x</sup> <sup>=</sup> a(b)(b<sup>−</sup> 1) xb <sup>−</sup> 2. And so on for the nth derivative.

The slope of a function that is the sum of multiple terms is found by replacing each term with its derivative. For example, the slope of 7 <sup>+</sup> <sup>4</sup>*x*1.5 is 0 <sup>+</sup> <sup>6</sup>*x*0.5. This example illustrates the fact that the slopes of functions containing constants are not affected by the constants. Marginal costs are not impacted by fixed costs. Derivatives of constants, including fixed costs, are always 0.

There are other shortcuts to differentiating more complicated combinations of functions that one can learn from textbooks in calculus. Probably the biggest shortcut one can take to find a derivative is to access one of many programs available on the internet for differentiating user-provided functions.

Before leaving this subject, we need to cover what is termed partial differentiation of multivariable functions.

#### **10.5 Partial Differentiation**

For multivariate functions having more than one unknown variable in them, one can find the slopes associated with each variable independently of the others. For example, consider the function f(*x, y*) = 5 + 3(*xy*). The partial derivative of f(*x, y*) with respect to *x* (assuming *y* is a constant) is ∂f/∂*x* = 3*y*. The partial derivative of f(*x, y*) with respect to *y* (assuming *x* is constant) is ∂f/∂*y* = 3*x*.

For partial derivatives, we replace the differential operator *d* as in *dx* with ∂ as in ∂*x* to indicate that it is a partial differentiation.

To illustrate, consider the two-variable function f(*x,y*) = 5 + 3(*xy*) 2, which is the same as 5 <sup>+</sup> 3(*x*2*y*2).

∂ *f* /∂*x* = 3 - 2*x y*2 <sup>=</sup> <sup>6</sup>*x y*2. Partial derivative with respect to the variable *<sup>x</sup>*. ∂ *f* /∂ *y* = 3 - 2*x*<sup>2</sup> *y* <sup>=</sup> <sup>6</sup>*x*<sup>2</sup> *<sup>y</sup>*. Partial derivative with respect to the variable *<sup>y</sup>*.

#### **10.6 A Review**

For a review, assume f(x) <sup>=</sup> <sup>9</sup> <sup>+</sup> 3x−<sup>2</sup> <sup>+</sup> 5x4.

*<sup>d</sup>*f/*dx* = −6*x*−<sup>3</sup> <sup>+</sup> <sup>20</sup>*x*<sup>3</sup> First derivative. *d*f <sup>2</sup>/*dx*<sup>2</sup> <sup>=</sup> <sup>18</sup>*x*−<sup>4</sup> <sup>+</sup> <sup>60</sup>*x*<sup>2</sup> Second derivative. *d*f <sup>3</sup>/*dx*<sup>3</sup> = −72*x*−<sup>5</sup> <sup>+</sup> <sup>120</sup>*<sup>x</sup>* Third derivative.

Finally consider f(*x,y*) = 5 + 3(*x* + *y*) 2, which is the same as 5 <sup>+</sup> 3(*x*<sup>2</sup> <sup>+</sup> <sup>2</sup>*xy* <sup>+</sup> *<sup>y</sup>*2).

∂ *f* /∂*x* = 3(2)(*x* + *y*) 11 <sup>=</sup> <sup>6</sup>(*<sup>x</sup>* <sup>+</sup> *<sup>y</sup>*) Partial derivative with respect to the variable *<sup>x</sup>*. ∂ *f* /∂ *y* = 3(2)(*x* + *y*) 11 <sup>=</sup> <sup>6</sup>(*<sup>x</sup>* <sup>+</sup> *<sup>y</sup>*) Partial derivative with respect to the variable *<sup>y</sup>*.

#### **10.7 Derivative Notation**

See Table 10.1


**Table 10.1** Differential calculus notation. The variable *y* = f(*x*) -

#### **10.8 Integration**

Integration is just the reverse of differentiation. Differentiating a function gives us the equation for the slope of that function. For example, the slope of the function *<sup>x</sup>*<sup>2</sup> is *<sup>d</sup>*(*x*2)/*dx* <sup>=</sup> <sup>2</sup>*x*. Integrating a function finds the original function for which the existing function, e.g., 2*x*, is its slope. The process of integration is simply the reverse of what it is for differentiation, with an addition of a constant.

To differentiate *x*2, we first multiply the function by its exponent, 2*x*2, and then subtract 1 from the exponent, to get 2*x*. To integrate 2*x*, which is 2*x*1, we first add one to the exponent, 2*x*1+1 <sup>=</sup> <sup>2</sup>*x*2. Then we divide the function by the new exponent, getting 2*x*2/2 <sup>=</sup> *<sup>x</sup>*2. But we also need to add a constant, say C, which is the value of the function *<sup>x</sup>*<sup>2</sup> when *<sup>x</sup>* <sup>=</sup> 0. In this case, C is obviously 0. So we end up with x2 <sup>+</sup> C, and when this is differentiated it becomes 2*x*. Differentiating C <sup>+</sup> <sup>5</sup>*x*<sup>3</sup> results in 0 <sup>+</sup> <sup>15</sup>*x*2. Integrating 15*x*<sup>2</sup> results in 15 *<sup>x</sup>*2+1/(2 <sup>+</sup> 1) <sup>=</sup> <sup>5</sup>*x*<sup>3</sup> plus a constant C.

#### **10.8.1 An Exception**

Consider integrating a*x*–1 or equivalently a/*x*. In this case, the result would be a*x*0/0 = a/0 since the exponent b = –1. Hence, in this case, the rules for integration do not work. The function's correct solution is the constant 'a' times the natural logarithm of *x* plus a constant C (a *ln x* + C). The term *ln x* is the exponent of the base of natural logarithms, e, (=2.718281828.) that results in *<sup>x</sup>*. Note e*ln* <sup>x</sup> <sup>=</sup> *<sup>x</sup>* When *<sup>x</sup>* <sup>=</sup> 1, *ln* <sup>1</sup> <sup>=</sup> 0. e0 <sup>=</sup> 1. When *<sup>x</sup>* is e, *ln* <sup>e</sup> <sup>=</sup> 1. e1 <sup>=</sup> e.

If we were working with logarithms of base 10, then 10log *<sup>x</sup>* <sup>=</sup> *<sup>x</sup>*. The *log* of 1 is 0 since 100 is 1. The log of 10 is 1 since 101 is 10 and the *log* of 100 is 2 since 102 is 100. Again, the logarithm of some number x is the exponent of, in this case, 10, which results in the value *x*. The natural logarithm is the exponent of e that results in some value of *x*. The base of logarithms can be either 10 (when the term 'log' is used) or e (when the term '*ln*' is used).

#### **10.8.2 What is Integration?**

The upper case sigma, , signifies a sum. If we were adding a series of discrete values of some function g(*x*j) we would write it as <sup>j</sup> g(*x*j). Whatever those values are they can be expressed as g(*xj*)/*x*j, where the function g(xj) is constant over the interval xj. These discrete values can be considered rectangles having heights equal to the g(*x*j) and widths equal to the *x*<sup>j</sup> such as shown in Fig. 10.4.

The sum of the areas in the rectangles shown in Fig. 10.4 is an approximation of the area under the continuous function 2*x*. Since the function 2*x* is a continuous function of x, the smaller the widths *x* are the more accurate will be the estimation of the area under the function. This is evident when computing the area under the function shown in Fig. 10.5.

**Fig. 10.4** A series of discrete rectangles having heights g(x) and widths of *x* for discrete values of *x*

**Fig. 10.5** Computing the area under a function becomes more accurate the smaller the width of each rectangle becomes

Assuming all *x* are 1, the area of each rectangle in Fig. 10.4 is 2x. The sum of the areas over each value of x from 1 to 5 is expressed as

$$\sum\_{1}^{5} 2x \,\Delta \mathbf{x} = 2 + 4 + 6 + 8 + 10 = 30.$$

As x gets smaller, the area between 0 and 5 converges to its true value of 0.5(5)(10)) = 25. As *x* approaches 0, it becomes *dx*, and the integral sign, -, replaces the sign. Hence, the area under the function g(x) = 2x from x = 0 to x = 5 is

$$\int\_0^5 2x \, dx = 2x^2/2 = x^2 = 5^2 = 25.$$

If g(x) is the function that defines the slope of another function f(x), then the equation defining the area under the slope function is the function f(*x*). Hence, if f(*x*) <sup>=</sup> *<sup>x</sup>*2, then its slope is *<sup>d</sup>*(*x*2)*/dx* is 2*x*. The triangular area from x <sup>=</sup> 0 to some value of x <sup>=</sup> x\* under the function 2x is obviously 0.5(*x*\*)2*x*\* <sup>=</sup> *<sup>x</sup>*\*2. The area under a slope function is the value of the original function. -(*d*(f(*x*)/*dx*) *dx* = f(*x*).

#### **10.8.3 Integrating Over Ranges of a Variable or Function**


If *x* ranges between a and b, then the area under any continuous function g(*x*) between x = a and x = b is determined by the definite integral

$$\int\_{a}^{b} g(\mathbf{x})d\mathbf{x} = \int g(\mathbf{x})d\mathbf{x} \text{ evaluated at } \mathbf{x} = \mathbf{b} - \int g(\mathbf{x})d\mathbf{x} \text{ evaluated at } \mathbf{x} = \mathbf{a}$$

Thus

$$[\mathbf{x}^2 + \mathbf{C}]|\_{\mathbf{x} = \mathbf{b}} - [\mathbf{x}^2 + \mathbf{C}]|\_{\mathbf{x} = a} = \mathbf{b}^2 - \mathbf{a}^2.$$

#### **10.8.4 Other Examples of Integration**

Some functions may have multiple terms of the form axb. In this case, integrating each one separately will result in the integral of the entire function. For example, assume f(*x*) is (5 <sup>+</sup> <sup>3</sup>*<sup>x</sup>* – 2*x*2) 2. When expanded it becomes 25 <sup>+</sup> <sup>30</sup>*<sup>x</sup>* – 11*x*<sup>2</sup> – <sup>12</sup>*x*<sup>3</sup> <sup>+</sup> <sup>4</sup>*x*4. Differentiating each term of f(*x*) results in 2(5 <sup>+</sup> 3X – 2X2)(3 – 4X) or 30 – 22*<sup>x</sup>* – 36*x*<sup>2</sup> <sup>+</sup> <sup>16</sup>*x*3.

Integrating the function (30 – 22*<sup>x</sup>* – 36*x*<sup>2</sup> <sup>+</sup> <sup>16</sup>*x*3) involves integrating each term.

$$\int \left( 30 - 22x - 36x^2 + 16x^3 \right) dx = 30x - 11x^2 - 12x^3 + 4x^4 + \text{ C.} $$

The constant C can be determined by referring to the original function f(*x*) = (5 <sup>+</sup> 3x – 2*x*2) <sup>2</sup> and setting all the variables *x* to 0. This identifies C to be 52 or 25. Thus, the integral of a differentiated function *d*(f(*x*)/*dx* is the function f(*x*) itself.

There are many functions that do not easily convert to a series of terms that are easily integrated. The internet not only provides many examples of differentiation and integration, but also contains programs that will do the differentiation or integration of user-provided functions. So, if you are stuck, go to the internet but you should be able to perform those operations on the types of functions illustrated in this chapter.

The tables below are for your reference if needed (Tables 10.2, 10.3 and 10.4).


**Table 10.2** Notation used for integration

**Table 10.3** Some common indefinite integrals. The 'ln' in this table refers to natural logarithms having e as its base




#### **Exercises**

0 Warmup.

The following examples show that if you want to compute the average value of a function over a range of values, you want to compute the average of different functional values rather than computing the function's value of the average input value.

Consider each of these functions:


Note that:

For concave functions:


For convex functions:

Mean of function values ≥ function value for mean x 9 1/<sup>6</sup> <sup>≥</sup> 2.52 <sup>=</sup> <sup>6</sup>.<sup>25</sup>

For linear functions:

Mean of function values = function value for mean x 12.5 = (5)2.5 = 12.5

Show that the true mean is between these two values for each function.

#### 1. Benefit–Cost analysis.

Assume a benefit function B = 60\*xˆ0.8 and a cost function C = 4 + 7\*xˆ1.5. The difference between B and C is the net benefits.


You are a mayor of a town that is considering privatizing the public water supply system. Currently, the public water supply system is operating in such a way that maximizes the benefits to its consumers (willingness to pay) while still paying for the service. No profit is made. If it is privatized, the private company will want to maximize its profits (revenue less costs).

For example, consider the functions shown below:

The horizontal axis is the amount of water delivered, and the vertical axis is money representing the unit price of water charged, the total and marginal costs, and the total and marginal revenue.

Willingness to pay is the area under the demand curve.

Assume the public utility objective is to maximize willingness to pay less the cost of supplying water.

Assume the private utility objective is to maximize total revenue less the cost of supplying water.

The total revenue is the unit price times the quantity Q sold.

For an amount of water, Q assume the total cost = 5Q and the demand function = unit price = 12 – 1.5Q.

Given these data, find the best amounts of water to deliver and the associated unit prices to charge for both public and private utility. The public utility should maximize consumer surplus less its costs, and the private utility will maximize its producer surplus or profit subject to any regulations it must meet. In this example, there are none.

Find the solutions and graph the solutions like the figures above. Identify on the graph the consumer's surplus, producer's surplus, and total cost.

For a public utility, what should the unit price be for the water supplied, and how does it compare to the marginal cost?

For a private utility, what should the unit price be for the water supplied, and how does it compare to the marginal cost? Hence, what is the unit and total profit?

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **11 Lagrangian Models**

#### **ABSTRACT**

Lagrangian models use calculus to solve multi-variable non-linear constrained optimization models of problems and for identifying the marginal changes ('shadow prices') of optimal solutions to changes in constraint bounds. This is especially useful when the constraints represent resource limitations.

#### **11.1 Introduction**

Joseph-Louis Lagrange is usually considered to be a French mathematician, but the Italian Encyclopedia refers to him as an Italian mathematician who lived from 1736–1813. Among numerous other honors, a street, Rue Lagrange, in Paris, is named after him (Fig. 11.1).

Joseph-Louis Lagrange is famous for lots of things he did in his life, but for us, he showed how differential calculus could be used to find solutions to constrained non-linear models. But, since it is calculus-based, all the limitations of calculus apply. It is limited to continuous functions. It produces a maximum for objective functions that are concave and a minimum for objectives that are convex. It ignores constants. But it gives us an opportunity to better understand the concept and find the values of shadow prices.

#### **11.2 Constructing Lagrangian Optimization Models**

Lagrange's approach for finding the maximum or minimum value of some objective function F(*X*) and associated values of all the decision variables *X* = {*x*1, *x*2, *x*3,.., *xj*, … *x*n} also determines what economists call 'shadow prices,' and operations researchers call 'dual variables' or 'dual prices,' associated with each constraint, gi(*X*) = bi. Each constraint's shadow price is the change in the value of

**Fig. 11.1** Joseph-Louis Lagrange and a street in Paris having his name. https://en.wikipedia.org/ wiki/Joseph-Louis\_LagrangeCreativeCommonsAttribution-ShareAlikeLicense

the objective function F(*X*) given a unit change in the constraint's bi value. These shadow prices are also called Lagrangian multipliers, typically denoted as λi.

λ<sup>i</sup> = *d*F(*X* )/*d*bi for each constraint i.

The modeling approach involves combining the objective function F(*X*) and all the constraints expressed as equalities, gi(*X*) = bi, into a single function L(*X, λ*). The unknown variables are the original ones contained in the vector *X* and all the Lagrange multiplier variables, λi, one for each constraint i.

Each constraint gi(**X**) = bi in L(**X**, **λ**) is multiplied by its Lagrangian multiplier λi. Their sum is subtracted from F(*X*). The result is

$$\mathcal{L}(\mathbf{X}, \lambda) = \mathcal{F}(\mathbf{X}) - \sum\_{\mathbf{i}} \lambda\_{\mathbf{i}} (\mathbf{g}\_{\mathbf{i}}(\mathbf{X}) - \mathbf{b}\_{\mathbf{i}}) .$$

Setting inequality constraints originally of the form gi(**X**)≤bi or gi(**X**)≥bi to equalities when one is not sure if they are equalities or not, may involve the addition, or subtraction as appropriate, of the square of an additional unknown slack or surplus variable. For this discussion, assume such variables if needed are included in the vector *X*. These so-called slack or surplus variables are squared to insure each is non-negative.

Equating to 0 each of the partial derivatives of L(*X, λ*) with respect to each of the unknown variables, in *X* and *λ* results in a set of equations that when simultaneously solved will identify the values of each of the unknown variables in *X* and shadow prices in *λ* that maximize or minimize F(*X*). The procedure is the same whether the objective function F(*X*) is to be maximized or minimized. Therefore, one should check to see if the solution is a maximum or minimum value. Again, the λ*<sup>i</sup>* values are the shadow prices associated with the bi values of each constraint i.

$$\begin{aligned} \mathrm{L}(\mathbf{X}, \lambda) &= \mathrm{F}(\mathbf{X}) - \sum\_{\mathbf{i}} \lambda\_{\mathbf{i}} (\mathbf{g}\_{\mathbf{i}}(\mathbf{X}) - \mathbf{b}\_{\mathbf{i}}) \\ \partial \mathrm{L}/\partial \mathbf{x}\_{\mathbf{j}} &= 0 \ = \,\partial \mathrm{F}/\partial \mathbf{x}\_{\mathbf{j}} - \sum\_{\mathbf{i}} \lambda\_{\mathbf{i}} \partial (\underline{\mathbf{g}}\_{\mathbf{i}}(\mathbf{X}))/\partial \mathbf{x}\_{\mathbf{j}} \text{ for all variables } \mathbf{x}\_{\mathbf{j}} \\ \partial \mathrm{L}/\partial \lambda\_{\mathbf{i}} &= 0 \ = \,\left(\underline{\mathbf{g}}\_{\mathbf{i}}(\mathbf{X}) - \mathbf{b}\_{\mathbf{i}}\right) \text{ for all constraints i.} \end{aligned}$$

Before showing some specific examples, consider the constraints where a surplus or slack variable, *x*<sup>i</sup> 2, had to be added or subtracted from the left-hand side of a constraint to form an equality. When the partial derivative of L(*X, λ*) with respect to that variable is set to 0 the result is

$$
\partial \mathcal{L} / \partial \mathbf{x\_i} = 0 \\
= -2x\_{\mathbf{i}} \lambda\_{\mathbf{i}}.
$$

Note that either *x*<sup>i</sup> or λ<sup>i</sup> or both will equal 0. If the constraint is binding there will be no inequality, and the value of the slack or surplus variable *x*<sup>i</sup> will be 0. If the constraint is not binding (does not affect the values of the other variables *x*j) then λ<sup>i</sup> will equal 0. There will be no change in F(*X*) given a small change in bi.

#### **11.3 Example Lagrangian Models**

Consider finding the minimum length of fence needed to enclose a rectangular area of at least A or of finding the maximum rectangular area that can be enclosed by a fence of length P. The area's perimeter = 2(length) + 2(width). Clearly, the solution is length <sup>=</sup> width <sup>=</sup> <sup>√</sup>A. Solving a Lagrangian model will also identify the Lagrangian multipliers, i.e., the shadow prices, associated with the available resource, i.e., area or length of fencing. Letting *l* and *w* be the unknown length and width of the rectangular area A

$$\begin{aligned} \mathbf{L} &= 2(1+w) - \lambda(lw - \mathbf{A}) \\ \partial \mathbf{L}\acute{\ell}\partial l &= 0 = 2 - \lambda w \\ \partial \mathbf{L}\acute{\ell}\partial w &= 0 = 2 - \lambda l \\ \partial \mathbf{L}\acute{\ell}\partial \lambda &= 0 = lw - \mathbf{A} .\end{aligned}$$

One can see from the first two partial differential equations that *l* = *w*, thus from the third partial differential equation, *<sup>l</sup>* and *<sup>w</sup>* <sup>=</sup> <sup>√</sup>A. Hence, the shadow price associated with the area, λ, is 2/√A. This is how much more fencing is required for a unit increase in A.

Alternatively, if the total length of fencing is P, we can find the maximum area *A* (*lw*) enclosed by P

$$\begin{aligned} \mathcal{L} &= lw - \lambda(2(l+w) - \mathcal{P}) \\ \partial \mathcal{L} \slash &= 0 = w - 2\lambda \\ \partial \mathcal{L} \slash &= 0 = l - 2\lambda \\ \partial \mathcal{L} \slash \partial \lambda &= 0 = 2(l+w) - \mathcal{P}. \end{aligned}$$

Again, from the first two partial differential equations, *l* = *w*, and from the third, *l* or *w* equals P/4. Hence the shadow price associated with the perimeter P, λ, equals P/8. This is how much more area is obtained for a unit increase in P.

This model can be extended to one of finding the least-cost dimensions of a storage tank containing a volume of V. Let the average cost per unit of the base area = Cb. Similarly, let the average cost per unit side area = Cs and the average cost per unit top area = Ct. Before we can model this tank, we need to decide on its shape. Here we can consider two different tank shapes, a rectangular and a cylindrical one. Of course, it is possible to pick anything in between these two shapes. The stated objective is to

$$\begin{aligned} \text{Minimize Total cost} \\ \text{Subject to: } \text{Total cost} &= base cost + \text{side cost} + \text{topcost} \\ \text{Volume of tank} &\ge \text{required volume} \end{aligned}$$

Assuming a rectangular tank having dimensions of *L*, *W*, and *H* :

$$\begin{aligned} \textit{Basecost} &= \textit{Cb} \, L \, W\\ \textit{Sidecost} &= \textit{Cs} \, 2 \, H \, (L+W) \\ \textit{Topcost} &= \textit{Ct} \, L \, W \\ \textit{L} \, W \, H &\ge \mathtt{V}. \end{aligned}$$

Assuming a cylindrical tank having dimensions *R* and *H* :

*Basecost* = Cb π*R*2 *Sidecost* = Cs(2π*RH*) *topcost* = Ct π*R*2 <sup>π</sup> *<sup>R</sup>*<sup>2</sup> *<sup>H</sup>* <sup>≥</sup> <sup>V</sup>.

Clearly, for each of the two-volume capacity constraints, the least-cost solution will result in; an equality. Constructing a bigger tank than required just costs more. Using Lagrangian models. For a rectangular tank with dimensions l, w, and h:

$$\begin{aligned} \mathbf{L} &= 2\operatorname{Cs}h(l+w) + (\mathbf{C}b + \mathbf{C}t) \, l \, w - \lambda(l \, w \, h - \mathbf{V})\\ \partial \mathbf{L} \, l \partial l &= 0 = 2\operatorname{Cs}h + (\mathbf{C}b + \mathbf{C}t)w - \lambda \, w \, h\\ \partial \mathbf{L} \, l \partial w &= 0 = 2\operatorname{Cs}h + (\mathbf{C}b + \mathbf{C}t)l - \lambda \, l \, h\\ \partial \mathbf{L} \, l \partial h &= 0 = 2\operatorname{Cs}(l+w) - \lambda \, l \, w\\ \partial \mathbf{L} \, l \partial \lambda &= 0 = l \le h - \mathbf{V} \end{aligned}$$

From these first three partial differential equations, one can prove that the width *w* equals the length *l*, and that both = 2 Cs *h*/(Cb + Ct). Since from the last equation, *h* = V/ww, substituting that into {w = *l* = 2 Cs *h*/(Cb+Ct)} yields

$$\mathbf{w} = l = \left[ 2 \,\mathrm{Cs} \,\mathrm{V} (\mathrm{Cb} + \mathrm{Ct}) \right]^{1/3}$$

and

$$h = \text{Vol}[\text{?Cs V/(Cb} + \text{Ct)}]^{2/3} \text{ or } h = \text{V}^{1/3} \left[ (\text{Cb} + \text{Ct})/2 \,\text{Cs} \right]^{2/3}$$

The shadow price associated with volume V will denote the change in the total cost per unit change in volume V. The total cost increases if V is increased. What is interesting about all such tank or container problems is that the ratio of base and top cost to total cost will equal 1/3 no matter what the tank shape and unit costs and volumes are. The total side cost will always be 2/3rds of the total cost of a minimum-cost tank or container.

$$\begin{aligned} & \text{For a circular tank with dimensions' } r \text{ and } h:\\ & \text{L = Cs} 2\pi r h + (\text{Cb } + \text{Ct}) \pi r^2 - \lambda |\pi r^2 h - \text{V}|,\\ & \partial \text{L/} \partial r = 0 = 2 \,\text{Cs} \, h \, \pi + 2(\text{Cb } + \text{Ct}) \pi \, r - 2 \lambda \pi \, rh \\ & \partial \text{L/} \partial r = 0 = 2 \,\text{Cs} \, r \, \pi - \lambda \, \pi \, r^2 \\ & \partial \text{L/} \partial \lambda = 0 = \pi \, r^2 h - \text{V}. \end{aligned}$$

Use first two partial differential equations to find that *r/h* = Cs/(Cb+Ct) Using the third equation

$$r = \left[\mathbf{V} \,\mathrm{Cs} \boldsymbol{\pi} \,\mathrm{(C\boldsymbol{b} + \mathbf{C}t)}\right]^{1/3}$$

$$h = \left[\mathbf{V} \,\mathrm{(C\boldsymbol{b} + \mathbf{C}t)}^2 / \boldsymbol{\pi} \,\mathrm{Cs}^2\right]^{1/3}.$$

Now look at cost ratios:

$$\begin{split} \text{Side cost/total cost} &= \text{Cs} \, 2\pi rh / \left[ \text{Cs} \, 2\pi rh + (\text{Cb} + \text{Ct}) \, \pi r^2 \right] \\ &= 2 \, \text{Cs} \, h / \left[ 2 \, \text{Cs} \, h + (\text{Cb} + \text{Ct}) \, r \right] \\ &= 2 \, \text{Cs} \, h / \left[ 2 \, \text{Cs} \, h + (\text{Cb} + \text{Ct}) \, h \, \text{Cs} / (\text{Cb} + \text{Ct}) \right] = 2/3. \end{split}$$

This is true regardless of unit costs Cs, Ct, Cb or V!

Finally, consider the resource allocation problem.

Assume the goal is to maximize the total benefits derived from the allocation of resources to three users. Denote the allocations as *X, Y,* and *Z* to users 1, 2, and 3, respectively. The benefits obtained from each allocation are 6 *X* – *X*2, 7*Y* – 1.5*Y*2, and 8*Z* – 0.5*Z*2. Assuming that only 6 resources are available, the problem is to find the allocations that

$$\begin{aligned} \text{Maximize } & \mathbf{F}(X, Y, Z) = \left(6X - X^2\right) + \left(7Y - 1.5Y^2\right) + \left(8Z - 0.5Z^2\right) \\ \text{Subjected to } & X + Y + Z = 6. \end{aligned}$$

The resource constraint is an equality since more resources are desired, and therefore, all 6 resources will be allocated.

The marginal benefits (slopes of the benefit functions) associated with each respective user are6–2*X*,7–3*Y*, and 8 – *Z*. When these slopes equal each other, the corresponding allocations will maximize the total benefits. This can be shown by just constructing a Lagrangian model.

The Lagrangian equation can be written as

$$\text{L} = 6X - X^2 + 7Y - 1.5Y^2 + 8Z - 0.5Z^2 - \lambda (X + Y + Z - 6).$$

Differentiating with respect to each unknown (*X, Y, Z,* λ) and setting the result to 0

$$\begin{aligned} \partial \mathcal{L} \prime \partial X &= 0 = 6 - 2X - \lambda \\ \partial \mathcal{L} \prime \partial Y &= 0 = 7 - 3Y - \lambda \\ \partial \mathcal{L} \prime \partial Z &= 0 = 8 - Z - \lambda \\ \partial \mathcal{L} \prime \partial \lambda &= 0 = X + Y + Z - 6 \end{aligned}$$

The first three partial differential equations show that the slopes of each benefit function, the marginal benefits, at the optimal solution, are all the same, and equal to λ. Using this information in the last equation, *X* = 1, *Y* = 1, *Z* = 4, and thus the shadow price, *d*F/*d*6 = λ = 4 and the total benefits are 34.5. If the available resources were 6.1, the total benefits would be 34.9.

#### **Exercises**

1. Benefit Cost analysis

Assume a benefit function B = 60\*xˆ0.8 and a cost function C = 4 + 7\*xˆ1.5. The maximum difference between B and C, the maximum net benefits, occurs at x = 8.7686.

	- (a) Consider the problem of allocating resources to three users. The allocations are X, Y, and Z. User 1's total revenue is 6X/(1+X). User 2's total revenue is 7Y/(1 + Y). User 3's total revenue is 8Z/(1 + Z). Assume 10 resources are available.

Show how to find the allocations that maximize the total revenue from all three users, and the associated shadow price of the resource constraint, using Lagrange multipliers. Compare that solution with one obtained from solving the model itself, say using Solver in Excel.

(b) There are two users of resources, A and B, whose income depends on the resources they are allocated. Let those allocations be *A* and *B*, respectively. The income to user A equals 10 *<sup>A</sup>* <sup>−</sup> 0.5 *<sup>A</sup>*2. The income to user B is 5*<sup>B</sup>* – 0.25 *B*2. You wish to know what allocations result in the maximum total income. You only have 14 resources to allocate and are curious what marginal increase in total income could result if you had more resources.

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

**12 Dealing with Uncertainty**

#### **ABSTRACT**

This chapter introduces how probability and statistical measures can be incorporated into models to reflect the uncertainties of model inputs, parameter values and output variable values.

#### **12.1 Introduction**

When the value of a model variable or parameter can vary and is not predictable, we often call it random. If we observe many outcomes or values of that variable or parameter, we can estimate its probability distribution along with various statistical measures, such as its mean, median, and variance, that characterize the probability distribution.

Assume the variable *X* is a random variable. In this chapter and the following chapter, uppercase letters, e.g., *X*, will denote random variables and lowercase letters, e.g., *x*, will represent the values of that random variable *X*.

There are two types of random variables, discrete and continuous.

#### **12.2 Discrete Random Variables**

A discrete random variable is one that may take on a finite number of discrete values such as integers. An example is the outcome of a toss of six-sided dice. Possible outcomes are 1, 2, 3, 4, 5, and 6. Examples of other discrete random variables include the number of people who visit the public library on Mondays, the number of cars parked in a city garage at any given time during the working day, the number of rainy days in July, etc.

The probability distribution of a discrete random variable is a plot of the probabilities associated with each of its possible values. This histogram is

<sup>&</sup>amp; Management Science 318, https://doi.org/10.1007/978-3-030-93986-1\_12

**Fig. 12.1** Probability distribution of discrete possible outcomes of a random variable

**Fig. 12.2** The cumulative (red) and exceedance (blue) distributions of the discrete random variable distribution shown in Fig. 12.1

also sometimes called the probability function or the probability mass function (Figs. 12.1 and 12.2).

Suppose the outcome of a random variable *X* may be any of n different discrete values *x*i, with the probability pi that *X* = *x*i. Thus, Pr(*X* = *x*i) = pi. These probabilities pi must satisfy the following:

$$0 \le p\_l \le 1 \text{ for each } i \text{ and } p\_1 + p\_2 + \dots + p\_n = 1.$$

All random variables (discrete and continuous) have cumulative distribution functions. It is a function defining the probability that the value of a random variable *X* is less than or equal to a given value *x*, over the range of possible values *x*. For a discrete random variable, the cumulative distribution function is found by summing up the probabilities from the lowest possible value of *X* to any particular value *x*i. This defines the probability of the random variable value being less than or equal to *x*i, written Pr{*X* ≤*x*i}. Cumulative distribution function values range from 0 to 1.

Subtracting the (red) cumulative distribution from 1 yields the (blue) probability of exceedance function, Pr{*X>x*}. The blue area under this entire probability of exceedance function is the mean value of the random variable *X*.

#### **12.3 Continuous Random Variables**

A continuous random variable is one having an infinite number of possible values between any two limits. Continuous random variables often represent measurements. Examples include measures of weather like the amount of rain, snow, or an average temperature in any given location within a given period of time, the maximum daily noise level in a city or at an airport, the time it takes to travel from one location to another, the concentration of salt in a river, the height or weight of persons in any group of people, etc.

For a continuous random variable, the probability of an outcome being some specific value is 0. For example, the probability of finding someone exactly 6 feet tall is 0. Hence, continuous probabilities are defined over intervals of values, and represent the area under the probability distribution function, called a density distribution, within those intervals, such as between a and b in Fig. 12.3.

A continuous probability function, *f <sup>X</sup>*(*x*), must be non-negative, i.e., *f <sup>X</sup>*(x)≥0 for all *x,* and have a total area under the function of 1.

$$\int f\_X(x)dx = 1.$$

A function *f <sup>X</sup>*(*x*) meeting these requirements is known as a probability density function of the random variable *X*. The subscript denotes the random variable, in this case, *X*, and the argument *x* represents a particular value of *X*. Several such functions are shown in Fig. 12.4.

Probability distributions of random variables have a number of statistical characteristics. Some common ones are described below.

#### **12.4 Mean**

The mean of a discrete random variable *X* is a weighted average of the possible values that the random variable can have. If the values *x*<sup>i</sup> of each of n observations i are equally likely then the probability *pi* of each value *x*<sup>i</sup> is 1/*n*. This applies to the uniform distribution shown in Fig. 12.4. In this case, the mean is the sum of

all n observations *X* divided by n. In all cases, the arithmetic mean of a random variable is the sum of each possible outcome times its probability. The common symbol for the mean (also known as the expected value of *X*) is μ<sup>X</sup> if based on the entire population of random outcomes, otherwise, it is denoted as *E*(*X*).

$$
\mu\_X \text{ or } E(X) = \sum\_l x\_l p\_l \text{ for a discrete distribution } Pr(\mathbf{x}).
$$

$$
\mu\_X \text{ or } E(X) = \int x f\_X(\mathbf{x}) dx \text{ for a continuous distribution } f\_X(\mathbf{x}).
$$

Note that *f <sup>X</sup>*(*x*)*dx* is equivalent to *pi*. It is the area (height times width) under the probability distribution function *f <sup>X</sup>*(*x*), the height, times the infinitely small width interval *dx*.

The mean of a random variable *X* is the expected average outcome over many observations. The mean is not necessarily the most likely outcome, however. Consider a game in which you have a 90% chance of doubling your money every time you play it. Otherwise, you lose all your past winnings. The more times it's played, the higher the expected winnings and the higher the probability that you will have nothing.

#### **12.5 Variance**

The variance of a probability distribution is a measure of its spread, or variability. It is defined by the sum of each of the squared differences between the mean and possible *x*<sup>i</sup> or *x* values, times their associated probabilities, *pi* or *f <sup>X</sup>*(*x*)*dx*. Again, if it is based on the entire population of data, it is commonly denoted by σ<sup>X</sup> <sup>2</sup> or var(*X*), otherwise by *SX* 2.

$$
\sigma\_X^2 \text{ or } \text{var}(X) \text{ or } S\_X^2 = \sum\_i (\mathbf{x}\_i - \boldsymbol{\mu})^2 p\_i
$$

$$
\sigma\_X^2 \text{ or } \text{var}(X) \text{ or } S\_X^2 = \int \left(\mathbf{x} - \boldsymbol{\mu}\right)^2 f\_X(\mathbf{x}) d\mathbf{x}.
$$

The standard deviation, σ<sup>X</sup> or *std*(*X*) or *SX*, is the square root of the variance.

#### **12.6 Normal Distribution**

A normal distribution has a symmetrical bell-shaped density function centered about its mean, with its spread determined by its variance or standard deviation. The height (value) of a normal density distribution of the random variable *X* at a point *x* is given by the equation in Fig. 12.5.

If a dataset is normally distributed, then about 68% of the observations will fall within plus and minus one standard deviation, σ, of the mean, which, in this standard case shown in Fig. 12.5, is within the interval (−σ, σ). About 95% of the observations will fall within plus and minus 2 standard deviations of the mean, which is the interval (−2σ, 2σ) for the standard normal. About 99.7% of the observations will fall within 3 standard deviations (−3σ, 3σ) of the mean. Although it may appear as if a normal distribution does not include any values beyond a certain interval, the density function is actually positive for all values of x from – to + ∞. Data from any normal distribution may be transformed into data following the standard normal distribution by subtracting the mean from the observation and dividing by the standard deviation, i.e., (x − μ)/σ.

#### **12.7 Median**

The median of a probability distribution is the value of the random variable that has a 50% chance of being exceeded. Half of the area of the distribution is to the left of the median and half is to the right. It is the value of the random variable whose cumulative probability is 0.5 (Fig. 12.6).

For example, consider a continuous random variable *X* that ranges from 0 to 10 and whose triangular density function is 0.02*x*. Its cumulative distribution is the integral of 0.02×or 0.01*x*<sup>2</sup> from 0 up to x <sup>=</sup> 10 and 1 for all values≥10. The median is when this function equals 0.5. Hence, the median is x <sup>=</sup> <sup>√</sup>50.

#### **12.8 Mode**

The most likely value, the mode, of a continuous or discrete probability distribution is that which has the highest probability (Fig. 12.6).

#### **12.9 Conditional and Joint Probabilities**

Consider two random events, such as the outside temperature in two successive days. Let them be denoted by *A* for the first day and *B* for the following day. Each has various intervals of outcomes and associated unconditional probabilities. However, the probability of a particular outcome of *B* on the second day may be dependent on the actual outcome of *A* on the first day. This conditional probability can be denoted as Pr(*B*|*A*), the probability of an outcome of *B* given an *A* outcome. In the case where events *A* and *B* are independent (where event *A* has no effect on the probability of event *B*), the conditional probability of event *B* given event *A* is simply the probability of event *B*, Pr(*B*). Two successive coin tosses would be an example of this. The first toss is *A*, and the second, *B*. The outcome of toss *A* does not influence the outcome of toss *B*. Each possible outcome of each toss has a probability of 0.5. The joint probability (the probability of both outcomes) of two coin tosses, or any other independent events *A* and *B*, would be Pr(*A*, *B*) = Pr(*A*)Pr(*B*).

If events *A* and *B* are not independent and the outcome of *A* influences that of *B*, then the joint probability of two particular outcomes of *A* and *B* is defined by

$$\Pr(A, B) = \Pr(B|A)\Pr(A).$$

From this definition, the conditional probabilities Pr(*B*|*A*) of each possible outcome are easily obtained by dividing the joint probability Pr(*A*, *B*) with Pr(*A*):

For example, assume both *A* and *B* are states of the temperature in two successive days. Consider only two possible states: 'hot' and 'cold'. Assume data show that at any time the probability A is cold = 0.6, and that B is cold = 0.7. Data also show that if A is cold, the probability that *B* is also cold = 0.9. If *A* is hot, then the probability *B* is cold = 0.4. Clearly, the probability of the state of *B* depends on the state of *A*.

Summarizing:

The unconditional probabilities:

$$\Pr(A \text{ is odd}) = 0.6 \text{, thus } \Pr(A \text{ is hot}) = 0.4,$$

$$\Pr(B \text{ is cold}) = 0.7 \text{, thus } \Pr(B \text{ is hot}) = 0.3,$$

since if cold and hot are the only possible outcomes, these discrete probabilities must add to 1.

The conditional probabilities:

Pr(*B* is cold given *A* is cold) = 0.9, thus Pr(*B* is hot given *A* is cold) = 0.1. Pr(*B* is cold given *A* is hot) = 0.4, thus Pr(*B* is hot given *A* is hot) = 0.6.

Using the fact that the joint probability of *A* and B, Pr(*A*, *B*) = Pr(*B*|*A*) Pr(*A*), the joint probability of both *A* and *B* being cold = 0.9 (0.6) = 0.54. The joint probability of both being hot, using the same equation, is 0.6 (0.4) = 0.24. The joint probability of only *A* being hot is 0.4 (0.4) = 0.16. The joint probability of *B* being hot and *A* being cold is 0.1 (0.6) = 0.06. The joint probabilities of these four possible outcomes sum to 1.00.

> Pr(*A* is cold, *B* is cold) = 0.9 (0.6) = 0.54, Pr(*A* is hot, *B* is hot) = 0.6 (0.4) = 0.24, Pr(*A* is hot, *B* is cold) = 0.4 (0.4) = 0.16, Pr(*A* is cold, *B* is hot) = 0.1 (0.6) = 0.06.

Of interest may be the conditional probabilities Pr(*A*|*B*).

A method for calculating the conditional probabilities Pr(*A*|*B*) is by using Bayes' formula. The formula is based on the expression Pr(*B*) = [Pr(*B*|*A* is cold)Pr(*A* is cold)] + [Pr(*B*|*A* is hot)Pr(*A* is hot)], which simply states that the probability of a state of *B*, Pr(*B*), is the sum of the conditional probabilities of that state of *B* given that *A* is cold or is not cold. For independent events *A* and *B*, this is equal to Pr(*B*)Pr(*A* is cold) + Pr(*B*)Pr(*A* is hot) = Pr(*B*)(P(*A* is cold) + Pr(*A* is hot)) = Pr(*B*)(1) = Pr(*B*), since the probability of an event and its complement must always sum to 1. Bayes' formula is defined as follows:

$$\Pr(A|B) = \frac{\left[\Pr(B|A)\Pr(A)\right]}{\left[\Pr(B|A \text{ is odd})\Pr(A \text{ is odd}) + \Pr(B|A \text{ is not})\Pr(A \text{ is not})\right]}$$

Thus using the numerical example

$$\begin{aligned} \Pr(A \text{ is odd} \mid B \text{ is odd}) &= 0.9(0.6) / [0.9(0.6) + 0.4(0.4)] = 54/70, \\ \Pr(A \text{ is odd} \mid B \text{ is not}) &= 0.1(0.6) / [0.1(0.6) + 0.6(0.4)] = 6/30, \\ \Pr(A \text{ is not} \mid B \text{ is odd}) &= 0.4(0.4) / [0.9(0.6) + 0.4(0.4)] = 16/70, \\ \Pr(A \text{ is not} \mid B \text{ is not}) &= 0.6(0.4) / [0.1(0.6) + 0.6(0.4)] = 24/30, \\ \text{Sums} &: 1.0. \end{aligned}$$

#### **12.10 Marginal Distributions**

Summing the joint probabilities Pr(*A*, *B*) over all the possible *B* outcomes yields the marginal probability distribution of *A*. Thus, the probability of *A* being cold is the joint probability of both *A* and *B* being cold, 0.54, plus the joint probability of only *B* being hot, 0.06, which sums to 0.60. The probability of *A* being hot is the joint probability both *A* and *B* being hot, 0.24, plus the joint probability of *A* being hot and *B* being cold, 0.16, which sums to 0.40. Both sum to 1, as they should since *A* can only be cold or hot.

Similarly, for finding the probability of the different states of *B*.

$$\begin{aligned} \Pr(B \text{ is odd}) &= \Pr(B \text{ is odd and } A \text{ is odd}) + \Pr(B \text{ is odd and } A \text{ is not}) \\ &= 0.56 + 0.16 = 0.7 \end{aligned}$$

$$\begin{aligned} \Pr(B \text{ is hot}) &= \Pr(B \text{ is hot and A is cold}) + \Pr(B \text{ is hot and A is hot}) \\ &= 0.06 + 0.24 = 0.3 \end{aligned}$$

The general equation for finding single or multiple variable marginal distributions from joint probability distributions is by summing joint probabilities over all the values of the other variables.

$$\Pr(Y) = \sum\_{\mathbf{x}} \Pr(X, Y)$$

For example, let *X* and *Y* be two random variables denoting the outcome of two coin tosses. Their joint probability is Pr(*X*, *Y*). Since they are independent, Pr(*X*, *Y*) = Pr(*X*)P(*Y*) = (0.5)(0.5) = 0.25 for each combination of *X* and *Y*. Using these joint probabilities, the probability of *X* being Heads or Tails, Pr(*X*), is Pr(*X*, *Y* = Heads) + Pr(*X*, *Y* = Tails) = 0.25 + 0.25 = 0.5. Similarly, for finding the probability of any *Y* outcome, Pr(*Y*). One would sum the joint probabilities overall outcomes of *X*.

The same procedure applies to continuous random variables. For two continuous random variables *X* and *Y*, the probability of the outcome of *X* being within a specified range of x values is *f <sup>X</sup>*(*x*) = -*<sup>Y</sup> f XY* (*x, y*)*dy.*

#### **12.11 Pedestrian Safety**

Suppose that the probability of a person (or duck as in Fig. 12.7) being hit by a vehicle while crossing the road at a pedestrian crossing is to be computed. Let H be the discrete random variable that has two possible outcomes, 'hit' and 'not hit.' Let L be a discrete random variable taking on three possible crosswalk light values: red, yellow, and green.

Realistically, the probability of being hit when on the crosswalk will be dependent on the value of L. That is, Pr(H = Hit) and Pr(H = Not Hit) will take different values depending on whether L is red, yellow, or green. A person is, for example, far more likely to be hit by a vehicle when trying to cross when the crosswalk light is red instead of green. For any given possible pair of values for H and L, one must consider the joint probability distribution of H and L to find the probability of any pair of events H and L occurring together.

Of interest is the probability Pr(H = hit) when we do not know the value of L. In general, a pedestrian can be hit if the light is red or yellow or green but the probabilities of being hit will differ. In this case, the answer for the probability of H can be found by summing Pr(H|L) over all possible values of L, with each value of Pr(H|L) weighted by the probability of that value of L occurring.

**Fig. 12.7** Is it safe to cross the road? Robert McCloskey, *Make Way for Ducklings, The Viking Press* (1941). https:// en.wikipedia.org/wiki/ Make\_Way\_for\_Ducklings Creative Commons CC0 License


**Table 12.1** Conditional probability distributions, Pr(H|L), determined from data

**Table 12.2** Joint probabilities of H and L


Table 12.1 shows the conditional probabilities of being hit, depending on the state of the lights. (Note that the columns in this table must add up to 1 because the probability of being hit or not hit is 1 regardless of the state of the light.)

To find the joint probability distribution, we need to know what fraction of the times the light shows each color. These fractions can be considered to be their probabilities, P(L).

Assume that Pr(L = red) = 0.2, Pr(L = yellow) = 0.1, and P(L = green) = 0.7. Multiplying each conditional probability in each column by the probability of that light occurring, defines the joint probability distribution of H and L. These are given in the central 2×3 block of entries in Table 12.2 (Note that the cells in this 2×3 block add up to 1. The totals of the columns are the probabilities of the different values of L).

This analysis shows that if a pedestrian (or duck) pays no attention to the crosswalk light, the

$$\Pr\{H = Hit\} = 0.428$$

and the probably of making it across the road safely is

$$\Pr(H = Not \, Hit) = 0.572...$$

If the probability of being hit seems high, then perhaps one should pay attention to the crosswalk light before crossing the street. If crossing occurs only on the green, the probability of being hit is 0.02, as shown in Table 12.1.

#### **12.12 Sources of Uncertainty**

What makes a variable random and unpredictable? Three major causes are defined in Fig. 12.8.

Often there is little one can do to reduce all the uncertainty in the data available to analysts, and hence why so many policy models must explicitly deal with the existing uncertainties. The ways in which this can be done is what this chapter has attempted to introduce.

#### **Exercises**

1. Security

You have a job that requires you to be protected some of the time. The probability that the needed hours of protection, P, will be less than p is 0.2p–0.01p2. The cost of protection is \$50 each hour. What is the expected daily cost for your protection?

2. Probability of being flooded

The probability of a flood expected to be exceeded once in n years on average is called the n-year flood. What is the probability of observing at least one 100-year flood or greater over a 30-year period, assuming annual floods (maximum flow that occurs in a year) are independent events?

#### 3. State Lottery

You can buy lottery tickets from the State for \$1 each. Each ticket has a 3-digit number; each number is equally likely. Owners of winning tickets receive \$500 for each winning ticket.

**Fig. 12.8** Various causes of uncertainty

Suppose you buy 1 ticket each week of an entire year, i.e., 52 tickets.


Twice a year a town has a used book sale, and at the end of the sale, they offer any book they have for \$1. The cost of handling books is estimated to be about \$0.65 per book.

Past sales indicate that the probabilities of various ranges of books being demanded is as follows:


How many books should they have available to maximize their expected net revenue from the sale?

#### 5. Bake sale

The mayor of a town is considering having a \$100-dollar-a-plate dinner to increase the funds available for the homeless. Her problem is that she doesn't know how many people might come. Experience suggests that it largely depends on whether it rains or not. The local weather service has indicated that the probability of a dry day is 0.70.

Invitations must be sent out two weeks in advance of the dinner.

If it doesn't rain, there is an 80% chance that 500 people will attend and a 20% chance that only 300 will attend (just to make it simple). If it rains, there is a 60% chance that 350 will attend and a 40% chance that only 200 will attend. Each dinner ordered in advance costs \$20. Everyone that comes must be served dinner. Each additional dinner ordered because of a shortage cost \$30.

(a) How many dinners should the mayor order in advance of knowing how many will attend the dinner?


For the following probability density functions, fX(x), of a random variable X, integrate them to find the equations for the cumulative distribution functions, F(x), (ranging from 0 to 1), and the median, mean, and variance of each of the distributions. Finally, compute the area under the probability of exceedance function, 1 − F(x). It should equal the mean.

#### 7. Swimming

Assume that admission to a public outdoor swimming pool in an urban area costs \$5 per person. Also, assume the probability distribution of tickets sold per hour is uniform from 5 to 15, (as shown above in Exercise 6). Find the expected revenue per hour (You should be able to guess at the expected number of people buying tickets and that times \$5 will be the expected revenue).

#### 8. Planning a Park

A recreational park is being planned. It borders a lake. Planners need to decide at what lake level to build the recreational facilities such as docks, boat landings, picnic facilities, restrooms, etc. The potential benefits derived from locating all these facilities at higher lake level elevations increase due to the increasing shore-line perimeter (length) and flatter areas to develop.

The developers assume the marginal benefits obtained will equal \$5 per unit target elevation level if the actual lake is at that target level. But the lake level varies over the recreational season. No matter what target level is chosen for development, the actual lake level will likely differ. The developers estimate there will be a loss of \$7.5 per unit deficit (difference between target level and lower actual lake level) or a loss of \$1 per unit excess if the lake level is above the target level.

For example, if the target level is 5, but the actual level is 4, the net income will be \$5(5)-(5-4)7.5 = 17.5. If the actual level is 6, the net income will be \$5(5)-1(6-5) = 24.

Assume for simplicity the probability distribution of lake levels during the recreational season varies over a range of 0 to 10 units uniformly. What target level within that range from 0 to 10 will maximize expected net income?

Discuss a modeling approach you would use to find the best value of the target level, and demonstrate its use.

#### 9. Birthday problem

What is the probability P of at least two in a group of n people having the same birthday (month and day)? Write the expression for P.

#### 10. Heart Attacks

Serious heart attacks occur in a county on an average of once every two weeks but are random.


#### 11. Taxicab problem

Three taxi stands that are serviced by taxi companies: Sites A, B, and C.

Three policies have been tested but not analyzed:


Questions:


To answer the questions, you will need data.

#### Data

Average costs, C(ik), of policy k at site i and resulting trip count:



Average travel costs, TC(ij), between sites i and j

Average income Y(ijk), costs C(ik), and net income R(ijk), from site i, policy k, and destination j.


#### 12. Public Library

A town's public library needs more space. Recently, the town had to decide whether to relocate or renovate its public library. The old, and now empty, Woolworth Store was a potential new location. A Foundation indicated they would give the town \$2.5 million if they immediately chose the Woolworth Store. This gift would help pay the estimated relocation cost of \$9.5 million. It was not clear that the Foundation would give the \$2.5 million to the town if the town chose to renovate the existing library or to delay the relocation decision to first determine if the Woolworth Store could be rented.

The debate over what to do centered on the question of whether the Woolworth Store could be rented, and hence generate tax revenue for the town. If the library were moved to the old store, there would be no tax revenue derived from that store but there would be some income derived from the sale of the existing library building—if they could sell it.

Assume that when the Foundation made the offer, you were asked to help the town decide what to do.

You reason the town has some choices: It could decide to move its public library to the old Woolworth Store, or it could hire a consultant to evaluate the suitability of that store for another business and to obtain a better estimate of the likely income from the sale of the existing library building. If the town decides to move the library, the Woolworth relocation cost would be \$7 million (\$9.5 million less the Foundation gift of \$2.5 million) and take two years. If the town hires a consultant, the consultant will charge the town \$100,000 and require 6 months to make a recommendation. The benefits of a relocated or renovated library would be delayed by the additional 6 months required by the consultant.

If the consultant is hired and indicates the old Woolworth Store has no commercial value, then the relocation process could take place immediately, at a cost of \$7 million or \$9.5 million, depending on whether the Foundation gives the town \$2.5 million, less the expected income from the sale of the existing library building. On the other hand, if the consultant indicates the old store has commercial value, the town could act immediately to renovate the existing library, or it could wait and try to rent the store over the coming year. If, after a year, the store is not rented, the town would relocate the library. The relocation costs and time remain the same as before: \$7 million or \$9.5 million over two years, depending on whether the Foundation gives the town \$2.5 million, less the expected income from the sale of the existing library. In addition, the benefits of not having a new facility are further delayed by the waiting period, say a year.

Renovation of the existing library will take 2 years and cost \$13.5 million or \$11 million, again depending on the Foundation's \$2.5 million gift decision, less the expected capitalized tax revenues from the rental of the Woolworth Store (considering the possibility that it might not be rented).

If the town waits to see if it can rent the store, and succeeds in renting the store, say in a year, then it can begin the renovation of the existing library, again at a cost of \$13.5 million or \$11 million, depending on the Foundation's \$2.5 million gift decision, plus the lost benefits to the library users of delaying another year, less the capitalized (present value of the) tax revenues from renting the Woolworth Store.

Show how you would determine how to advise the town. Should the town relocate its library now or hire a consultant? What are your decision criteria? What probabilities do you need to estimate to answer this question? What other assumptions do you have to make? How would you determine how sensitive your recommendation is to all those assumptions?

#### 13. Immigrants

Suppose you are a designer of a facility to temporarily house immigrants entering the country. The number of immigrants needing housing in the facility each week varies. Data exist that allow you to calculate the probability distribution of the number of people needing housing each week. Let P represent the discrete random variable for the number of people needing housing, and Pr(p) be the probability that P = p. The sum over all p of Pr(p) equals 1.

Your job is to determine the target population level of your new facility, realizing that you may have more or less than that target level each week. Those running the facility will get paid a certain amount based on both the target capacity of the facility and the actual average number in the facility each week.

The revenue obtained from having an amount equal to the target population, T, are defined by the concave function R(T) as shown below. Note, if T were 20 and 20 people were housed, the benefits would equal –5 + 16(13) + 8(7). The –5 reflects fixed costs if the facility is built. If it is not built, T = 0 and R(T) = 0.

If the number of people in the facility is not equal to the target value T, there is a reduction in total net revenue. For each person less than the target, there is a loss of \$21. For each person in excess of the target, there is a loss of \$3.

The loss function is shown below. Note: Losses are a function of the deviations from the target population T and are assumed independent of the value of the target number, T.

For example, suppose the T is 20 and the actual number housed is 15. The total net benefits would equal R(T) − 21(20–15) = −5 + 16(13) + 8(7) − 21(5).

Develop a linear model that will find the value of the target number T that maximizes the expected total net revenue. Note: Total expected net revenue = revenue obtained from the target T less expected losses from deviations from target associated with each value p of P and its probability Pr(p). Show the model needed to determine the target T that maximizes total expected revenue.

#### 14. Licenses

The State allocates hunting licenses to a store that sells them for \$100 each. The demand for licenses is uniformly distributed between 10 and 30. At least 10 will be demanded and at most 30 will be demanded at that store.

(a) Define the expected income function associated with any allocation 'x' of hunting licenses. Sketch the function.

(b) Assume there are two stores, but the demand distribution at the other store is uniform between 5 and 15. If only 25 licenses are to be allocated, how many licenses should be allocated to each store that will maximize the total expected income.

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **13 Modeling Stochastic Processes**

#### **ABSTRACT**

Many public systems must deal with uncertain inputs over time. This chapter illustrates how models incorporating uncertain inputs over time can be developed and solved. Stochastic linear and dynamic programming models are developed to show the difference in output that define optimal sequential conditional decision making strategies.

#### **13.1 Introduction**

A stochastic process refers to a system whose outputs are random over time. The sequence of newly infected people with a particular disease in a city, the sequences of coin tosses, the daily flows in the Danube River at Vienna, or the number of customers seeking driver license renewals at a local motor vehicle office each weekday are all examples of stochastic processes. While we cannot predict the outcome of any stochastic process precisely, we may be able to predict the probabilities of various outcomes of systems as influenced by any decisions made affecting their operation.

The examples presented in this chapter will be limited to simple first-order discrete stochastic processes. These are defined by conditional probabilities of being in some state St+1 in period t+1 given the state St in period t. We cannot predict what future states may be, but we assume we can predict the probabilities of being in various future states based on the current state. These predictions, expressed as conditional probabilities, Pr(St+1 | St), may be based on historical time series data whose statistical characteristics may apply in the future as well. What is also implied by using conditional probabilities is that the probability of some state value St+1 in period t+1 is dependent only on the actual value of the state St in the previous period t and not on previous state values. Hence, the use of the term 'firstorder'. The validity of such an assumption may largely depend on the duration of the time periods being modeled.

<sup>©</sup> The Author(s) 2022

D. P. Loucks, *Public Systems Modeling*, International Series in Operations Research

<sup>&</sup>amp; Management Science 318, https://doi.org/10.1007/978-3-030-93986-1\_13

**Fig. 13.1** An example of a stochastic process involving uncertain outcomes over time. Public Domain. File:DJIA 2000s graph (log).svg, https://en.wikipedia.org/wiki/Dow\_Jones\_Industrial\_A verage#/media/File:DJIA\_2000s\_graph\_(log).svg

#### **13.2 Changing Weather**

For example, consider two types of weather, good, G, and bad, B. Based on the following sequence of 20 days of observations, GGGBBBBGGGBBBGGGBBBB, a matrix of conditional probabilities can be created. The rows of this matrix represent the possible values of the weather in day t, St, and the columns represent the possible values of the weather in the next day t + 1, St+1 (Fig. 13.2). Out of 19 transitions from one state to another in this time series, 6 were from Good to Good and 3 were from Good to Bad, for a total of 9 transitions from Good. From the state of Bad, 2 became Good the next day, and 8 remained in a Bad

**Fig. 13.2** Good weather days and bad weather days. They happen and are only temporary. Public domain. https://i.pinimg.com/origin als/e3/0c/21/e30c2162f96b f54a059876d092906358.jpg


**Fig. 13.3** The matrix of conditional or transition probabilities above resulting from the recorded time series of good and bad days. It is called a first-order Markov chain whose rows sum to 1

state. Dividing each number of transitions from a Good state by the total number of transitions from Good, and the same for transitions from a Bad state defines the conditional probabilities that must sum to 1 on each row of the matrix. These conditional probabilities are also called transition probabilities—the probability of making a transition from one state in period t to another state in the next period, t + 1.

Using these conditional probabilities, shown in Fig. 13.3, one can compute the probabilities of having a good or bad day in successive days t+1, t+2, t+3… given the current state of the weather in day t.

$$\begin{aligned} \Pr(\text{G in t}+\text{l}) &= \Pr(\text{G in t})\Pr(\text{G in t}+\text{l}|\text{G in t}) \ &+ \Pr(\text{B in t})\Pr(\text{G in t}+\text{l}|\text{B in t}),\\ &\text{t } &= 1, 2, 3, 4, \dots \end{aligned}$$

$$\begin{aligned} \Pr(\mathsf{B} \text{ in } \mathsf{t} + \mathsf{l}) &= \Pr(\mathsf{G} \text{ in } \mathsf{t}) \Pr(\mathsf{B} \text{ in } \mathsf{t} + \mathsf{l} | \mathsf{G} \text{ in } \mathsf{t}) + \Pr(\mathsf{B} \text{ in } \mathsf{t}) \Pr(\mathsf{B} \text{ in } \mathsf{t} + \mathsf{l} | \mathsf{B} \text{ in } \mathsf{t}), \\ &\quad \mathsf{t} = 1, 2, 3, 4, ... \end{aligned}$$

Eventually, the predicted probabilities will not change significantly from one day to the next, as one would expect. The probability of the state of weather a month from now is not likely to be influenced by the weather today.

#### **13.3 The Stock Market**

For another example, consider successive states of the stock market. Assume the stock market can be in one of three states: 1 = bear market. 2 = strong bull market. 3 = weak bull market. Historically, a certain mutual fund gained –3%, 28%, and 10% annually when the market was in states 1, 2, and 3, respectively. The state transition matrix defining each P(Sy+1|Sy) is shown in Fig. 13.4.

Referring to these conditional or transition probabilities, we can determine what the probabilities of future states may be given the present state, as shown in Fig. 13.5. Assume the present state, S1, is 1.

The process shown in Fig. 13.5 continues until it converges to 0.333, 0.200, and 0.467 for states 1, 2, and 3, respectively. These are termed steady-state values that do not change in subsequent periods. They are the unconditional probabilities of

each state, and as one might guess, they are not influenced by the starting state in period 1. The state of this mutual fund 10 years from now will not likely depend on what it is now. These same steady-state values will result from any assumed state in year 1.

These steady-state values can be computed directly using the same equations used to compute successive probabilities as shown above but with unknown probabilities of each given state.

Thus, for this example, solving at least two of following three equations:

$$\begin{aligned} \Pr(\mathbf{S} = \mathbf{l}) &= \Pr(\mathbf{S} = \mathbf{l})(0.90) + \Pr(\mathbf{S} = \mathbf{2})(0.05) + \Pr(\mathbf{S} = \mathbf{3})(0.05), \\\\ \Pr(\mathbf{S} = \mathbf{2}) &= \Pr(\mathbf{S} = \mathbf{l})(0.02) + \Pr(\mathbf{S} = \mathbf{2})(0.85) + \Pr(\mathbf{S} = \mathbf{3})(0.05), \\\\ \Pr(\mathbf{S} = \mathbf{3}) &= \Pr(\mathbf{S} = \mathbf{l})(0.08) + \Pr(\mathbf{S} = \mathbf{2})(0.10) + \Pr(\mathbf{S} = \mathbf{3})(0.90), \end{aligned}$$

together with the equation expressing the fact that Pr(S=1) + Pr(S=2) + Pr(S=3) = 1 will determine the steady-state values of each Pr(S), namely 0.333, 0.200, and 0.467 for S = 1, 2, and 3, respectively.

In general, for any Markov chain having rows i and columns j with transition probabilities TP(Sj|Si),

$$\Pr(\mathbf{S}\_{\mathbf{j}}) = \sum\_{\mathbf{i}} \Pr(\mathbf{S}\_{\mathbf{i}}) \Pr(\mathbf{S}\_{\mathbf{j}} | \mathbf{S}\_{\mathbf{i}}) \text{ \textquotedbl{}y\textquotedbl{}}$$

$$\sum\_{\mathbf{i}} \Pr(\mathbf{S}\_{\mathbf{i}}) = 1.$$

Using the unconditional steady-state probabilities, Pr(Si), (such as found by solving the above equations) the expected annual yield is

$$-3(0.333) + 28(0.2) + 10(0.467) = 9.3\%/\text{year}.$$

The expected yield, i10, over 10 years <sup>=</sup> (1.093)10 <sup>−</sup> <sup>1</sup> <sup>=</sup> 2.4333 <sup>−</sup> 1 or 143% Hence, investing \$1 in this mutual fund, one can expect to have \$2.43 in 10 years.

#### **13.4 Human Health**

The state of one's health is also a stochastic process. Consider for this example four discrete states of health. Using data from the public health department, the following Markov chain shows the conditional probabilities of an average person being in any state of health given a previous state (Fig. 13.6).

We can use Excel, for example, to find the progression of state probabilities from some assumed initial state, solving successive equations:

$$\Pr(\mathbf{S\_j})\_{\mathbf{i}+\mathbf{l}} = \sum\_{\mathbf{i}} \Pr(\mathbf{S\_i})\_{\mathbf{l}} \text{TP}(\mathbf{S\_j}|\mathbf{S\_i}) \text{ \forall j} \ \mathbf{t} \ = 2, 3, 4, ...$$

Alternatively, we can find the steady-state probabilities of being in any state of health by solving

$$\Pr(\mathbf{S\_j}) = \sum\_{\mathbf{i}} \Pr(\mathbf{S\_i}) \Pr(\mathbf{S\_j}|\mathbf{S\_i}) \text{ \textquotedbl{}j\$}$$

$$\sum\_{\mathbf{i}} \Pr(\mathbf{S\_i}) = 1$$

directly for the steady-state probabilities Pr(Sj) for each Sj.

These steady-state probabilities are shown in Table 13.1.

Next consider another state of health: death. Assume the Markov chain defining the transition probabilities for states of health is as shown in Fig. 13.7.

Solving the same set of equations as shown above defines the steady-state probabilities for these five states of health. They are as expected. They all are 0, except death. Its steady-state probability is 1. Such is life (or rather death). In the long run, we all are certain to die. Once dead we cannot transition to another state of health (as far as we know). Mathematicians call this a trapping state. Once in it, you cannot get out.



#### **13.5 Reducing Crime**

This is an example of building stochastic linear and dynamic programming optimization models incorporating transition probabilities.

A community center provides recreation facilities for people. The impact on the community is lower crime rates. Assume, again for simplicity, there are two states of crime rates—low (L) and high (H). Observed crime rates over time show that if the crime rate is low in any month, the probability of having a low rate the following month is 0.7. The probability of having a high crime rate month following a low crime rate month is 0.3. If the crime rate is high in a month, the probability of a high crime rate the following month is 0.6, and thus, the probability of a low crime rate is 0.4. These probabilities apply if the community center does not advertise its services and facilities. This is the do-nothing policy. (Policy n). These conditional probabilities are shown on the left of Fig. 13.8.

However, if the center advertises its recreation programs (Policy a), the conditional probabilities change to those shown on the right of Fig. 13.8.


There are costs involved in advertising as well as additional costs associated with high crime rates. These costs, denoted as C(j,k) associated with crime rate j and policy k, are listed in Table 13.2.

The objective is to find the policy associated with each state that minimizes the expected value of the monthly total cost. Letting the unknown joint probability of any combination of crime rates i followed by j, and policy k, be Pr(i,j,k), then the objective can be written as the sum over all values of i, j, and k, of the associated costs, C(j.k), times their joint probabilities, Pr(i,j,k):

$$\text{Minimize } \sum\_{\mathbf{i}} \sum\_{\mathbf{j}} \sum\_{\mathbf{k}} \mathbf{C}(\mathbf{j}, \mathbf{k}) \Pr(\mathbf{i}, \mathbf{j}, \mathbf{k}).$$

To determine the steady-state values of each joint probability Pr(i,j,k), we can first define the marginal probabilities Pr(j,k) by summing the joint probabilities Pr(i,j,k) over all initial crime rates i.

$$\Pr(\mathbf{j}, \mathbf{k}) = \sum\_{\mathbf{i}} \Pr(\mathbf{i}, \mathbf{j}, \mathbf{k}) \,\forall \mathbf{j}, \mathbf{k}.$$

Each joint probability Pr(i,j,k) equals Pr(i,k) at time t times the known transition probability, TP(i,j,k), of state j at time t+1 given state i in period t and policy k.

$$\Pr(\mathbf{i}, \mathbf{j}, \mathbf{k}) = \Pr(\mathbf{i}, \mathbf{k}) \operatorname{TP}(\mathbf{i}, \mathbf{j}, \mathbf{k}) \,\forall \mathbf{i}, \mathbf{j}, \mathbf{k}.$$

Combining these two equations

$$\Pr(\mathbf{j}, \mathbf{k}) = \sum\_{\mathbf{i}} \Pr(\mathbf{i}, \mathbf{j}, \mathbf{k}) \operatorname{TP}(\mathbf{i}, \mathbf{j}, \mathbf{k}) \,\forall \mathbf{j}, \mathbf{k}$$

and together with

$$\Pr(\mathbf{i}) = \sum\_{\mathbf{k}} \Pr(\mathbf{i}, \mathbf{k}) \,\,\forall \mathbf{i}$$

defining the steady-state probabilities of each crime state and <sup>i</sup> Pr*(*i*)* = 1.


This defines a linear optimization model that when solved will give us the optimal policy k depending on the state of crime as well as the minimum monthly expected total cost.

For each state i, the policy k whose joint probability Pr(i,k) (either Pr(i,n) or Pr(i,a)) is non-zero will be the best policy. Its conditional probability, Pr(k|i), will equal 1. Otherwise, it will equal 0 unless it doesn't matter what policy is chosen.

$$\Pr(\mathbf{k}|\mathbf{i}) = \Pr(\mathbf{i}, \mathbf{k}) / \Pr(\mathbf{i}) .$$

The solution of this model is

Objective value: Minimum monthly expected cost = 8.33.

Pr(L) = 0.667 = steady-state probability of low crime rate if optimal policy followed.

Pr(H) = 0.333 = steady-state probability of high crime rate if optimal policy followed.

Pr(L, n) = 0.667 implies that if in state L, do not advertise.

Pr(L, a) = 0.0 implies that if in state L, do not advertise.

Pr(H, n) = 0.0 implies that if in state H, advertise.

Pr(H, a) = 0.333 implies if in state H, advertise.

These values are derived from the values of the joint probabilities Pr(i,j,k) listed in Table 13.3.

An alternative linear programming model based on Fig. 13.8 is perhaps more straightforward. Let the probability Pr(State, policy), denoted here as PLn and PLa, be the indicator of the best policy given the state. Again, the one that is non-zero indicates the best policy. The probabilities of the states, Pr(L) and Pr(H), denoted as PL and PH in the model below, result if the optimal policy is followed.

Minimize PLn∗- TPLLn∗CL + TPLHn∗CH + PLa∗- A + TPLLa∗CL + TPLHa∗CH + PHn∗- TPHLn∗CL + TPHHn∗CH + PHa∗- A + TPHLa∗CL + TPHHa∗CH *.*


PL = - PLn∗TPLLn + PHn∗TPHLn + - PLa∗TPLLa + PHa∗TPHLa ;

PH = - PLn∗TPLHn + PHn∗TPHHn + - PLa∗TPLHa + PHa∗TPHHa ;

```
PL + PH = 1;
```

$$\text{PL} = \text{PLn} + \text{PLa} \text{ :}$$

$$\text{PH} = \text{PHn} + \text{PHa}.$$

Transition probabilities: TPLLn = 0.7; TPLLa = 0.8; TPLHn = 0.3; TPLHa = 0.2; TPHLn = 0.4; TPHLa = 0.6; TPHHn = 0.6; TPHHa = 0.4. Costs: CL = 0; CH = 20; advertising cost A = 5. The solution to this model is Objective value: 8.333333.


The two models containing probabilities as unknown variables presented above are solved using linear programming. From the values of these probabilities, we can identify the best policy given any state of the system. One can also use stochastic dynamic programming to find the best advertising policy directly given the current crime state. Each stage of the network is as shown in Fig. 13.9. The network clearly shows that no matter what policy is chosen, the ending states remain random.

Using dynamic programming, we need to compute the minimum expected cost of all remaining months at each node or state for each successive remaining month m. Let Fm(S) represent that value for any state S (L or H) and the remaining number of months m. Working backwards from right to left and beginning with F0S) = 0,

$$\mathcal{F}\_1(\mathcal{L}) = \min \left\{ \left[ 0.7 \mathcal{F}\_0(\mathcal{L}) + 0.3 (\mathcal{F}\_0(\mathcal{H}) + 20) \right]\_\mathbf{u}, \left[ (\mathcal{S} + 0.8 \mathcal{F}\_0(\mathcal{L})) + (\mathcal{S} + 0.2(20 + \mathcal{F}\_0(\mathcal{H}))) \right]\_\mathbf{u} \right\}$$

= min *(*6*,* 9*)* = 6*.*

The best policy given state L with one month remaining is not to advertise.

F1*(*H*)* = min{[0*.*4F0*(*L*)* + 0*.*6*(*F0*(*H*)* + 20*)*]n*,* [*(*5 + 0*.*6F0*(*L*))* + *(*5 + 0*.*4*(*20 + F0*(*H*))*]a} = min *(*12*,* 13*)* = 12*.*

Again, the best policy given state H with one month remaining is not to advertise.

Continuing backward, the general recursion equations for each successive remaining month m are:

$$\mathcal{F}\_{\mathsf{m}+1}(\mathsf{L}) = \min\{ \| 0.7 \mathcal{F}\_{\mathsf{m}}(\mathsf{L}) + 0.3(\mathcal{F}\_{\mathsf{m}}(\mathsf{H}) + 20) \}\_{\mathsf{u}}, \{ (\mathsf{S} + 0.8 \mathcal{F}\_{\mathsf{m}}(\mathsf{L})) + (\mathsf{S} + 0.2(20 + \mathcal{F}\_{\mathsf{m}}(\mathsf{H})))\_{\mathsf{u}} \};$$

$$\mathcal{F}\_{\mathsf{m}+1}(\mathsf{H}) = \min\{ \| 0.4 \mathcal{F}\_{\mathsf{m}}(\mathsf{L}) + 0.6(\mathcal{F}\_{\mathsf{m}}(\mathsf{H}) + 20) \}\_{\mathsf{u}}, \{ (\mathsf{S} + 0.6 \mathcal{F}\_{\mathsf{m}}(\mathsf{L})) + (\mathsf{S} + 0.4(20 + \mathcal{F}\_{\mathsf{m}}(\mathsf{H})))\_{\mathsf{u}} \}.$$

The process can stop when the minimum cost policies k (decisions n or a) remain the same for the same state in two successive months or when the differences Fm+1(S) – Fm(S) equal the same constant for both values of S. This constant in this example will be the minimum monthly expected cost, 8.33.

The results from solving a succession of 10 recursive equations for each state are given in Table 13.4. Instead of using subscripts for the remaining months m, that value will be included in the function. For example, Fm(S) is shown as F(S,m) and F(S,m) = mink Fm(S,k).

This expected monthly cost of 8.33 can be compared to the monthly expected cost if one decided not to advertise. The difference of the two expected cost values would identify the expected monthly benefits of adopting the optimal advertising policy (i.e., only advertise if in state H). The non-advertising expected monthly cost can be determined by solving the sequence of recursive equations:

$$\mathcal{F}\_{\rm m+1}(\mathcal{L}) = 0.7\mathcal{F}\_{\rm m}(\mathcal{L}) + 0.3(\mathcal{F}\_{\rm m}(\mathcal{H}) + \mathcal{D})\\ \text{where } \mathcal{F}\_{\rm 0}(\mathcal{L}) = 0,$$

Fm+1*(*H*)* = 0*.*4Fm*(*L*)* + 0*.*6*(*Fm*(*H*)* + 20*)*where F0*(*H*)* = 0*,*


**Table 13.4** Selected model solutions showing minimum expected costs given rate of crime and months remaining

until the difference Fm+1(S) - Fm(S) equals the same constant for each value of the crime state S.

Rounding to the nearest tenth,

$$\begin{aligned} \text{F\_1(L)} &= 0.7(0) + 0.3(0 + 20) = 6. \\ \text{F\_1(H)} &= 0.4(0) + 0.6(0 + 20) = 12. \\ \text{F\_2(L)} &= 0.7(6) + 0.3(12 + 20) = 12. \\ \text{F\_2(H)} &= 0.4(6) + 0.6(12 + 20) = 21.6. \\ \text{F\_3(L)} &= 0.7(12) + 0.3(21.6 + 20) = 20.9. \\ \text{F\_3(H)} &= 0.4(12) + 0.6(21.6 + 20) = 29.8. \\ \text{F\_4(L)} &= 0.7(20.9) + 0.3(29.8 + 20) = 29.6. \\ \text{F\_4(H)} &= 0.4(20.9) + 0.6(29.8 + 20) = 38.2. \\ \text{F\_5(L)} &= 0.7(29.6) + 0.3(38.2 + 20) = 38.2. \\ \text{F\_5(H)} &= 0.4(29.6) + 0.6(38.2 + 20) = 46.8. \end{aligned}$$

Note the difference F5(L) – F4(L) = 8.6 and the difference F5(H) – F4(H) = 8.6, and thus, the expected additional benefits from advertising are 8.6 – 8.3 = 0.3.

Finally, given any policy, optimal or not, one can compute the probabilities of being in any state. For this problem in which advertising is only implemented when in a high crime state, the transition probabilities from one state to another are shown in Fig. 13.10.

Solving for the steady-state probabilities of L and H

$$\begin{aligned} \Pr(\mathcal{L}) &= \Pr(\mathcal{L}) 0.7 + \Pr(\mathcal{H}) 0.6 \text{ or } \Pr(\mathcal{H}) = \Pr(\mathcal{L}) 0.3 + \Pr(\mathcal{H}) 0.4\\ \text{and } \Pr(\mathcal{L}) + \Pr(\mathcal{H}) &= 1 \end{aligned}$$


results in

$$\begin{aligned} \Pr(\text{L}) &= 0.667 \text{ and} \\ \Pr(\text{H}) &= 0.333, \end{aligned}$$

as previously determined using the linear model involving unknown joint probabilities.

This illustrates that one can obtain both operating policies (k given S) and state probabilities (Pr(S)) solving either linear or dynamic programming models of this or similar stochastic optimization problems. In one case, we find the optimal joint probabilities of states and policies and derive the operating policies from them. In the other case, we find the optimal policies and derive their joint probabilities. Neat! (Fig. 13.11).

**Fig. 13.11** The game of squash racquets, another example of a stochastic process

#### **Exercises**

1. Predicting weather.

The mayor is considering having a \$100-dollar a plate dinner to increase the funds available for the homeless. His problem is that he doesn't know how many people might come. Experience suggests the attendance largely depends on whether it rains or not.

The probability of a dry day depends on the past day's condition. The local weather service has provided the following conditional probabilities of dry and wet days:


Invitations must be sent out at least two weeks in advance.


You are given an opportunity to begin with an investment of \$1 in a succession of gambles where in each iteration there is a 90% chance of doubling your money and a 10% chance of losing all the money won plus your initial \$1. You can quit playing at any time. What are your expected earnings and the probability of having them for successive iterations, and when, and why, would you stop playing?

3. Crime Reduction

A community center provides recreation facilities for young people. Among the benefits to the community are lower crime rates. Assume there are two states of crime rates—low (L) and high (H). Observed crime rates over time show that if the crime rate is low in any month, the probability of having a low rate the following month is 0.5. The probability of having a high-rate month following a low-rate month is 0.5. If the crime rate is high in a month, the probability of a high rate the following month is 0.9, and thus, the probability of a low rate next month is 0.1. These probabilities apply if the community center does not advertise. This is the 'do-nothing' policy. (Policy n). These conditional probabilities are shown in Fig. 1. However, if the center advertises its recreation programs, (policy a) the conditional probabilities change to those shown in Fig. 2.

The community center can change its policy at the beginning of each month. The high crime month costs 20 more than the low crime month, and advertising costs 10 per month.


Show how you would determine what policy to implement following each type of month (low or high crime rate) to minimize the total expected cost of crime and advertising expense.

Hint: You can use dynamic programming along with the network below if you wish. Work backward. Stop when the minimum cost policies (decisions) remain the same in two successive months.

Solve for the steady-state policy that doesn't change given the state (H or L) over time. You solve the problem represented by the network above, using dynamic programming or linear programming where the variables are the joint probabilities of states and decisions.

4. You are considering a 3-day trail maintenance project in a state park. The weather for the last 10 days has been the following:

Good, Good, Good, Bad, Bad, Good, Good, Bad, Good, Good.


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

### **14 Chance Constrained and Monte Carlo Modeling**

#### **ABSTRACT**

Constraints of models that contain random variables may be applicable only some of the time. Constraints that apply only a specified fraction of the time are called chance constraints. This chapter illustrates how chance constraints can be included in optimization models. In addition, the chapter demonstrates how to generate values of random variables fitting user defined probability distributions. These random variable values often serve as inputs to stochastic simulation models.

#### **14.1 Chance Constraints**

In the previous chapters where constraints were developed for various optimization models, for the models to have a feasible solution, all the constraints had to be met all the time. Consider a situation in which forcing them to be met all the time in a model may be unrealistic. For example, suppose the problem involves allocating resources to a potential user and the supply of resources, R, available to allocate is random. If the potential user is planning to invest in equipment to be able to convert those allocated resources to benefits, the question is just how many resources should the user base his or her investment decision on. How many resources should the user plan on receiving when the user knows the actual allocations may vary over time? If the user expects 100% reliable resource allocations, then such allocations would be the minimum level of resources available for allocation even though most of the time the allocations could be greater. In such cases, the user may be missing out on the opportunity to generate more benefits most of the time when more resources are available. The problem is to decide how many resources the user should plan on getting. This involves a tradeoff between the benefits generated and the reliability of those benefits.

Consider the constraint of staying well and avoiding an infectious virus. To guarantee meeting that constraint may involve measures, such as complete isolation in a sterile environment, that few would want to take. Doing less than that involves some risk, the amount depending on what measures are not taken. Again, a tradeoff exists between say the degree of freedom from virus protection measures and the probability of getting sick.

These are two examples where the constraints specified in a model may include their reliabilities. Such constraints involve random variables whose distributions are either known or can be calculated. Hence, in general, if a constraint g(*X*) is to be no greater than some random variable R P%, of the time, it is called a chance constraint and is written as

$$\Pr(\mathbf{g}(X) \le \mathbf{R}) \ge \mathbf{P}.$$

Models that include them are called chance constrained models. But before such models can be solved, these chance constraints must be converted to their deterministic equivalents. Referring to the sketch of the cumulative distribution in Fig. 14.1, one can see how this is done for the example chance constraints when P, expressed as a fraction, is 0.9.

In this sketch, the horizontal axis represents possible values r of the random variable R. The vertical axis represents values of the cumulative probability distribution of the random variable R. Like all cumulative distributions, the values range from 0 to 1 and represent the probability of any specific value of r being greater than an outcome of R. Pr(r ≥ R). Hence, by definition,

$$\Pr(\mathbf{r}^{0.1} \le \mathbf{R}) = 0.9 \qquad \text{or} \qquad \Pr(\mathbf{r}^{0.1} \ge \mathbf{R}) = 0.1$$

since there is a 10% chance that the outcome of R will be less than r0.1;

$$\Pr(\mathbf{r}^{0.9} \le \mathbf{R}) = 0.1 \qquad \text{or} \qquad \Pr(\mathbf{r}^{0.9} \ge \mathbf{R}) = 0.91$$

since there is a 90% chance that the outcome of R will be less than r0.9.

Thus, to define the deterministic equivalent of Pr(x ≥ R) ≥ 0.9, we need to ask what values of x will exceed the outcome of the random variable at least 90% of the time. What value of r is a lower limit of x? If we set

$$\mathbf{x} \ge \mathbf{r}\_{0.9},$$

this will ensure that x will be greater than the outcome of R at least 90% of the time. The value r0.9 is the lower limit of x. This expression is the deterministic equivalent of Pr(x ≥ R) ≥ 0.9.

$$\Pr(\mathbf{x} \ge \mathbf{R}) \ge 0.9 \equiv \mathbf{x} \ge \mathbf{r}^{0.9}.$$

Similarly,

$$\Pr(\mathbf{x} \le \mathbf{R}) \ge 0.9 \equiv \mathbf{x} \le \mathbf{r}^{0.1}.$$

Knowing the cumulative distribution values associated with any value r, the calculation of the values r0.1 and r0.9 can be determined. Assume the value of the cumulative probability distribution is r/(1+r). It is 0.1 when r is r0.1, 0.1 <sup>=</sup> r 0.1/(1+r0.1) or r0.1 <sup>=</sup> 1/9. Likewise, 0.9 <sup>=</sup> <sup>r</sup> 0.9/(1+r0.9) or r0.9 <sup>=</sup> 9. Thus,

$$\begin{aligned} \Pr(\mathbf{x} \ge \mathbf{R}) \ge 0.9 &\equiv \mathbf{x} \ge 9; \\ \Pr(\mathbf{x} \le \mathbf{R}) \ge 0.9 &\equiv \mathbf{x} \le 1/9. \end{aligned}$$

Note that multiplying both sides of any chance constraint by –1 reverses its inequality. For example,

$$\Pr(\mathbf{x} \ge \mathbf{R}) \ge 0.9 \equiv -\Pr(\mathbf{x} \ge \mathbf{R}) \le -0.9\dots$$

When adding one to both sides of the constraint, it becomes

$$1 - \Pr(\mathbf{x} \ge \mathbf{R}) \le 1 - 0.9 \equiv \Pr(\mathbf{x} \le \mathbf{R}) \le 0.1.$$

Hence,

$$\Pr(\mathbf{x} \ge \mathbf{R}) \ge 0.9 \equiv 1 - \Pr(\mathbf{x} \ge \mathbf{R}) \le 1 - 0.9 \equiv \Pr(\mathbf{x} \le \mathbf{R}) \le 0.1 \equiv \mathbf{x} \ge \mathbf{r}^{0.9}.$$

$$\Pr(\mathbf{x} \le \mathbf{R}) \ge 0.9 \equiv \Pr(\mathbf{x} \ge \mathbf{R}) \le 0.1 \equiv \mathbf{x} \le \mathbf{r}^{0.1}.$$

$$\Pr(\mathbf{x} \le \mathbf{R}) \le 0.9 \equiv \Pr(\mathbf{x} \ge \mathbf{R}) \ge 0.1 \equiv \mathbf{x} \ge \mathbf{r}^{0.1}.$$

$$\Pr(\mathbf{x} \ge \mathbf{R}) \le 0.9 \equiv \Pr(\mathbf{x} \le \mathbf{R}) \ge 0.1 \equiv \mathbf{x} \le \mathbf{r}^{0.9}.$$

To summarize, the deterministic equivalent of the chance constraint Pr(f(x) ≤ R) ≥ P is f(x) ≤ r where the value of the random variable r is defined by the exceedance distribution function 1 – FR(r) = Pr(r ≤ R) when it equals P. Likewise, the deterministic equivalent of the chance constraint Pr(f(x) ≥ R) ≥ P is f(x) ≥ r where r is defined by the cumulative distribution function FR(r) = Pr(r ≥ R) when it equals P.

Setting diffèrent values of P and finding the associated x, and hence the benefits obtained from x, provides the tradeoff between the benefits and their reliability that the user can consider when making an investment decision.

#### **14.2 Monte Carlo Sampling**

Consider a simulation model of a system that has random inputs as shown in Fig. 14.2. The system could be a hospital having patients entering and leaving, or a toll booth servicing arriving traffic, or a reservoir with entering flows, or people entering and leaving a public library, etc. To simulate such systems, we need values of those random inputs. If we know or assume the probability distributions of those random variables, Monte Carlo sampling methods are ways of obtaining values of these random variable inputs that fit the distributions from which they came.

To illustrate, consider the random variable R whose cumulative distribution is as shown in Fig. 14.1. Its cumulative distribution, FR(r), is r/(1+r).

Except for a few commonly used distributions, computer programs such as Excel are not able to generate a series of random variable values that fit some arbitrary probability distribution. But they are commonly able to generate a uniformly distributed series of random variable values p ranging from 0 to 1. If these p values are values of a cumulative probability distribution of R, the corresponding values r of the random variable R can be computed. For example, if

$$\mathbf{F}\_{\mathsf{R}}(\mathbf{r}) = \mathbf{p} = \mathbf{r} \textsf{'} (1 + \mathbf{r}), \text{ then } \mathbf{r} = (1 + \mathbf{r})\mathbf{p}, \text{or } \mathbf{r} = \mathbf{p} \textsf{'} (1 - \mathbf{p}).$$

This is the inverse, FR –1(p), of the cumulative distribution, FR(r). It is used to find r given p instead of finding p given r. The values of r associated with the uniformly distributed p values will fit the cumulative probability distribution of R. They will not exceed the limits of the distribution and will have approximately the same mean and variance and median as the original distribution given a sufficient number of samples.

Assume it is of interest to find the probability that a random variable value x exceeds a particular threshold. The cumulative probability distribution of X, FX(x) = (x – 5)/10, where the values of the random variable X range uniformly from 5 to 15.

To generate random values of *x* that fit the uniform distribution whose cumulative distribution is shown in Fig. 14.3, we can first generate a set of random uniformly distributed values of *p*, representing values of FX(*x*), and corresponding

**Fig. 14.3** Cumulative probability distribution of a random variable X having a uniform distribution fX(*x*) = 0.1 from *x* = 5 to 15

**Fig. 14.4** Examples of finding the inverses of cumulative distributions so that values of the random variable *x* drawn from their probability distributions can be determined from uniformly distributed random numbers *p* ranging from 0 to 1

*x* values, *x* = 5 + 10*p*. Then we can include in the simulation a counter, keeping track of the number of *x* values exceeding a given threshold, say 14. Clearly, the values of *x* generated that exceed 14 should be about 10% of the samples generated. In one such simulation of 100 samples, the percent was 11. More samples might lead to a more precise estimate. This is easily accomplished using Excel.

Figure 14.4 illustrates various density and cumulative distributions and their inverses needed to draw samples from those distributions.

The function RAND() in Excel can be used to generate the uniformly distributed (equally likely) random values of *p*. Knowing any *p* value, the inverse function FX –1(*p*) can be used to find the corresponding value of *x*.

#### **14.3 Another Example**

Consider a symmetric triangular probability density function that ranges from 0 to 10 whose mean and most likely value is 5**.** This density and its cumulative distribution function are sketched in Fig. 14.5.

**Fig. 14.5** Probability and cumulative distribution of a triangular distributed random variable

Note that –1 <sup>+</sup> 0.4*<sup>x</sup>* – 0.02*x*<sup>2</sup> <sup>=</sup> 1 – 0.02(10 – *<sup>x</sup>*) 2. Therefore, *<sup>x</sup>* <sup>=</sup> 10 – ((1 – *<sup>p</sup>*)/0.02)0.5 for 0.5 <sup>≤</sup> *<sup>x</sup>* <sup>≤</sup> 10.

Using this cumulative distribution function, any value of the cumulative distribution function, *p*, can be converted to a value of the random variable, *x*, having a symmetric triangular distribution.

$$\begin{array}{l} \mathbf{x}(t) = (p(t)/0.02)^{0.5}, & \text{if } (p(t) \le 0.5), \\ = 10 - (1 - p(t)/0.02)^{0.5} & \text{otherwise.} \end{array}$$

Using the above equations, sets of random uniformly distributed values of *p* representing cumulative distribution values ranging from 0 to1 were generated along with their corresponding *x* values that have this triangular probability distribution.

Of interest here is how the mean and variance of all the x(t) values compare to the true mean and variance of the triangular distribution. Given a sample size of n,

$$\begin{aligned} \text{mean} &= \left(\sum\_{1}^{n} \boldsymbol{\chi}(t)\right) / \mathbf{n};\\ \text{variance} &= \left(\sum\_{1}^{n} \left(\boldsymbol{\chi}(t) - \text{mean}\right)^{2}\right) / \mathbf{n} \end{aligned}$$

The comparisons are shown in Table 14.1. One way to generate uniformly distributed random numbers from 0 to 1 is shown in Fig. 14.6. Just subtract 2 from their sum and divide by 10.

#### **Exercises**

1. Consider an 'allocation problem', but with chance constraints on meeting random demands Dj at demand sites j. For example, if you wanted your allocation Aj to


user j to meet or exceed the user's demand Dj at least 95% of the time, the chance constraint is

$$\Pr\{\mathcal{A}\_{\mathbf{j}} \ge D\_{\mathbf{j}}\} \ge 0.95.$$

The deterministic equivalent is

Aj <sup>≥</sup> d0*.*<sup>95</sup> <sup>j</sup> where d0*.*<sup>95</sup> <sup>j</sup> is the demand that is exceeded only 5% of the time.

Assume the cumulative distribution of demand d is d/(1+d). This is the probability that the actual random demand will be less than d. When d is 0, the cumulative probability is 0. There is no probability that the actual demand will be less than 0. As d increases, the probability that the random actual demand will be equal or less than d approaches 1. Therefore, dj 0.95, the demand that will be exceeded only 5% of the time, can be computed. The actual allocation, Aj, must be at least this amount to satisfy the demand at least 95% of the time.

The demand (dj 0.95) whose probability of being at least equal to the actual demand 95% of the time is determined by setting the cumulative distribution to 0.95.

$$0.95 = \text{d}/(\text{l} + \text{d}); \text{d} = 0.95 + 0.95 \text{d}; \text{thus, d} = 0.95/0.05 = 19.1$$

Hence, the deterministic equivalent of the chance constraint is Aj ≥ 19. (a) Define the deterministic constraints for the following:

	- (a) Show how you would generate equally likely values of the random variable X that has the following probability distribution:

Show how to compute the mean or expected or average value, and the variance, of n discrete x(t) values randomly generated from this probability distribution.

4. Consider a random variable X that has the following discrete probability distribution, ranging from 2 to 5.


Example: If 20 trucks are available (the target) and only 18 are needed, the net income is 20(600) – 2(800). If 22 trucks are required, the net income is 20(600) – 2(200).


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **15 Simulation Modeling**

#### **ABSTRACT**

An introduction to deterministic and stochastic system simulation modeling and various statistical measures of their outputs.

#### **15.1 Introduction**

Simulation methods address 'what if' questions. Given a set of assumed values assigned to all decision variables and parameters in a model of some system, and given the set of assumed external inputs, a simulation of the system produces model outputs that can be used to compare with other simulations based on other sets of assumed values in the search for the 'best' system decision variable values. Models used for simulating a system can be as detailed in their representation of a system as desired, as there are no restrictions imposed by the method of solution, as is the case for all the optimization methods presented in the previous chapters. Thus, simulation model outputs can be more realistic indications of system performance, again given the assumptions made when developing any simulation model and setting the values of its parameters and variables.

Simulation methods can be applied to natural, engineered, or social systems to gain insight into their functioning or performance. For example, simulation models are used to predict the impacts of traffic congestion, or the spread of a contagious disease, or to estimate the likely damage resulting from flooding events in a community. Computer based simulations of systems are useful and much less expensive and quicker to perform than designing and building and operating alternative real systems and waiting to find out how well they performed over time.

In situations in which the number of alternatives that warrant such simulations, together with the time required to evaluate the output of each alternative simulation, takes too much time, some sort of preliminary screening of alternatives may

**Fig. 15.1** Flight training simulators that include humans in the simulation. https://en.wikipe dia.org/wiki/Flight\_simulator#/media/File:980310-N-7355H-03\_Simulator\_Training.jpg File: SSJ100 FFS 1 (9318513805).jpg. https://en.wikipedia.org/wiki/Flight\_simulator Public Domain and CC BY-SA 2.0

be useful. In many cases optimization modeling can serve as a means of preliminary screening. Optimization can be performed not necessarily to find the best values of decision variables but to eliminate from further consideration the clearly inferior ones.

Interactive simulation methods, sometimes referred to as human-in-the-loop simulations, are simulations that include humans making decisions as the simulation proceeds and responds to those decisions. Humans are making decisions based on the state of the system and external factors while the simulations are taking place. Examples include flight, rail, ship handling, or bus driving simulators. Such simulations, as illustrated in Fig. 15.1, are often used for training system operators, but they can also be used to learn more about how a system should be designed and/or managed or operated and about human behavior or decision-making under various system states.

Computer simulation has become a useful way to study many systems in physics, chemistry, biology, engineering, agriculture, business, economics, regional planning, and sociology among other application areas. Humans are often part of all such systems even though not always included in the simulation models.

#### **15.2 Stochastic Simulations**

As discussed in Chap. 14, Monte Carlo sampling provides a means of generating random values from given probability distributions. The name comes from its resemblance to what takes place in a real gambling casino. Monte Carlo methods are often useful when random inputs and outputs apply in any system simulation. Many systems have random inputs. Hospitals, police and fire departments, shelters for the homeless, libraries, schools, food pantries, and public parks are among the many examples of public systems having random inputs. Simulating such systems can benefit from the use of Monte Carlo methods to provide random inputs that come from realistic probability distributions.

Associated with a set of inputs, a simulation model will produce a corresponding set of outputs. Each alternative system simulated many times will have its own output distribution. Statistical measures of these output distributions provide a basis for comparing alternative system performances.

Two example simulation models follow.

#### **15.3 Water Quality Simulation**

Consider a small fully mixed lake (Fig. 15.2) having a constant volume V. Its inflow Q contains a pollutant W. By simulating the lake's quality, one can estimate what the pollutant concentration, C, of the lake will be over time. As we develop this simulation model, we will start with a simple one and add more realism later.

To begin, assume the inflows Q and pollutant loadings W are constant over time. Thus everything is constant except the pollutant concentration in the lake until it too reaches an equilibrium and does not change over time. Also assume, since the volume of the lake is constant, the inflow equals the outflow (and there is no significant evaporation or seepage).

Defining the variables and parameters needed to model this lake, we will be dealing with units of mass (M), length (L), and time (T) (Table 15.1).

The mass of pollutant input per unit time period, W, is its flow discharge times its concentration. Its flow discharge is included in the total inflow to the lake, Q.

The pollutant decay constant k is the mass of pollutant loss per unit of mass available per time period (i.e., a day) (M/M/T or 1/T). Its value depends on the type of pollutant as well as the water temperature.

To create a mass balance equation for the pollutant in the lake, we can equate the change in mass of pollutant in the lake to the mass that comes into the lake minus the mass that is contained in the lake outflow and the amount that decays

**Fig. 15.2** A constant volume lake receiving wastewater containing a pollutant


while in the lake. Each term in this mass balance equation will have units of mass/time or M/T.

Denoting the change of pollutant concentration, *C*, in the lake over time t, as *dC/dt*, ( M/L3/T),

$$VdC/dt = W - QC - kVC.$$

Thus the change in mass of pollutant in lake <sup>=</sup> *V dC/dt*, (L3M/L3/T <sup>=</sup> M/T), equals.

the mass that comes into the lake = W (M/T), less the mass that is discharged from the lake <sup>=</sup> QC, ((L3/T)(M/L3) <sup>=</sup> M/T), less the mass that decays in the lake <sup>=</sup> kVC, ((M/M/T)(L3/T)(M/L3) <sup>=</sup> M/T).

Since volumes, flows, pollutant inflow concentrations and decay rates are constant over time, eventually the lake pollutant concentration will become constant. It will not change over time. The term *dC/dt* in the above mass balance equation will be 0. Solving this equation when *dC/dt* is 0 for *C* will define its equilibrium concentration value, *C*eq.

$$C^{\mathrm{eq}} = W/(KV + \mathcal{Q}).$$

Using discrete simulation for this deterministic system, we can see what happens to the lake's pollutant concentration on its way toward an equilibrium. In other words, we can generate a time series of predicted lake concentrations *C*(*t*) at the beginning of each time period *t* given an initial concentration, *C*(1), at *t* = 1.

Let *dC* be approximated by (*C*(*t* + 1) − C(t)) and *dt* by *t*. Then the mass balance equation can be written as

$$V(C(t+1) - C(t)) = \left[W - \mathcal{Q}(C(t+1) + C(t))/2 - kV(C(t+1) + C(t))/2\right] \Delta t.I$$

**Table 15.1** Notation used to develop a simulation model that will predict the changing


This equation assumes that the units of all the parameters and variables are consistent, and the outgoing concentration in each period t is the average of the initial and final concentrations in the lake in that period.

To simulate a numerical example, assume *W* = 450; *Q* = 20; *k* = 0 and 0.1; *V* = 100; *t* = 3; and an initial pollutant concentration, *C*(1), is 5. The model's successive solutions are listed in Table 15.2 for 19 3-day time periods.

#### **15.4 Lake Quality Simulation with Random Wasteloads**

Consider the same lake having a constant volume, inflow and outflow, and pollutant decay rate, but with a random pollutant loading. The concentrations of pollutants entering the lake are described by a probability distribution. For this example, assume this probability distribution of pollutant inputs, *W*(*t*), is uniform, ranging from 200 to 700 with a mean of 450. Let *t* = 1. We can now generate a time series of *W*(*t*) and *C*(*t*) and based on that time series, compute the mean and standard deviation of the waste loads *W*(*t*) and lake pollutant concentrations *C*(*t*).

For purposes of comparison, we can assume the same deterministic values for inflow, lake volume, and a decay constant of *K* = 0. We can define the cumulative distribution of pollutant mass inputs *W*(*t*) per unit time and use it to convert a generated series of uniformly distributed random variable values, *p*, ranging from 0 to 1, to corresponding random variables of *W*(*t*) distributed uniformly from 200 to 700 (Fig. 15.3).

**Fig. 15.3** Wasteload probability distribution and its cumulative distribution

The cumulative probability, *p*(*t*), of a pollutant loading of *W*(*t*) at time *t* is (*W*(*t*) − 200)/500 for *W*(*t*) between 200 and 700, hence

$$W(t) = 200 + \text{500 } p(t),$$

and

$$\begin{aligned} V(C(t+1) - C(t)) &= (W(t) - \mathcal{Q}(C(t+1) + C(t))/2 \\ &- kV(C(t+1) + C(t))/2) \,\Delta t. \end{aligned}$$

Starting with an initial lake concentration of *C*(1) = 0, one simulation of 100 daily time steps (*t* = 1) resulted in a mean pollutant mass input of 437 (compared to a true mean of 450), with a standard deviation of 130.

In this simulation the lake pollutant concentration, *C*(*t*), reached a value exceeding the equilibrium concentration of 22.5 in less than 20 days. The mean of the remaining concentrations was 19.6 with a standard deviation of 4.2.

Some of the concentrations at the beginning and end of this particular simulation run are listed in Table 15.3.

#### **15.5 Possible Chaos**

This next purely mathematical example shows how the values of assumed parameters in a discrete simulation model along with the duration of the simulation time step may alter the path toward an equilibrium, even to one that may not reach an equilibrium even though an equilibrium exists. The model is defined by the simple differential equation

> *dx*/*dt* <sup>=</sup> (*<sup>a</sup>* <sup>−</sup> <sup>1</sup>) *<sup>x</sup>* <sup>−</sup> *ax*<sup>2</sup> the rate of change in *x* depends on the value of *x* and *a* parameter '*a*'.

We can find the equilibrium solution by setting *dx*/*dt* equal to 0.

<sup>0</sup> <sup>=</sup> (*<sup>a</sup>* <sup>−</sup> <sup>1</sup>)*<sup>x</sup>* <sup>−</sup> *ax*<sup>2</sup> <sup>=</sup> (*<sup>a</sup>* <sup>−</sup> <sup>1</sup>) <sup>−</sup> *ax*,so *<sup>x</sup>* <sup>=</sup> (*<sup>a</sup>* <sup>−</sup> <sup>1</sup>)/*a*,


thus an equilibrium exists when

*x* = [(*a* − 1)/*a*] for any non - zero value of a.

Clearly, as the value of the parameter 'a' increases, the equilibrium value of *x* approaches, but never reaches, 1.

A question is how will successive values of *x* tend toward their equilibrium values and will an equilibrium ever be reached if the system is not already in an equilibrium? In other words, are the equilibriums stable?

Consider a discrete simulation where *dx/dt* is approximated by

$$
\Delta \mathbf{x} / \Delta t = (\mathbf{x}(t+1) - \mathbf{x}(t)) / \Delta t = (a-1)\mathbf{x}(t) - a\mathbf{x}(t)^2,
$$

which can be written as *x(t* <sup>+</sup> *1)* <sup>=</sup> *x(t))* <sup>+</sup> *((a* <sup>−</sup> *1)x(t)* <sup>−</sup> *ax(t)2)t*.

The plots in Fig. 15.4 show successions of *x* values given six different nonnegative values of the parameter 'a' and a simulation step size *t* starting at *x*(1) = 0.2. The smaller the step size *t* the larger the value of 'a' for which the equilibrium is stable. With a step size of 0.5, if 'a' is 6 the sequence of *x* values corresponds to the graph showing '*a*' of 3.5 with step size of 1.

This example illustrates how simulations of deterministic non-linear systems can be sensitive to initial conditions and simulation step sizes, and in some cases even show apparent random behavior.

#### **15.6 Endowment Giving**

Many organizations, including those shown in Fig. 15.5, count on income from their endowment to cover some of their capital and operating costs. There is a

**Fig. 15.4** Plots showing the impact on *x*(*t*) values over time given some different values of '*a*' and *t*

**Fig. 15.5** Just a few of the most highly endowed universities in the US

strategy in raising an endowment. If an endowment campaign looks like it will be successful to potential donors, they are more likely to contribute to the endowment than if they think it will be unsuccessful. One measure of potential success is the amount of money already given. This is why some major donations are often sought before the 'publicly announced' campaign begins. Yet there may also be some who are reluctant to give to an organization if the total amount already raised is already very large, especially donors wanting to maximize the marginal values of their donations. Giving a specific amount of money to a well-endowed

organization will likely result in a smaller marginal value than that derived by an organization having a smaller endowment but similar expenses.

These notions are captured in the following example illustrated in Fig. 15.6. The variable *E*(*t*) is the level of giving already raised in the campaign by the beginning of period *t*.

The above plot shows a function used to predict the money raised over time, each amount raised being dependent on the total endowment already raised, *E*(*t*), by the beginning of period t. The change in the total endowment in period t is *E*(*t* + 1) − *E*(*t*), and *E*(*t* + 1) is

 $E(t+1) = a$   $E(t)^{0.7} - 100.$ 

At equilibrium *E*(*t* + 1) = *E*(*t*).

Hence when *<sup>E</sup>* <sup>=</sup> *a E*0.7 – 100 the system is in equilibrium.

If '*a*' is 50, *E* = 2.800119 or 460,170.5.

The lower equilibrium is unstable. If *E*(*t*) is less than 2.8, the following *E*(*t* + 1) will be even smaller, which in fact will not happen, but it indicates a decreasing interest in donor giving, at least until *E*(*t*) reaches 2.8. Perhaps this shows why many fund-raising campaigns are not announced until the organizers have already raised a substantial amount. If *E*(*t*) is greater than 2.8 in this example, then the following values of *E*(*t* + 1) will be even more until its value equals its upper equilibrium value. Beyond that upper equilibrium value donors are less likely to give more, perhaps feeling the organization's endowment campaign has raised enough money. The fact that mathematically changes in the endowment are negative below the lower equilibrium value of 2.8 and above the upper equilibrium value of 460,171 simply shows that the valid range of this function are for all values of *E*(*t*) between these two equilibrium values.

• In addition to predicting the sequence of endowment giving that will occur over time, the total time, n, needed to reach a given total amount of money, T, can be estimated. The total amount of additional endowment at the end of n periods, assuming the endowment is invested at a compound interest rate of i per period in following periods, is

$$E(t+1) = a\left[E(t)(1+i)\right]^{0.7} - 100, t = 1, \ 2, \ \dots, n \text{ where } E(n+1) \ge T.$$

#### **15.7 Forest Management**

In a particular town watershed there exists two competing tree species: hardwoods and softwoods. The watershed is managed primarily to produce clean water, but it also serves as wildlife habitat and source of income from timber. Cutting trees in a sustainably managed way can increase water yields, habitat value, and timber income (Fig. 15.7).

First consider an unmanaged forest. In an unmanaged forest, hardwood and softwood trees compete for the available sunlight, soil nutrients, and water. Hardwood trees grow more slowly but are more durable and produce more valuable timber. Softwood trees compete with the hardwoods by growing more rapidly and by consuming water and soil nutrients in the process. Can these two types of trees coexist indefinitely, or will one type of tree drive the other type to extinction?

One measure of the amount of forest growth in the watershed is the basal area of trees (Fig. 15.8). This is the cross sectional area of the trunk near the base of the tree. For both hardwood and softwood species the increase in basal area per hectare per year is directly proportional to the initial basal area of that species. However, this potential increase in basal area is reduced by the loss in basal area due to competition from its own species and from the other species.

Let


**Fig. 15.7** Unmanaged and managed hardwood and softwood forests. https://en.wikipedia.org/ wiki/Forestry By Queryzo—Own work, CC BY-SA 3.0, By Snežana Trifunovi´c—Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=2647911 CC BY-SA 3.0, https:// commons.wikimedia.org/w/index.php?curid=1975900

*bt* basal area loss per unit of basal area of species type *t* per unit basal area of different species per hectare.

Equations that describe the changes in basal area over time for both types of tree species can be written as

$$\begin{aligned} dH/dy &= r\_H H(\mathbf{y}) - a\_H H(\mathbf{y})^2 - b\_H H(\mathbf{y}) S(\mathbf{y}), \\ dS/dy &= r\_S S(\mathbf{y}) - a\_S S(\mathbf{y})^2 - b\_S H(\mathbf{y}) S(\mathbf{y}). \end{aligned}$$

These two differential equations can be expressed as difference equations that define the basal areas at the end of each year *y*, *H*(*y* + 1) and *S*(*y* + 1), in terms of *H*(*y*) and *S*(*y*). Assume *dH*/*dy* = -*H*/*y*. Similarly, replace *dS/dy* with -*S*/*y*.

$$\begin{aligned} \Delta H &= H(\mathbf{y} + \mathbf{l}) - H(\mathbf{y}), \text{ and} \\ \Delta S &= S(\mathbf{y} + \mathbf{l}) - S(\mathbf{y}). \end{aligned}$$

Substituting these expressions into the differential equations above results in the mass balance equations:

$$\begin{aligned} H(\mathbf{y}+\mathbf{l}) &= H(\mathbf{y}) + \left[r\_H H(\mathbf{y}) - a\_H H(\mathbf{y})^2 - b\_H H(\mathbf{y}) S(\mathbf{y})\right] \Delta \mathbf{y}, \\ S(\mathbf{y}+\mathbf{l}) &= S(\mathbf{y}) + \left[r\_S S(\mathbf{y}) - a\_S S(\mathbf{y})^2 - b\_S H(\mathbf{y}) S(\mathbf{y})\right] \Delta \mathbf{y}. \end{aligned}$$

These can be solved in succession starting with some initial conditions for *H*(1) and *S*(1).

There are four equilibrium solutions for these difference equations. Clearly one is when no trees exist. *H* = *S* = 0. Two others are when one or the other species does not exist.

If *H* = 0, then from the softwood difference equation, *S* = *rS*/*aS*, If *S* = 0, then from the hardwood difference equation, *H* = *rH* /*aH* .

If both *H* and *S* are positive, then from both difference equations, the equilibrium values are

$$\begin{aligned} H &= (a\_S r\_H - b\_H r\_S) / (a\_S a\_H - b\_H b\_S), \\ S &= (a\_H r\_S - b\_S r\_H) / (a\_S a\_H - b\_H b\_S). \end{aligned}$$

For a numerical example let: *rH* = 0.3; *rS* = 0.5; *aH* = *aS* = 0.1; *bH* = *bS* = 0.05.

Thus if

$$\begin{aligned} H & \text{ is 0 then } S = r\_S/a\_S = 0.5/0.1 = \mathfrak{F}, \\ S & \text{ is 0 then } H = r\_H/a\_H = 0.3/0.1 = \mathfrak{3}. \end{aligned}$$

Otherwise if both *H* and *S* > 0,

$$\begin{aligned} H &= (a\_S r\_H - b\_H r\_S) / (a\_S a\_H - b\_H b\_S) \\ &= (0.1 \, 0.3 - 0.05 \, 0.5) / (0.1 \, 0.1 - 0.05 \, 0.05) = 0.667, \end{aligned}$$

$$\begin{aligned} S &= (a\_H r\_S - b\_S r\_H) / (a\_S a\_H - b\_H b\_S) \\ &= (0.1 \, 0.5 - 0.05 \, 0.3) / (0.1 \, 0.1 - 0.05 \, 0.05) = 4.667... \end{aligned}$$

This is the only stable equilibrium. At any of the other equilibria just one stray seed of a species that is missing from the forest will cause a move to a new equilibrium.

Assuming different combinations of initial basal area values, the succession of basal areas will converge to their equilibrium values (Table 15.4).

Too great a time step may result in negative basal areas. If this happens take shorter time steps by replacing *y* with 1/m where m is an integer >1. Continue making m greater until the simulation converges without oscillations (Fig. 15.9).


**Fig. 15.9** Velocity plot showing *H* and *S* values converging to an equilibrium in a sequence of time steps

#### **15.8 Military Battle**

Two armies are to engage in battle. The red army enjoys a three-to-one numerical superiority, but the blue army is better trained and better equipped. Let *R* and *B* denote the respective levels of the red and blue armies. The Lanchester model of combat states that

$$\begin{aligned} dR/dt &= -aB - bRB, \\ dB/dt &= -cR - dRB. \end{aligned}$$

where the parameters *a* and *c* are kills by the opposing armies per soldier per day and *b* and *d* are kills per soldier in both armies from friendly fire per day. The first term in each equation accounts for the direct fire (aimed at a specific enemy target), and the second term accounts for attrition of army personnel due to its own area fire (e.g., artillery), the intensity of which depends on the size of both armies. Solving a sequence of difference equations can yield estimates of the size of each army over time. For *a* > *c* and *b* > *d*, *R*(1) = 3*n*, *B*(1) = *n*, we can see who wins, i.e., which army population goes to 0 first.

> *R*(*t* + 1) = *R*(*t*) − [*a B*(*t*) + *b R*(*t*)*B*(*t*)]*t*,

> *B*(*t* + 1) = *B*(*t*) − [*c R*(*t*) + *d R*(*t*)*B*(*t*)]*t*.

Assume *t* = 1, *R*(1) = 3000, *B*(1) = 1000, *a* = 0.004, *b* = 0.0002, *c* = 0.002, and *d* = 0.0001, the sequence of remaining army personnel is shown in Table 15.5.

One can see that the blue army will need to surrender to the red one if they want to have any personnel left alive. This prediction would suggest that unless the values of some of the Blue army's parameters can be made more favorable, the Blue army should not be fighting the Red army.


**Table 15.5** Decline of red and blue army populations over time

#### **15.9 Disease Epidemic**

Consider a population of 70,000 that can catch a disease. The disease is seldom fatal and leaves the cured victim immune to future infections of this disease. Infection can only occur when a susceptible person comes in direct contact with an infectious person. The infectious period for people that get the disease lasts 3 weeks (Obviously a less serious disease than COVID-19) (Fig. 15.10).

To develop a discrete simulation model that can estimate the number of sick, susceptible, cured, and dead over the course of an epidemic, we need some data, and we need to make some assumptions and define some notation identifying needed variables and parameters.

It seems reasonable that the change in the number of infected people is the difference between the rate of infection and the rate of being cured or dying. The rate of infection will depend on both the number of susceptible people and the number of infected, and therefore contagious, people. Both susceptible and infected people must exist for the disease to spread. Letting *S*(*t*) be the number of susceptible people at the beginning of period *t*, and *I*(*t*) the number of infected people at the beginning of period *t*, then one possible model for predicting the number of newly infected people in each successive period *t*, *A*(*t*), might be a function containing the product *S*(*t*) and *I*(*t*). This product, *S*(*t*)*I*(*t*), will insure that if either variable value is 0, no new infections. *A*(*t*) will occur. The additional number of people infected in period *t* is the additional number of people cured three periods later assuming there are no deaths.

Assume *A*(*t*) = *a S*(*t*) *I*(*t*). The parameter '*a*' is a rate coefficient.

**Fig. 15.10** This cartoon, titled death's dispensary, is a caricature published during the London cholera epidemic of 1866 (George J. Pinwell/Public domain). https://www.cbc.ca/news/ canada/newfoundlandlabrador/apocalypse-thenconspiracy-theories-1.5792105

Denoting *C*(*t*) as the number of cured people at the beginning of period *t*, and *D*(*t*) the number of dead people at the beginning of period t, where d is the fraction that die, then at the beginning of period 1.

*S*(1) = 70,000,

*C*(1) = 0,

*I*(1) = 0,

*D*(1) = 0.

Mass balance requires that

Number of susceptible at beginning of period *t* + 1 = *S*(*t* + 1) = *S*(*t*) − *A*(*t*), Number of newly infected in period *t* = *A*(*t*) = min [*a S*(*t*) *I*(*t*), *S*(*t*)],

Number of infected at beginning of period *t* + 1 = *I*(*t* + 1) = *I*(t) + *A*(t) – *A*(*t* – 3),

Number of cured at the beginning of period *t* + 1 = *C*(*t* + 1) = *C*(*t*) + *A*(*t* – 3)(1 – *d*),

Number of deaths at beginning of period *t* + 1 = *D*(*t* + 1) = *D*(*t*) + *A*(*t* − 3)*d*.

As a check, *S*(*t*) + *C*(*t*) + *I*(*t*) + *D*(*t*) should always equal *S*(1) which in this example is 70,000.

Assume that in the first week 28 people got the disease. During the next week there were 60 new cases.

Thus 60 = *a*(28)(70,000*–*28) and therefore the infection rate constant '*a*' = 60/{(28)(70,000–28) = 0.3062449E−04.

If no one is expected to die, the death rate fraction d will be 0. Assuming d = 0, the results of this example simulation for 15 weeks are shown in Table 15.6.


**Table 15.6** Results of the disease simulation model

**Fig. 15.11** Plot of progression of susceptible, infected, and cured among a population of 70,000 predicted by the disease simulation model

Figure 15.11 shows a plot of the data in Table 15.6.

This would be the first step in identifying the effect of various policies for reducing the number of people that get infected or that may die. Vaccination, if available, various degrees of isolation from other people, protective clothing including masks, and travel restrictions are among alternatives that could reduce the infection rate constant or the number of susceptible people in a population, or the fraction that die, if any. In addition, the total population of susceptible persons could vary either randomly or deterministically, such as due to more tourists during certain weeks than others. The parameters 'a' and 'd' could be random. If so, this might suggest a Monte Carlo simulation to obtain probability distributions of the number of infected and cured people at any time.

#### **Exercises**

1. Bus replacement.

Every year 5% of the passenger buses in Ithaca need to be replaced due to obsolescence and no longer meeting safety and environmental standards. Current plans and budget constraints call for the purchase of 10 new busses each year. How many busses must the bus company have if these rates of change can be sustained? Is this equilibrium stable?

2. Controlling algal blooms.

In many lakes algal blooms are an increasing hazard. They are often caused by excessive phosphorus, P, entering the lake.

Consider a small lake having a constant volume *V* cubic meters. Thus its inflow *Q* equals its outflow *Q*. Currently the mass of phosphorus entering the lake is *P* kg per day. The daily rate of phosphorus decay per unit phosphorus mass in the lake is defined by the decay constant k. Each of these values, *V*, *Q*, *P*, and *k*, are known.

The daily change, *dM/dt*, of phosphorus mass, *M*, in the lake depends on the daily mass of phosphorus entering the lake, *P*, the mass of phosphorus that exits the lake in the outflow, *QM*/*V*, and the mass of phosphorus that decays in the lake, *kM*. This change in lake phosphorus mass can be written as

$$dM/dt = P - \mathcal{Q}M/V - kM\ldots$$


One measure of the amount of forest growth in the watershed is the basal area of trees. This is the cross sectional area of the trunk near the base of the tree. For both hardwood and softwood species the increase in basal area per hectare per year is directly proportional to the initial basal area of that species. However, this potential increase in basal area is reduced by the loss in basal area due to competition from its own species and from the other species.

Let


Equations that describe the changes in basal area over time for both tree species can be written as

$$\begin{aligned} dH/dy &= r\_H H(\mathbf{y}) - a\_H H(\mathbf{y})^2 - b\_H H(\mathbf{y}) S(\mathbf{y}), \\ dS/dy &= r\_S S(\mathbf{y}) - a\_S S(\mathbf{y})^2 - b\_S H(\mathbf{y}) S(\mathbf{y}). \\ \text{Assume} \quad r\_H &= 0.3; \; r\_S = 0.5; \; a\_H = 0.1; \; a\_S = 0.1; \; b\_H = 0.05; \; b\_S = 0.05. \end{aligned}$$

If this forest is to be managed in a sustainable way to obtain a constant harvest of hardwood and softwood in each year, create a model to determine how much of each type of species can be harvested each year depending on the relative value per unit basal area of hardwoods compared to that of softwoods.

4. For the epidemic affecting 70,000 people described in this chapter, develop the equations needed to simulate the course of the disease over time, keeping track of the number of infected in each week, and the number susceptible and cured or immune at the beginning of each week. Carry out the simulation and plot graphs of the results over time as was shown in this chapter.

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **16 Multi-criteria Analyses**

#### **ABSTRACT**

An introduction to various approaches for modeling systems where different policy makers and/or stakeholders have different and often conflicting goals regarding desired system performance.

#### **16.1 Introduction**

Rarely do people and organizations have just one goal they are trying to satisfy. Furthermore, some of those goals or objectives may conflict with others. There may be no plan or policy that everyone will agree is the best. Just what combination of objective values is considered best will differ depending on who is being asked and sometimes when they are asked. Deciding what to do or policy to implement takes place in a political process. The role of modelers is to inform the debates that take place in these political decision-making processes. Modelers can help identify and evaluate the alternative plans or policies available and define the tradeoffs among conflicting stakeholder goals and other measures of system performance (Fig. 16.1).

Given multiple performance criteria measured in different ways, there are a variety of modeling approaches that can be used to identify their tradeoffs, if any. In this chapter, some ways of including multiple objectives in models are reviewed. Multi-criteria or multi-objective analyses are not designed to identify the best solution in cases of conflict among these objectives, but only to provide information on the tradeoffs between given sets of quantitative performance criteria. Political decisions are likely to be based on qualitative judgements in addition to any quantitative information derived from models. They will not be determined by a computer or mathematical model, but the political debates that take place prior to decision-making can often be guided by the information resulting from analysts and their models.

**Fig. 16.1** Modeling assisting stakeholders who want different policies, programs, and outcomes

For example, consider the resource allocation problem introduced and solved in previous chapters. Each allocation resulted in net benefits. The objective was to find the allocations that maximized the total net benefits obtained from all allocations. A second objective may be to distribute these maximum net benefits in an equitable way. Both objectives are measured in monetary units. Even assuming everyone may agree to maximize total net benefits, subject to any environmental, ecological, legal, and social constraints, not everyone is likely to agree as to how those net benefits should be allocated among all the stakeholders. This could lead to a decision that does not maximize net economic benefits but a decision that seems more acceptable and fairer to all who are impacted by the allocation decision.

A general multi-objective optimization problem can be viewed as having a vector of objectives. Let the vector *X* represent the set of unknown decision-variable values that are to be determined, and *Zj*(*X*) be a performance criterion or objective function whose value is determined by the values of *X*. Each possible vector of feasible values of the decision variables *X* represents a plan. Each performance criterion or objective *j* is an indicator of the impact of that plan. If all *n* objectives *Zj*(*X*) are to be maximized, the model can be written

> Maximize [*Z*1(*X*), *Z*2(*X*),..., *Z j*(*X*),..., *Z n*(*X*)]. Subject to all the constraints that must be satisfied.

The objective is a vector consisting of *n* separate objectives. The constraints define the feasible region of decision variable values.

A vector optimization representation of a multi-objective problem may be a concise way of defining a model, but it is not very useful in solving it. Multiple

**Fig. 16.2** Feasible tradeoff frontier among two maximization objectives showing the maximum value of one objective given a value of another objective

objective models can be solved only if their multiple objectives can be reduced to a single-objective. Thus, the multi-objective planning problem defined above cannot, in general, be solved without additional information and some modeling modifications. There are many ways to do this. This chapter introduces some of them.

#### **16.2 Efficiency Concept**

One of the goals of multi-objective planning is to identify technologically efficient tradeoffs among mutually exclusive feasible plans. These are plans that are on the tradeoff frontier (e.g., '*b*' in Fig. 16.2). Feasible plans that are not on this frontier (e.g., '*a*') are inferior in the sense that it is always possible to identity alternatives that will improve one or more objective values without making others worse. The goal of multi-objective modelling is the generation of a set of technologically feasible and efficient values of all unknown decision variables and objective functions. An efficient plan is one in which any objective value cannot be improved without causing a less desirable value of one or more other objectives.

#### **16.3 Dominance**

A plan *i* having multiple decision variable values, *X*<sup>i</sup> dominates all others if it results in an equal or superior value for all objectives *j*, *Zj*(*Xi*), and at least one objective value is strictly superior to those of each other plan. In symbols, assuming that all objectives *j* are to be maximized, plan alternative *i*, denoted as *Xi*, dominates if all objectives *j Zj*(*Xi*)≥*Zj*(*Xk*) for all plans *k* and at least one objective *j\** is better for some plan *k*: *Zj*\*(*Xi*) *> Zj*\*(*Xk*).

It is seldom that one plan *i*, *Xi*, dominates all others. If it does, choose it! It is more often the case that different plans will dominate all the other plans based on different objectives. Plan *h* may be best based on one objective, while plan *k* may be best based on another objective. However, if there exists two plans *k* and *h* such that *Zj*(*Xk*)≥*Zj*(*Xh*) for all objectives *j* and for some objective *j*\*, *Zj*\*(*Xk*) *> Zj*\_(*Xh*), then plan *k* dominates plan *h* and plan *Xh can* be dropped from further consideration, at least with respect to the objectives being considered.

Referring to Fig. 16.3, plan *A* dominates plan *C* and hence *C* can be dropped from consideration, at least based on the two objectives shown. While plans *A* **Fig. 16.3** Plot showing three discrete mutually exclusive plans and their two objective values

and *B* are both dominant plans, plan *C* may be considered best based on other considerations or objectives not included in the analysis. If some objectives are not, or cannot be, included in the analysis, inferior plans with respect to the objectives that are included in the analysis should not be rejected from eventual consideration. Dominance analysis can only deal with the objectives being explicitly considered.

#### **16.4 Satisficing**

Defining which plans are dominant does not help us decide which among those dominant plans may be better than others. Satisficing, illustrated in Fig. 16.4, is one approach for selecting the best plan among those being considered.

Assume all objectives are to be maximized. Satisficing requires that the participants in the decision-making process specify a minimum acceptable value for each objective. Those alternatives whose objective values do not meet these minimum acceptable values are eliminated from further consideration. If only one alternative meets these minimum requirements, select it as the best. If no alternatives have objective values that meet these minimum requirements, either reduce these requirements until an alternative meets one or more of them or enlarge the options being considered, i.e., enlarge the system. If multiple alternatives remain, those that remain can again be screened by increasing one or more of the minimum requirements until only one alternative remains, such as shown in Fig. 16.4. When used in an iterative fashion, satisficing can identify what the participants consider best of multiple alternative plans or policies.

Of course, sometimes the participants in the decision-making process will be unwilling or unable to narrow down the set of available non-inferior plans sufficiently with the iterative satisficing method. Then it may be necessary to examine in more detail the possible tradeoffs among the competing alternatives.

#### **16.5 Lexicography**

Another simple approach for determining the best alternative is called lexicography. To use this approach, the participants in the decision-making process must rank the objectives in order of priority. The plan that is the best with respect to the highest priority objective will be the one selected as superior. If there is more than one plan that has the same value of the highest priority objective, then among this set of preferred plans the one that achieves the highest value of the second priority objective is selected. If here too there are multiple such plans, the process can continue until there is a unique plan selected.

Referring to Fig. 16.3, if Z1 is the most important objective, then the best decision is B as shown in that figure. If Z2 is the most important objective, then the best decision is alternative A.

This method assumes such a ranking of the objectives is possible. Often the relative importance of various objectives may change over time or depend on other factors affecting stakeholder or decision-maker opinions. Consider, for example, the problem of purchasing an apple or an orange. Assuming you like both apples and oranges, which should you buy if you can only buy one? If you know you already have lots of apples, but no oranges, perhaps you would buy an orange, and vice versa. Hence, the ranking of objectives can depend on the current state and needs of those who will benefit from the plan and these states or needs can change.

#### **16.6 Indifference Analysis**

Another method of selecting the best plan is called indifference analysis. To illustrate the possible application of indifference analysis to plan selection, consider a simple situation in which there are only two alternative plans (*A* and *B*) and two planning objectives (1 and 2) being considered. Let *Z*1*A* and *Z*2*A* be the values of the two respective objectives for plan *A* and *Z*1*B* and *Z*2*B* be the values of the two respective objectives for plan *B*. This situation can be plotted such as shown in Fig. 16.2 where plan *C* is not being considered. Comparing both plans *A* and *B* when one objective is better than another for each plan can be difficult. Indifference analysis can reduce the problem to one of comparing the values of only one objective.

Indifference analysis first requires the selection of an arbitrary value for one of the objectives, say *Z*2\*, for objective 2. It is usually a value within the range of the values *Z*2*A* and *Z*2*B*, or in a more general case between the maximum and minimum of all objective 2 values. Next, a value of objective 1, say *Z*1, must be selected such that the participants involved are indifferent between the hypothetical plan that would have as its objective values (*Z*1, *Z*2\*) and plan *A* that has as its objective values (*Z*1*A*, *Z*2*A*). In other words, *Z*1 must be determined such that (*Z*1, *Z*2\*) is as desirable as or equivalent to (*Z*1*A*, *Z*2*A*):

$$(Z1, Z2^\*) \cong (Z1A, Z2A).$$

Next, another value of the first objective, say *Z*1\*, must be selected such that the participants are indifferent between a hypothetical plan (*Z*1\*, *Z*2\*) and the objective values (*Z*1*B*, *Z*2*B*) of plan *B*:

$$(Z1^\*, Z2^\*) \cong (Z1B, Z2B).$$

These comparisons yield hypothetical but equally desirable plans for each actual plan. These hypothetical plans differ only in the value of objective 1 and, hence, they are easily compared. If both objectives are to be maximized and *Z*1 is larger than *Z*1\*, then the first hypothetical plan yielding *Z*1 is preferred to the second hypothetical plan yielding *Z*1\*. Since the two hypothetical plans are equivalent to plans *A* and *B*, respectively, plan *A* must be preferred to plan *B*. Conversely, if *Z*1\* is larger than *Z*1, then plan *B* is preferred to plan *A*.

This process is illustrated in Fig. 16.5.

This process can be extended to a larger number of objectives and plans, all of which may be ranked by a single common objective. For example, assume that there are three objectives *Z*1*i*, *Z*2*i, Z*3*i*, and n alternative plans *i.* Consider any plan i. A reference value *Z*3\* for objective 3 can be chosen and a value *Z*1 estimated such that one is indifferent between (*Z*l, *Z*2, *Z*3\*) and (*Z*l, *Z*2, *Z*3).

The second objective value remains the same as in the actual alternative and in the hypothetical alternative. Thus, the focus is on the tradeoff between the values of objectives 1 and 3.

Next, a new hypothetical plan containing a reference value *Z*2\* together with *Z*3\* can be created and compared with hypothetical alternative (*Z*l, *Z*2, *Z*3\*). The

focus is on the tradeoff between the values of objectives 1 and 2 since the third objective values are the same. A value of *Z*1\* must be selected along with the value of Z1 such that the participants are indifferent between (*Z*1\*, *Z*2, *Z*3\*) and (Z1, *Z*2\*, *Z*3\*).

$$(Z1^\*, Z2, Z3^\*) \cong (Z1, Z2^\*, Z3^\*).$$

Hence, the participants are indifferent between two hypothetical plans that are both equivalent to the actual one. The last hypothetical plans, (*Zl*, *Z*2\*, *Z*3\*), differ only by the value of the first objective. The plan that has the largest value for objective 1 will be the best plan. This was identified using only pair-wise comparisons among multiple objective values.

All *n* plans can be ranked just based on the value of this single-objective.

All the methods presented so far deal with discrete mutually exclusive plans, each defined by known discrete values of their decision variables. The remaining methods assume these values are unknown but will depend on the relative importance of each objective. Objective values are allowed to vary continuously over all possible feasible values. The purpose of these methods is to identify efficient combinations of objective values, along with their corresponding decision variable values, and the tradeoffs among them.

Two common approaches for identifying non-dominated plans that together identify the efficient tradeoffs among all the objectives *Zj*(*X*) are the *weighting* and *constraint* methods. Both methods require numerous solutions of a single-objective optimization model to generate points on the objective functions' efficiency frontier.

#### **16.7 The Weighting Method**

The weighting approach involves assigning a relative weight to each objective and adding them together. This converts the objective vector to a scalar. This scalar is the weighted sum of the separate objective functions. The multi-objective model becomes

Maximize *Z* = [w1*Z*1(*X*) + w2*Z*2(*X*)... + w*jZj*(*X*) ... + w*JZJ* (*X*)].

Subject to all the relevant constraints.

The non-negative weights, *wj*, are constants specified by the modeler.

The values of these weights, *wj*, can be varied systematically, and the model solved for each combination of weight values, to generate a set of technically efficient (non-inferior) plans.

The foremost attribute of the weighting approach is that the tradeoffs or marginal rate of substitution of one objective for another at each identified point on the objective function's efficiency frontier is dependent on the relative weights. The marginal rate of substitution between any two objectives *Zj* and *Zk*, at specified values of the decision variables *X*, is

$$[d\mathbf{Z}j/d\mathbf{Z}k] = wk/wj.$$

This applies when each of the objectives is continuously differentiable at the point *X*.

The relative weights can be varied over reasonable ranges to generate a wide range of plans that reflect different priorities among the objectives. Alternatively, specific values of the weights can be selected to reflect preconceived ideas of the relative importance of each objective. The prior selection of weights requires value judgments. As analysts, we are not asking decision-makers to give us their preferred relative weights or ranking of objectives. It seems unlikely any decisionmaker would want to do this for a variety of reasons. We as analysts are picking various combinations of weights to identify the efficiency frontier among conflicting objectives. It is then up to the decision-makers to decide what point on this frontier represents the best combination of objective values, and hence the best decision variable values.

If each objective value is 'normalized' by dividing by its maximum feasible value, then the weights can range from 0 to 1 and sum to 1, to reflect the relative importance given to each objective. Otherwise, if the values of one objective are very large compared to the values of another objective, the weight on the lower value objective must be much larger than the weight on the higher value objective to get any change in the two objective values.

Fortunately, here we are not concerned with finding the best set of weights, but merely using these weights to identify the efficient tradeoffs among the conflicting objectives. After a decision is made, the weights that produced that solution might be considered the best, at least under the circumstances and at the time when the decision is made. They will probably not be the weight values that will apply in other places in other circumstances at other times.

A principal disadvantage of the weighting approach is that it cannot generate the complete set of efficient plans unless the efficiency frontier is strictly concave (decreasing slopes) for maximization objectives. If the objective value frontier, or any portion of it, is convex, as shown in Fig. 16.6, then only the endpoints of the convex portions of the efficiency frontier will be identified using the weighting method when maximizing. Similarly, for minimizing concave portions of efficiency frontiers. These limitations are overcome by using the constraint method.

#### **16.8 The Constraint Method**

The constraint method for multi-objective planning can produce the entire set of efficient plans for any shape of efficiency frontier assuming there are tradeoffs among the objectives. In this method, one objective, say *Z*k, is maximized subject to lower limits, *Lj*, on the other objectives, *j*=*k*. The solution of the model, corresponding to any set of feasible lower limits *Lj*, produces an efficient alternative if the lower bounds on the other objective values are binding (Fig. 16.7).

In its general form, the constraint model is

Maximize *Zk*(*X*). Subject to, in addition to the other constraints in the model, *Z j*(*X*) ≥ *L j* ∀ *j* = *k*.

Note that the dual variables associated with the right-hand-side values *Lj* are the marginal rates of substitution or rate or change of *Zk*(*X*) per unit change in *Lj* (or *Zj*(*X*) if binding).

An efficiency frontier identifying the tradeoffs among conflicting objectives can be defined by solving the model for many values of the lower bounds. Just as with the weighting method, this can be a tedious job if there are many objectives. If there are more than three objectives, all the tradeoffs cannot be plotted. Pair-wise tradeoffs that can easily be plotted do not always clearly identify non-dominated alternatives.

The number of solutions to a weighting or constraint method model can be reduced considerably if the participants in the decision-making process can identify the acceptable ranges of the values of weights or lower limits. However, this is not the language of decision-makers. Decision-makers who count on the support of each interest group represented by each objective are not likely to specify weights that imply the relative importance of those various stakeholder interests. In addition, decision-makers should not be expected to know what they may want until they know what they can get, and at what cost (often politically as much as economically). However, there are ways of modifying the weighting or constraint methods to reduce the amount of effort in identifying these tradeoffs as well as the amount of information generated that is of no interest to those making decisions. This can be done using interactive methods that are discussed shortly.

The weighting and constraint methods are among many methods available for generating efficient or non-inferior solutions. The use of methods that generate many solutions, even just efficient ones, assumes that once all the non-inferior alternatives have been identified, the participants in the decision-making process will be able to select the best compromise alternative from among them. In some situations, this has worked. However, in many multi-objective planning situations, they are not sufficient in themselves. This is because the number of feasible noninferior alternatives is simply too large. Participants in the decision-making process will not have the time or patience to examine and evaluate each alternative efficient plan. Participants may also need help in identifying which alternatives they prefer, and some may prefer ones that are not on any efficiency frontier, as previously discussed.

There are a few methods available for assisting decision-makers in selecting their most desirable non-dominated plan. Some of the more common ones are described next.

#### **16.9 Goal Attainment**

The goal attainment method combines some of the advantages of both the weighting and constraint plan generation methods already discussed. The participants in the planning and management process specify a set of goals or targets *Tj* for each objective *j* and, if applicable, a weight, *wj*, that reflects the relative importance of meeting that goal compared to meeting other goals. If the participants are unable to specify these weights, the analyst must select them and then later change them based on their reactions to the generated plans (Fig. 16.8).

The goal attainment method identifies the plans that minimize the maximum weighted deviation of any objective value, *Zj*(*X*), from its specified target, *Tj*. The problem is to find the values of the decision variables *X* and objective function values that

Minimize *D*

Subject to, in addition to the other constraints in the model,

w*j*[*T j*−*Z j*(*X*)] ≤ *D j* = 1, 2,..., *J* .

This method of multi-objective analysis can generate efficient or non-inferior plans by adjusting the weights and targets. If some targets *Tj* are less than *Zj*(*X*), some plans generated from goal attainment may be inferior with respect to the objective functions being maximized. Again, this model assumes all objectives are being maximized. If not, change the terms *wj*[*Tj* − *Zj*(*X*)] in the constraints to *wj* [*Zj*(*X*) –*Tj*].

#### **16.10 Goal-Programming**

Goal-programming methods also require specified target objective values, along with relative losses or penalties associated with deviations from these target values. The objective is to find the plan that minimizes the sum of all such losses or penalties. Assuming for this illustration that all such losses can be expressed as linear functions of deviations from target values, and assuming each objective is to be maximized, the general goal-programming problem is to

> Minimize *<sup>j</sup>*[v*jDj* + w*jEj*]. Subject to, in addition to the other constraints in the model, *Z j*(*X*) = *T j*−*Dj* + *E j* for each objective *j*.

The parameters *vj* and *wj* are the penalties (weights) assigned to objective value deficits or excesses, as appropriate. The weights and the target values, *Tj*, can be changed to get alternative solutions, or tradeoffs, among the different objectives.

#### **16.11 Interactive Methods**

Interactive methods allow participants in the decision-making process to explore the range of possible decisions without having to generate all of them, especially those of little interest to anyone (Fig. 16.9).

Some iterative methods begin with an obviously inferior solution. Based on a series of questions concerning how much more important it is to obtain various improvements of each objective, the methods proceed incrementally from that inferior solution to more improved solutions. The result is either a solution everyone

agrees is best, or an efficient one where no more improvements can be made in one objective without decreasing the value of another.

#### **16.12 Plan Simulation Performance Measures**

The methods outlined above provide a brief introduction to some of the simpler approaches available for plan identification and selection. Details on these and other potentially useful techniques can be found in many books, some of which are devoted solely to this subject of multi-objective planning. Most have been described in an optimization framework to focus on those alternatives that are considered dominant and efficient.

This section describes ways of evaluating alternative plans or policies based on performance criteria values derived from simulation models. Simulation models of systems yield sets of output variable values. These are values of multiple system performance criteria, each possibly pertaining to a specific interest and measured in its appropriate units.

There are numerous ways of summarizing sets of output data that might result from simulation analyses. Calculating arithmetic or geometric mean values and their standard deviations are two ways of summarizing multiple data. Other indications of system performance include reliability, resilience, and vulnerability measures.

#### Reliability

The notion of reliability requires defining ranges of values of each performance criterion or objective that are considered satisfactory and the ranges of values that are considered unsatisfactory. The number of simulated values of a performance measure in the satisfactory range divided by the total number of simulated values is a measure of its reliability.

Reliability = number of satisfactory values/total number of values.

Reliability values associated with any objective or performance criterion range from 0 to 1.

Is a system, or model of it, that produces more reliable output over time (e.g., the red time series in Fig. 16.10) better than a less reliable (e.g., the green time

series) system? Reliability measures tell one nothing about how quickly a system that produces an unsatisfactory output value recovers and returns to producing satisfactory values, nor does it indicate how bad an unsatisfactory value might be should one occur. It may well be that a system that fails relatively often, but by insignificant amounts and for short durations, will be preferable to one whose reliability is much higher but when a failure does occur, it is likely to be much more severe and take longer to return to a satisfactory state.

Resilience and vulnerability measures can quantify these vulnerability and resilience system characteristics.

#### Resilience

Resilience can be defined as the probability that if a system output value is unsatisfactory, the next value will be satisfactory. It is the probability of having a satisfactory value in period *t* + 1, given an unsatisfactory value in any period *t*. It can be calculated as

Resilience = - number of times a satisfactory value follows an unsatisfactory value / - number of times an unsatisfactory value occurred .

Resilience ranges from 0 to 1 and is not defined if no unsatisfactory values occur in a particular time series.

#### Vulnerability

Vulnerability is a measure of the extent of the differences between the threshold value, T, that divides values into satisfactory and unsatisfactory ones, and the unsatisfactory values. Clearly, this is a probabilistic measure since such deviations from the threshold value will differ. Some analysts use expected values, some use maximum observed values, and others may quantify vulnerability in terms of a probability of exceedance distribution.

Assuming an expected value measure of vulnerability is to be used:

Vulnerability[*devi ati on*] = - sum of unsatisfactory deviations from threshold *T* / - number of times an unsatisfactory value occurred ,

> Vulnerability[*dur ati on*] = [sum of failure durations]/ [number of failure events].

**Fig. 16.11** Two time series of values of a particular performance measure

An Example:

For an example consider the two hypothetical time series of values of a performance measure shown in Fig. 16.11. They have the same mean, 4.6, and the same variance, 7.66. One is just the 180-degree rotation of the other about the mean. Hence if the objective being maximized was the mean, or if the objective being minimized was the variance, both series would give identical values of those objectives. However, their reliability, resilience, and vulnerability measures differ. There are tradeoffs among them.

Just looking at Fig. 16.11, we can see that the reliability of the red series is 70%. The blue series reliability is 90%.

The resilience of the red series is 33%. The blue series resilience is 100%. If vulnerability is based on maximum failure, that of the blue series is greater than that of the red series. If vulnerability is based on maximum duration that of the red series is greater than that of the blue series.

#### **Exercises**

	- (a) Express the following model in a form used for defining the efficiency frontier (tradeoff between the two objectives) using the weighting method and the

constraint method.

```
Maximize Z1 = 4X1− X2
Maximize Z2 = −2X1 + 6X2
Subject to :
        X1 ≤ 4
        X1 + X2 ≤ 6
        X1 ≥ 0
        X2 ≥ 0.
```

Consider again the resource allocation problem where three users obtain benefits *B*(*X*) from the resources *X* they get allocated to them. The functions *B*(*X*) and their maximum values are shown below.

Function Optimal *X* Optimal value of function *<sup>B</sup>*1(*X*1) <sup>=</sup> <sup>6</sup>*X*<sup>1</sup> <sup>−</sup> *<sup>X</sup>*<sup>2</sup> <sup>1</sup> *X*<sup>1</sup> = 3 *B*1(3) = 9 *<sup>B</sup>*2(*X*2) <sup>=</sup> <sup>7</sup>*X*<sup>2</sup> <sup>−</sup> <sup>1</sup>.5*X*<sup>2</sup> <sup>2</sup> *X*<sup>2</sup> = 7/3 *B*2(7/3) = 147/18 *<sup>B</sup>*3(*X*3) <sup>=</sup> <sup>8</sup>*X*<sup>3</sup> <sup>−</sup> <sup>0</sup>.5*X*<sup>2</sup> <sup>3</sup> *X*<sup>3</sup> = 8 *B*3(8) = 32

Instead of finding the values of each allocation that maximizes the total benefits, assuming only 6 resources are available, each user wants to maximize their own benefits. This is now a multi-objective problem. Show how to find the tradeoffs among each user using the weighting, constraint, goal attainment and goal-programming methods.

3. Reliability, resilience, and vulnerability performance measures:

Generate a time series of random variable values from a probability distribution you select and for a specified threshold value separating satisfactory values from unsatisfactory values determine values of reliability, resilience, and vulnerability.

4. A multiple objective optimization problem:

Show how you could use the weighting and constraint and goal attainment methods to identify the tradeoff among various maximum values of *Z*1 and *Z*2.

> Maximize *Z*1 Maximize *Z*2 *Z*1 = 2*X*. *Z*2 = 3*Y* . *<sup>X</sup>*<sup>2</sup> <sup>+</sup> *<sup>Y</sup>* <sup>2</sup> <sup>≤</sup> <sup>16</sup>.

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **17 Fuzzy Optimization**

#### **ABSTRACT**

The chapter introduces methods of quantifying and modeling qualitative statements concerning system objectives and constraints and thus enabling the analyses of such systems.

The precise quantification of many system performance criteria and parameter and decision values is not always possible. Nor is it always necessary. When the values of variables cannot be precisely specified, they are said to be either uncertain or fuzzy. If the values are uncertain, probability distributions may be used to quantify them. Alternatively, if they are best described by qualitative adjectives, such as dry or wet, hot or cold, clean or dirty, and high or low, fuzzy membership functions can be used to quantify them. Both probability distributions and fuzzy membership functions of these uncertain or qualitative variables can be included in quantitative optimization and simulation models. This chapter focuses on fuzzy optimization modeling, again for the preliminary screening of alternative possible decisions.

#### **17.1 Introduction**

Large, small, pure, polluted, satisfactory, unsatisfactory, sufficient, insufficient, excellent, good, fair, poor, etc. are adjectives often used to describe various values of performance measures of some systems. These descriptors do not have 'crisp' well-defined boundaries that separate them from other values of the performance measures. A particular mix of economic and environmental impacts may be *more acceptable* to some and *less acceptable* to others. Plan A is *better* than Plan B. The water quality and temperature must be *good* for swimming. These qualitative descriptors convey information despite their imprecision.

This chapter illustrates how these qualitative descriptors can be quantified and used in optimization models. Before this can be done some definitions are needed.

<sup>&</sup>amp; Management Science 318, https://doi.org/10.1007/978-3-030-93986-1\_17

#### **17.2 Fuzzy Membership Functions**

Consider a set *A* of numbers ranging from say 18 to 25. Thus *A* = [18, 25]. In classical (crisp) set theory any number *x* is either in or not in the set *A*. The statement '*x* belongs to *A*' is either true or false depending on the value of *x*. The set *A* is referred to as a crisp set. If the limits of set *A* are uncertain, one may not be able to say for certain whether any number *x* is or is not in the set. The degree of truth attached to that statement is defined by a membership function value rather than a probability distribution. But unlike a probability distribution, the value of this function ranges from 0 (definitely false) to 1 (definitely true). (It could range from 0 to 10, as suggested in Fig. 17.1).

Consider the constraint: "The water temperature in a community swimming pool should be suitable for swimming." Just what temperatures are suitable will vary depending on the person asked. It would be difficult for anyone to define precisely those temperatures that are suitable if it is understood that temperatures outside that range are absolutely not suitable. This uncertain range of suitable temperatures is called a fuzzy set. Its boundaries are 'fuzzy.'

A membership function defining the interval or range of water temperatures suitable for swimming is shown in Fig. 17.2. Such functions may be defined based on the responses of many swimmers. There is a zone of imprecision or disagreement at both ends of the range.

The form or shape of a membership function depends on the individual subjective feelings of the "members" or individuals who are asked their opinions. To define this particular membership function, each individual *i* could be asked to define his or her comfortable water temperature interval (*T*1*i*, *T*2*i*). The membership value associated with any temperature value *T* equals the number of individuals who place that *T* within their range (*T*1*i*, *T*2*i*), divided by the number of individual opinions obtained. The assignment of membership values is based on subjective judgments, but such judgments seem to be sufficient for much of human communication and decision-making.

**Fig. 17.2** A fuzzy membership function for suitability of water temperature for swimming

#### **17.3 Optimization in Fuzzy Environments**

Consider the problem of finding the maximum value of *x* given that *x* cannot exceed 11. This can be written as

$$\begin{array}{c} \text{Maximize } U = x. \\\\ \text{Subject to :} \\ x \le 11. \end{array}$$

The obvious optimal solution, *x* = 11, is shown in Fig. 17.3.

Now suppose the objective is to obtain a value of *x* that is substantially larger than 10 while making sure that the maximum value of *x* should be in the vicinity of 11. This is no longer a crisp optimization problem; rather it is a fuzzy one.

What is perceived to be substantially larger than 10 could be defined by a membership function, again representing the results of an opinion poll of what individuals think is substantially larger than 10.

Suppose the membership function for this goal, *m*G(*x*), reflecting the results of such a poll, can be defined as

$$\begin{aligned} m\mathbf{G}(\mathbf{x}) &= 1/\{1 + \left[1/\left(\mathbf{x} - 10\right)^2\right] \} \text{ if } \mathbf{x} > 10, \\ m\mathbf{G}(\mathbf{x}) &= 0 \quad \text{otherwise}. \end{aligned}$$

This function is shown in Fig. 17.4.

The constraint on *x* is that it 'should be in the vicinity of 11.' Suppose the results of a poll asking individuals to state what they consider to be in the vicinity of 11 results in the following constraint membership function, *m*C(*x*):

$$m\mathbf{C}(\mathbf{x}) = \mathbf{l}/[\mathbf{l} + (\mathbf{x} - \mathbf{l}\mathbf{l})^4].$$

This membership function is shown in Fig. 17.5.

Recall the objective is to obtain a value of *x* substantially larger than 10 while making sure that the maximum value of *x* should be in the vicinity of 11. In this fuzzy environment the objective is to maximize the extent to which *x* exceeds 10 while keeping *x* in the vicinity of 11. The solution can be viewed as finding the

**Fig. 17.4** Membership function defining the fraction of individuals who think a particular value of *x* is 'substantially' greater than 10

**Fig. 17.5** Membership function representing the vicinity of 11

**Fig. 17.6** The intersection membership function and the value of *x* that represents a fuzzy optimal decision

value of *x* that maximizes the minimum values of both membership functions. Thus we can define the intersection of both membership functions and find the value of *x* that maximizes that intersection membership function.

The intersection membership function is

$$\begin{aligned} mD(\mathbf{x}) &= \text{Maximize minimum} \{ m\mathbf{G}(\mathbf{x}), m\mathbf{C}(\mathbf{x}) \} \\ &= \{ \mathbf{l}/(\mathbf{l} + \{\mathbf{l}/(\mathbf{x} - \mathbf{l}0)^2\}), \mathbf{l}/(\mathbf{l} + (\mathbf{x} - \mathbf{l}1)^4) \} \text{ if } \mathbf{x} > 10 \\ &= \mathbf{0} \text{ otherwise.} \end{aligned}$$

This intersection set, and the value of *x* that maximizes its minimum value, is shown in Fig. 17.6.

This fuzzy decision is the value of *x* that maximizes the intersection membership function *mD*(*x*), or equivalently:

Maximize *m*D*(x)* = maximize the minimum of{*m*G*(x), m*C*(x)*}*.*

The optimal solution is *x* = 11.75 and *m*D(*x*) = 0.755 which is the value of both membership functions *m*G(*x*) and *m*C(*x*).

#### **17.4 Fuzzy Sets in Resource Allocation**

Assume you are employed as a water manager in a state department of conservation. You deal with water allocation as well as pollution control policies.

This water resource allocation problem is illustrated in Fig. 17.7.

Assume, as in the previous allocation examples, the problem is to find the allocations of water to the three firms that maximize the total benefits *TB*.

$$\text{Maximize } TB = \left(6\mathbf{x}\_1 - \mathbf{x}\_1^2\right) + \left(7\mathbf{x}\_2 - 1.5\mathbf{x}\_2^2\right) + \left(8\mathbf{x}\_3 - 0.5\mathbf{x}\_3^2\right).$$

**Fig. 17.7** Three firms i that obtain benefits Bi from their allocations xi of water

These allocations cannot exceed the total water available, *R*. Assuming R = 6, the crisp optimization problem is to maximize *TB* subject to the resource constraint:

$$x\_1 + x\_2 + x\_3 \le 6.$$

The optimal solution is *x*<sup>1</sup> = 1, *x*<sup>2</sup> = 1, and *x*<sup>3</sup> = 4 as previously obtained using different optimization methods. The maximum total benefits, *TB*, equal 34.5.

Instead of assuming the available amount of water is certain to be R = 6, assume it is "about 6 units more or less". This statement defines a fuzzy constraint. Assume the membership function describing this fuzzy constraint is defined by

$$\begin{aligned} m\mathbf{C} &= 1 \text{ if } R \le \mathfrak{F}, \\ m\mathbf{C} &= [7-\mathbf{R}]/2 \text{ if } \mathfrak{F} \le R \le 7, \\ m\mathbf{C} &= 0 \text{ if } R \ge 7, \end{aligned}$$

as is shown in Fig. 17.8.

Converting the total benefit function, *TB*, to a fuzzy function, *m*G, ranging linearly from 0 to 1 when at its maximum unconstrained value of 49.17, the fuzzy optimization problem becomes

Maximize minimum *(m*G, *m*C*)*

or equivalently:

```
Maximize m
m ≤ mG
m ≤ mC
```
**Fig. 17.8** Membership function for 'R is about 6 units more or less'

Subject to:

$$\begin{array}{lcl} m\text{G} &=& \text{l} \left(6\text{x}\_{1} - \text{x}\_{1}^{2}\right) + \left(7\text{x}\_{2} - 1.5\text{x}\_{2}^{2}\right) + \left(8\text{x}\_{3} - 0.5\text{x}\_{3}^{2}\right) \text{l}/49.17, \\ m\text{C} &=& \text{\(7-R\)}/25 \le \text{R} \le 7, \\ \text{\(x}\_{1} + \text{x}\_{2} + \text{x}\_{3} \le \text{R}. \end{array}$$

Solving this model to find the maximum of a lower bound *m* on each of the two membership functions, the optimal fuzzy decisions are *x*<sup>1</sup> = 0.91, *x*<sup>2</sup> = 0.94, *x*<sup>3</sup> = 3.81, *mC* = mG = 0.67, and the total net benefit, *TB* = 33.1. Compare this with the crisp solution of *x*<sup>1</sup> = 1, *x*<sup>2</sup> = 1, *x*<sup>3</sup> = 4, and the total net benefit of 34.5.

Water pollution control.

Consider the stream pollution problem illustrated in Fig. 17.9. The stream receives waste from sources located at sites 1 and 2. Without some waste treatment at these sites, the pollutant concentrations at sites 2 and 3 will exceed the maximum

**Fig. 17.9** Two firms discharging their wastes W into a river upstream of a park. The problem is to find the waste removal efficiencies (*x*1, *x*2) that result in meeting the stream quality standards at least-cost

**Table 17.1** Parameter values selected for the water quality management problem illustrated in Fig. 17.9

acceptable concentration. The problem is to find the level, *x*i, of wastewater treatment (fraction of waste removed) at sites *i* = 1 and 2 required to meet the quality standards at sites 2 and 3 at a minimum total cost. The data used for the problem shown in Fig. 17.9 are listed in Table 17.1

The crisp model for this problem is

Minimize*C*1*(x*1*)* + *C*2*(x*2*).*

Subject to: Water quality constraint at site 2:

$$\begin{aligned} \left[P\_1 \mathcal{Q}\_1 + W\_1(1 - x\_1)\right] a\_{12} / \mathcal{Q}\_2 &\le P\_2^{\max} \\ \left[(\Im 2)(10) + 250000(1 - x\_1) / 86.4\right] 0.25/12 &\le 20 \end{aligned}$$

which when simplified is x1 ≥ 0.8.

Water quality constraint at site 3:

{[*P*1*Q*<sup>1</sup> <sup>+</sup> *<sup>W</sup>*1*(*<sup>1</sup> <sup>−</sup> *<sup>x</sup>*1*)*]*a*<sup>13</sup> <sup>+</sup> [*W*2*(*<sup>1</sup> <sup>−</sup> *<sup>x</sup>*2*)*]*a*23}*/ <sup>Q</sup>*<sup>3</sup> <sup>≤</sup> *<sup>P</sup>*max 3 {[*(*32*)(*10*)* + 250000*(*1 − *x*1*) /*86*.*4] 0*.*15+ [80000*(*1 − *x*2*) /*86*.*4] 0*.*60} */*13 ≤ 20

which when simplified is *x*<sup>1</sup> + 1.28, *x*<sup>2</sup> ≥ 1.79.

**Fig. 17.10** Membership function for a maximum concentration of 'about 20 mg/l.'

Restrictions on fractions of waste removal:

0 ≤ *x*<sup>i</sup> ≤ 1*.*0 for sites*i* = 1 and 2*.*

For a wide range of reasonable costs, the optimal solution found using linear programming is x1 = 0.80 and x2 = 0.77 or essentially 80% removal efficiencies at sites 1 and 2.

But what if the problem were stated in another way? Suppose the maximum allowable pollutant concentrations in the stream at sites 2 and 3 were expressed as 'about 20 mg/l.' Obtaining opinions of individuals of what they consider to be' about 20 mg/l,' a membership function can be defined. Assume it is as shown in Fig. 17.10.

Next, assume that the government environmental agency expects each polluter to install best available technology (BAT) or to carry out best management practices (BMP) regardless of whether or not this is required to meet stream quality standards. Asking experts just what BAT or BMP means with respect to treatment efficiencies could result in a variety of answers. These responses can be used to define membership functions for each of the two wastewater treatment efficiencies in this example. Assume these membership functions for both are as shown in Fig. 17.11.

Finally assume there is a third concern and that is expressed having to do with equity. It is expected that no polluter should be required to treat at a higher efficiency, more or less, than the other polluter. A membership function defining just what differences are acceptable or equitable, could quantify this concern. Assume such a membership function is as shown in Fig. 17.12.

Considering each of these membership functions as objectives to be maximized, a fuzzy multi-objective optimization model can be defined. One approach is to find the treatment efficiencies that maximize the minimum value of each of these membership functions.

$$\text{Maximize}\,m = \min\{m\_{\text{P}}, m\_{\text{T}}, m\_{\text{E}}\},$$

**Fig. 17.11** Membership function defining the waste removal efficiencies associated with the best available treatment technology or best management practices

**Fig. 17.12** Equity membership function in terms of the absolute difference between the two treatment efficiencies

which is equivalent to

Maximize *m*

where

$$\begin{aligned} \mathbf{m} &\leq m\_{\mathbf{P}}, \\ \mathbf{m} &\leq m\_{\mathbf{T}}, \\ \mathbf{m} &\leq m\_{\mathbf{E}}. \end{aligned}$$

If we assume that the pollutant concentrations at sites *j* = 2 and 3 will not exceed 23 mg/l, the pollutant concentration membership functions *m*Pj are

$$m\_{\rm Pj} = 1 - p\_{2j}/\mathcal{S}\_{\rm .}$$

The pollutant concentration at each site *j* is the sum of two components:

$$P\_{\mathbf{j}} = p\_{\mathbf{l}\mathbf{j}} + p\_{2\mathbf{j}},$$

where

$$\begin{aligned} p\_{1j} &\le 18, \\ p\_{2j} &\le (23 - 18). \end{aligned}$$

Assuming the treatment plant efficiencies will be between 70 and 90% at both sites *i* = 1 and 2, the treatment technology membership functions *m*Ti are

$$m\_{\rm Ti} = (x\_{2\rm i}/0.05) - (x\_{4\rm i}/0.10),$$

and the treatment efficiencies are

$$x\_{\mathrm{i}} = 0.70 + x\_{2\mathrm{i}} + x\_{3\mathrm{i}} + x\_{4\mathrm{i}}$$

where

$$\begin{aligned} \mathbf{x\_{2i}} &\le \mathbf{0.05}, \\ \mathbf{x\_{3i}} &\le \mathbf{0.05}, \\ \mathbf{x\_{4i}} &\le \mathbf{0.10}. \end{aligned}$$

Finally, assuming the difference between treatment efficiencies will be no greater than 14, the equity membership function, *m*E, is

$$m\_{\rm E} = Z - (0.5/0.05)D1 + 0.5(1 - Z) - (0.5/(0.14 - 0.05))D2,$$

where

$$\begin{aligned} D1 &\le 0.05Z, \\ D2 &\le \left(0.14 - 0.05\right)(1 - Z), \\ \mathbf{x}\_1 - \mathbf{x}\_2 &= DP - DM, \\ D'P + DM &= D1 + 0.05(1 - Z) + D2, \\ Z &\text{ is a binary 0, 1 variable.} \end{aligned}$$

The remainder of the water quality model remains the same: Water quality constraint at site 2:

$$\begin{aligned} \left[\mathbf{P}\_{\mathrm{I}}\mathbf{Q}\_{\mathrm{I}} + \mathbf{W}\_{\mathrm{I}}(1-\mathbf{x}\_{\mathrm{I}})\right] \mathbf{a}\_{\mathrm{I}2}/\mathbf{Q}\_{\mathrm{2}} &= P\_{\mathrm{2}},\\ \left[(32)(10) + 250000(1-\mathbf{x}\_{\mathrm{I}})/86.4\right] 0.25/12 &= P\_{\mathrm{2}}.\end{aligned}$$

Water quality constraint at site 3:

{[*P*1*Q*<sup>1</sup> + *W*1*(*1 − *x*1*)*]*a*13+[*W*2*(*1 − *x*2*)*]*a*23}*/ Q*<sup>3</sup> = *P*3*,* {[*(*32*)(*10*)* + 250000*(*1 − *x*1*) /*86*.*4] 0*.*15 + [80000*(*1 − *x*2*) /*86*.*4] 0*.*60} */*13 = *P*3*.*

Restrictions on fractions of waste removal:

$$0 \le x\_{\bar{i}} \le 1.0 \text{ for sites } i = 1 \text{ and } 2.1$$

Solving this fuzzy model yields the results shown in Table 17.2.


#### **17.5 Summary**

Optimization models incorporating fuzzy membership functions are sometimes appropriate when only qualitative statements are made when specifying objectives and / or constraints of a particular problem or issue. This chapter has shown how fuzzy optimization can be applied in such situations.

#### **Exercises**


Exercise 7 in Chap. 7 involved finding the 'least-cost' amounts of wastewater treatment (treatment efficiencies) at sites 1 and 2 that meet stream quality standards at sites 2 and 3: Currently there is no treatment. All the wastewater is discharged into the stream.

#### Available Data:

Stream flow <sup>=</sup> 1000 m3/day at all sites. 1 kg/day/1000 m3/day <sup>=</sup> 1 mg/l; Fraction of waste discharged into stream at site 1 that reaches site 2: 0.25 Fraction of waste discharged at site 1 that reaches site 3: 0.15

Fraction of waste at and discharged into stream at site 2 that reaches site 3: 0.60 Limits of treatment: removal of 30% required, but no more than 90%, for both sites. The initial concentration just upstream of site 1 is 32 mg/l.

Assume the cost of waste removal are 30\*fraction removed at site 1 and 20\*fraction removed at site 2.

Can you find a solution that keeps the stream clean yet doesn't cost too much?

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **18 Conclusion**

#### **ABSTRACT**

Concluding thoughts on the successful implementation of modeling in policy making processes and the relationships between analysts and policy makers.

Successfully understanding the methods presented in this book has given you some skills in model building and obtaining solutions from these models. However, this alone will not necessarily help you apply and implement such tools in practice. In addition to modeling skills, systems analysts working within or for organizations that make decisions need to know how to effectively inform those within those organizations or agencies who make or recommend decisions and thus can benefit from modeling designed to identify and evaluate possible alternatives. This requires building trust, and an awareness of, and being responsive to, the often-changing information needs of those who recommend or make decisions (Fig. 18.1).

Analysts, especially those engaged in informing policymakers, need to be good communicators. This involves making their results transparent by specifying the assumptions upon which the results are based and by addressing the uncertainties and alternatives openly, taking into account the different interests, goals, and perspectives of stakeholders, and policymakers. Part of being good communicators is recognizing that many terms analysts use, such as the word "model," can mean different things to others. Analysts attempting to communicate effectively to others should be aware of this need to speak the language their audiences understand.

What do policymakers expect from analysts? One might think they would like definitive advice on what to do, what plan or policy to choose, what action to take, and when, backed up by scientific evidence supporting that position. However, most know that models can by definition answer or address only 'what if' analytical questions, not the normative ones. A push for decisive decisions not only overlooks uncertainty but lies beyond the competence of analysts to deliver under the label of "science." Furthermore, analysts working on policy issues can

& Management Science 318, https://doi.org/10.1007/978-3-030-93986-1\_18

<sup>237</sup>

**Fig. 18.1** Informing the political process is itself a political process

discover "inconvenient truths," i.e., model results that might make an otherwise popular policy undesirable and therefore complicate a policy response or force a politically sensitive conclusion. Such a situation can cause two problems. One is the difficulty of communicating unexpected, disturbing results policymakers do not want to hear, thereby creating difficulties for them and possibly disrupting the relationship scientists have with them. The other is the dilemma of whether to make public (publish) such results, which can understandably be motivated by a sense of responsibility towards the public, as well as one's career as an objective analyst.

Informing, i.e., knowing what to present, and how and when, is learned through collaboration that generates a mutual understanding and trust between systems analysts and their clients. Far less effective is the ad hoc modeling results 'delivered by parachute', by an outside expert or firm, either unsolicited, or in a rush when policymakers suddenly ask for the modeling results analysts may or may not have. This especially applies when a sufficient level of trust has not been developed between the analysts and their client policymakers. Useful evidence comes from collaborative, continuous, long-term relationships with policymakers and their staff throughout a policy making process. This is one reason why there is a tendency for policy making agencies to select the same consulting firms to provide the scientific evidence desired over time. They have learned to trust them.

To be relevant to, and imbedded in, policy making processes, analysts must build up that trust and be aware of, if not engaged with, the world in which alternative policies and stakeholder values are considered, debated, and where choices are made. This is a world where simple opinions and anecdotes coming from groups having different interests, perspectives, and power asymmetries, and even false information, can influence final decisions.

Yet policies chosen without sufficient supporting scientific evidence are more likely to fall short of being as successful as they could be. An excellent example of this is the observation that measures taken to increase the efficiency of water used for irrigation so that the savings could be beneficially used elsewhere often have just the opposite impact. They simply motivate enlarging the areas irrigated. In this case one could argue the policy to increase irrigation efficiency in order to provide more water for other uses might have been informed by analyses, but if so the analyses were not sufficient. They did not consider the whole system, or in fact human behavior. While any policy may result in surprising outcomes, not foreseen when the policy was implemented, the scale and likelihood of adverse consequences stemming from non- or incomplete evidence-informed decisions are much higher.

**Fig. 18.2** Model outputs by themselves are rarely ready for prime time. Informing policymakers requires translating those outputs to what is desired and understood by, and relevant to, them

This irrigation story highlights the need for an iterative adaptive policy modeling—decision-making process. Once analysts start working on identifying alternatives, they may realize that they forgot to include some important criteria or constraints, requiring them to go back and update their models and data and continue through the process again, such as illustrated in Fig. 1.1 in Chap. 1. Each of these steps should be done with the decision-maker(s) and the stakeholders, ideally in a shared collaborative and open process.

Part of the art of modeling is deciding what to model, and in what detail. There is no reason to think the first attempt will be the right one. Feedback from those being informed by the modeling exercise will almost always motivate modifications in any systems model. One can only hope that by the time a decision must be made, the modeling results have succeeded in promoting the understanding desired and needed by those responsible for making decisions (Fig. 18.2).

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

### **Exercise Solutions**

#### **1. Analyzing Public Decisions**

1. Why develop and use models?

*Either to better understand the system and how it functions, or for predicting the performance of the system under alternative inputs and other assumptions*. *To inform decisions*.


*Whether the results of the analyses influenced the debate on what decision to take*.

*Whether the system and its performance are better understood*.

#### **2. Public Sector Systems**

1. General.

Under what conditions might it be appropriate to apply systems modeling methods?


D. P. Loucks, *Public Systems Modeling*, International Series in Operations Research

& Management Science 318, https://doi.org/10.1007/978-3-030-93986-1

	- *To improve one's understanding of how a system performs*.

*One example*:

Calvin KV, P Patel, L Clarke, G Asrar, B Bond-Lamberty, RY Cui, A Di Viorio, K Dorheim, J Edmonds, C Harn, M Hejazi, R Horowitz, G Iyer, P Kyle, S Kim, R Link, H McJeon, SJ Smith, A Snyder, S Waldhoff, and M Wise. 2019. "GCAM v5.1: Represenng the linkages between energy, water, land, climate, and economic systems." *Geoscienfic Model Development* 12:677–698, hps://doi.org/10.5194/gmd-12-677-2019 (CC BY 4.0)

#### **3. Developing Models**

1. If - <sup>i</sup>=2,<sup>4</sup> <sup>A</sup>(i) is A(2) <sup>+</sup> A(3) <sup>+</sup> A(4), write out the sum: - i=1,3 - <sup>0</sup><j<<sup>i</sup> Xij.

= X11 + X21 + X22 + X31 + X32 + X33

2. Given that *n <sup>i</sup>*=<sup>1</sup> represents a sum and *<sup>n</sup> <sup>i</sup>*=<sup>1</sup> represents a product of n terms, what is the value of

$$\sum\_{i=1}^{3} \prod\_{j=1}^{4} (i+j) / \sum\_{k=2}^{6} (k) \quad ?$$

$$\begin{aligned} &= [(1+1)^{\*}(1+2)^{\*}(1+3)^{\*}(1+4) + (2+1)^{\*}(2+2)^{\*}(2+3)^{\*}(2+4)] \\ &+ (3+1)^{\*}(3+2)^{\*}(3+3)^{\*}(3+4) \\ &= (2^{\*}3^{\*}4^{\*}5) + (3^{\*}4^{\*}5^{\*}6) + (4^{\*}5^{\*}6^{\*}7) = 1320 \\ 1320/(2+3+4+5+6=20.) &= 66 \end{aligned} $$

3. Construct a conceptual model (a picture or a node-link network) of a multiple component system. Then identify what decisions are to be made and potential objectives or measures of performance.

*Example solution: A transportation system having multiple ways of traveling between where you are and where you want to go*. *A conceptual model showing alternatives*.

*Known: Cost or time or some other attribute associated with each type of travel (e.g., car, rail, bus, air plane) on each link. Decision: Which type and route of travel to select*.

	- *Identify system and its components and interrelationships, decision variables, constraints, boundary conditions, input data*
	- *Establish goals or objectives—performance or evaluation criteria*
	- *Define relationships between decision variables and objectives, constraints*
	- *Identify solution procedure and modify model as required*
	- *Solve model and perform sensitivity analyses of assumptions*
	- *Modify any previous step and redo remaining steps based on feedback from client or new information*.

*Sources of uncertainty*:

• *Model input data*.

	- *Simulation: Addresses 'What if ' questions. What will the values of performance measures be given a system design and operating policy, and the input data?*
	- *Optimization: Addresses 'What should be' questions based on system objective and model assumptions. What are the 'best' decisions given the objective(s) being maximized or minimized and other assumptions*.

Simulation is used for determining system performance associated with specified values of all model variables and parameters. Optimization is often used for the preliminary screening of alternatives to determine a set of good decision variable values that can then be simulated to determine more precisely the system performance.

	- *Believing the model really reflects the real world and not questioning the results*.
	- *Not addressing the real issues of policymakers or stakeholders, or not providing the information needed when it is needed and at the right level of detail*.
	- *Inadequate calibration, verification*.


Which alternative would be the best in your opinion and why? Why might a decision-maker select alternative E even realizing other alternatives exist that can give more security and road maintenance?

*The alternatives that are efficient in that you must give up some of one benefit to get more of another are easily seen on a security vs road maintenance plot of these five alternatives. Alternatives A and D are efficient. Based on these two types of benefits*, *the selection would be one of these two alternatives. If either B, C, or E are chosen, clearly other objectives are being considered*.

9. Define a mathematical model for finding the dimensions of a cylindrical tank that minimizes the total cost of storing a specified volume of maple syrup. What are the unknown decision variables? What are the model parameters? How would you solve this model?

*Decision variables are radius r and height h. Their values are to be determined*. *Parameters are pi (approximately 22/7), the costs per unit area for side (Cs), for top (Ct) and for base (Cb) and the required Volume. Their values are known*.

Model:

Minimize Totalcost ('Totalcost' is an unknown variable.)

Subject to:

Totalcost = Sidecost + Topcost + Bottomcost (all unknown variables.) Sidecost = Cs 2(*pi*)r h Topcost = Ct(*pi*)r 2 Bottomcost = Cb(*pi*)r 2 (*pi*) r2h <sup>≥</sup> Volume

*The number of variables in this model can be reduced by combining the first four definitional constraints so just r and h are the unknown variables. These additional variables and constraints are added for clarity, especially in interpreting the model output*.

*One way to find a good solution is to assume an initial r and h that does not provide the required volume. Next define an increment of r,* Δ*r, and an increment of h,* Δ*h. Then determine which increment to add to the total r or h already existing that has the greatest volume increase per cost increase,* Δ*Volume/*Δ*Totalcost. Continue until the required volume is obtained. Alternatively, one can add incremental values of r and h to keep the side cost as close to 2/3rds of the total cost as possible, but this fact is not generally known. Again, keep adding increments until the volume constraint is satisfied*.

#### 4. **Modeling Examples and Solutions**

	- (a) State what you think would be a fair way to allocate the limited funds you have.

In other words, what would be your criterion for allocating funds that you could defend at a public hearing?

*Possible objectives*:


*There could be more.*

(b) Develop a model that when solved would identify the allocations that meet your objective. Clearly define the variables and parameters you use, and the objective function and constraints.

*Let A*(*i*) *be the allocation to agency i*. (*unkno*w*n*)

*Let T*(*i*) *be the*"*target*"*allocation each agency i expects or* w*ants*. (*kno*w*n*)

$$\begin{aligned} \text{Minimize } & \sum\_{i} \left[ \left( T(i) - A(i) \right)^{2} \text{ or } \left( \left( T(i) - A(i) \right) / T(i) \right) \right] \\ & \text{or } \left( \left( T(i) - A(i) \right) / T(i) \right)^{2} \text{ } \\ & \text{or } \text{Minimize } & \text{Maximize } \left[ \left( T(i) - A(i) \right) \text{ or } \left( \left( T(i) - A(i) \right) / T(i) \right) \right] \\ & \text{Butget constraint } : \sum\_{i} A(i) \le B; \text{ } B \text{ is the known available budget.} \end{aligned}$$

*In this case since the total desired amount* (*sum of all T*(*i*))*is* > *B*, *the constraint could be* w*ritten as i A*(*i*) = *B*.

#### 2. Blueberries

There are three farmer's markets that sell organically and locally grown blueberries. The farmer who grows these blueberries gets 90% of the income from their sales; the markets get the other 10%. The demand for blueberries differs at each market. Some smart economist has determined that the demand (unit price) functions for blueberries at the three markets (m = 1,2,3) are 6/(1 + Q1), 7/(1 + 1.5Q2), and 8/(1 + 0.5Q3), respectively.

At each market m the unit price varies each week depending on the amount of blueberries available, Qm, to be sold. How should the farmer distribute a crop ranging from 1 to 6 bushels of blueberries each week to maximize the total amount of income received from all three markets?


(c) How would the integer allocation of 6 bushels differ if the overall objective were to maximize the total income from all three markets while keeping their individual market incomes as close to being the same as possible?

$$
\mathbb{Q}\_1 = 2 \text{ for } \mathsf{TR}\_1 = 4. \quad \mathbb{Q}\_2 = 3 \text{ for } \mathsf{TR}\_2 = \mathsf{3.8.} \quad \mathbb{Q}\_3 = \mathbb{1} \text{ for } \mathsf{TR}\_3 = \mathsf{5.3.} \text{ } \text{Total } \mathbb{S} = \text{13.1.}
$$

3. Suppose you wish to minimize flood risks in two towns. Flood risk is measured in expected property damage. You have \$2 million to spend on flood risk reduction. Construct an optimization model and solve it to determine where to spend the \$2 million that maximizes total reduction using the hill climbing method.

#### Investment, \$10<sup>6</sup> Total Reduced risk Town A Town B


Let

Ra(A) be the reduction associated with an investment of A to Town A

Let Rb(B) be the reduction associated with an investment of B to Town B Maximum investment = 2.

Maximize Ra(A) + Rb(B) Subject to A + B ≤ 2.

Hill Climbing : Assume integer allocations 1 and 2 <sup>×</sup> <sup>10</sup><sup>6</sup>

First million to B(since 18 > 12)

Second million to A (since 12 > 9).

Total reduction = 30%

#### **5. Models for Managing Money**

1. What is \$1 invested today at 7% per year, compounded annually, worth at the end of 10 years?

*About \$2. Doubles every 10 years at 7% per year. Assumes no taxes*.


$$\text{FV}\_{\text{I}} = \ $1(1 + 0.12/12)^{12} = \$ 1.1268 \quad \text{if no taxes.}$$

4. What would be the answer to the previous question if an annual nominal interest rate of 12% were compounded continuously within the year?

$$\text{FV}\_{\text{l}} = \ $1 \text{ e}^{0.12} = \$ 1.127\text{S} \quad \text{if no taxes.}$$

5. Suppose after you graduate and begin receiving an income you start investing \$6000 at the end of each year into a tax-free retirement account that earns 8% per year. You do this for only 10 years, and then just leave it in the account earning 8% interest each year for the next 30 years when you decide to retire. Alternatively, you only start investing \$6000 per year into this tax-free account on the 11th year of employment and keep investing annually for the remaining 30 years. Which investment strategy will result in a higher retirement fund at the end of 40 years of employment?

$$\begin{aligned} \text{First} &= \left[ 6000 ((1 + 0.08)^{10} - 1) / 0.08 \right] (1.08)^{30} = \ $ \ 874, \$  39.80 \\ \text{Second} &= 6000 ((1 + 0.08)^{30} - 1) / 0.08 &= \ $ \ 679, \$  99.30 \end{aligned}$$

6. How much money are you going to need when you retire to assure you can meet your standard of living for the remainder of your life? Specify all the assumptions you are making, considering taxes and inflation. How are you going to get that amount of money (i.e., your savings plan)?

Estimate money needed now to meet standard of living and inflate it to retirement age. Find present value of amount needed at retirement age to be able to withdraw this amount, after-taxes, each year for your estimated remaining life. Propose your plan for obtaining this amount of savings needed at retirement age.

7. One criterion for plan selection is the one that produces the maximum net annual benefits. The maximum benefit–cost ratio, or annual benefits divided by annual costs, is another criterion. Benefit–cost ratios should be no less than one if the annual benefits are to exceed the annual costs. Consider two projects, I and II:


What additional information is needed before one can determine which project is the most economical project?

*If there are funds available for the more expensive project, then the return from investing the remaining funds if the cheaper project be selected must be known before either project can be identified as the preferred one. Annual benefit–cost ratios*, *or net benefits*, *can be used interchangeably to evaluate alternative investment plans only if the total amounts of money available are the same. If they are the same, the plan having the largest benefit–cost ratio will also have the largest net benefits*.

*In this case, project II costs* 1.5 *of the* 18 *available so you have* 16.5 *left over and that plus the* 2 *annual benefits earned is* 18.5 *total annual benefits*. *The b/c ratio is* 18.5/18 = 1.03, *not* 1.3. *Thus, both the net benefits and benefit cost ratios are consistent. Project I is preferred*.

8. Bonds are often sold to raise money for infrastructure investments. Each bond is a promise to pay a specified amount of interest, usually semiannually, and to pay the face value of the bond at some specified future date. The selling price of a bond may differ from its face value. Since the interest payments are specified in advance, the current market interest rates dictate the purchase price of the bond.

Consider a bond having a face value of \$10,000, paying \$500 annually for 10 years. The bond or "coupon" interest rate based on its face value is 500/10,000, or 5%. If the bond is purchased for \$10,000, the actual interest rate paid to the owner will equal the bond or "coupon" rate. But suppose that one can invest money in similar quality (equal risk) bonds or notes and receive 10% interest. If this is possible, the \$10,000, 5% bond will not sell in a competitive market. To sell it, its purchase price must be such that the actual interest rate paid to the owner will be 10%. In this case, what is the bond currently worth?

*Solution* :

$$\ $6927 = \$ 00 \left[ \frac{(1.10)^{10} - 1}{0.10(1.10)^{10}} \right] + \frac{10,000}{(1.10)^{10}}$$

The interest paid by some bonds, especially municipal bonds, may be exempt from state and federal income taxes. If an investor is in the 30% income tax bracket, for example, a 5% municipal tax-exempt bond is equivalent to about a 7% taxable bond. This tax exemption helps reduce local taxes needed to pay the interest on municipal bonds, as well as providing attractive investment opportunities to individuals in high tax brackets.

#### 9. Assume a particular university's tuition and fees are \$C today.

Assume the after-tax interest rate you can earn in the next 24 years is 5%.

Assume the inflation rate of tuition and fees in the next 24 years will be 4%.

Show how to determine how much money would be enough to invest today to pay for four years of tuition and fees starting at the beginning of 20 years from now.

Just set up the equations needed to find the answer. (Drawing a picture may help.)

*One Solution*:

*Amount needed at end of year* 19: \$*C* (1 + 0.04) ∧19

$$\begin{aligned} &+ ((1+0.04)^\circ 20)(1+0.05) + ((1+0.04)^\circ 21)/(1+0.05)^\circ 2 \\ &+ ((1+0.04)^\circ 22)/(1+0.05)^\circ 3. \\ &\text{Discount this amount 19 years at } 5\% \text{ using } (1+0.05)^\circ -19 \\ &\text{Thus the money needed today } : \left\{ \ $C[(1+0.04)^\circ 19 \\ &+ ((1+0.04)^\circ 20)/(1+0.05)((1+0.04)^\circ 21)/(1+0.05)^\circ 2 \\ &+ ((1+0.04)^\circ 22)/(1+0.05)^\circ 3. \right\} /(1+0.05)^\circ -19 \\ &\text{Equivalently } : \\ &Prestent value = \$ C[((1+0.04)/(1+0.05))^\circ 19 \\ &+ ((1+0.04)/(1+0.05))^\circ 22 \\ &+ ((1+0.04)/(1+0.05))^\circ 22 \end{aligned}$$

10. You must pay back a debt, say of \$1000, with interest, in 12 equal end-ofmonth payments. Each monthly payment contains both some of your debt and the monthly interest owed on the remaining debt. The bank tells you the annual interest rate is 5%. Describe how you could determine the annual interest rate you actually paid on the debt you owed.

*Solution*.

*Compute the t*w*el*v*e equal monthly payments*, *A*, *gi*v*en a present* v*alue of* \$1000. *Use the monthly interest rate i* = 0.05/12

$$A1000 = A\left[1/(1+i) + 1/(1+i)^2 + \dots + 1/(1+i)^{12}\right] = A\left[\left((1+i)^{12} - 1\right)/\left((1+i)^{12}i\right)\right]$$

*Total interest paid is the sum of all* 12 *payments A less the debt of* 1000. *Annual interest rate that con*v*erts* 1000 *to the sum of all A* v*alues is* 1000(1 + *i*) = *sum of all A* v*alues*.

*Alternati*v*ely* :

*Di*v*ide the sum of monthly payments by the principal*, \$1000, *and subtract* 1 *from that* v*alue to compute the actual effecti*v*e annual interest rate*.

*For this example* : *A* = 85.61 *end of period payments Sum of all A* = 1027.32 = 12∗*A Effecti*v*e interest rate* : 0.02728978 = 2.73% *annual interest rate*, *or* 27.32 *total interest paid*.

*payments* w*ould be* 0 *since you ha*v*e no debt o*v*er time*.*If you* w*aited to the end of the year your interest payment* w*ould be* \$50. *Since you are paying off the debt throughout the year the total interest paid* w*ould be just o*v*er half the difference bet*w*een* \$0 *and* \$50.

	- (a) If you decide to wait a year and invest the \$10,000 during the year, earning an annual interest rate i, describe how would you determine the extra money you would have at the end of the year after paying the inflated cost of lessons at that time?

*After investing for a year, the 10,000 will become* 10,000(1 + *i*).

*Inflated cost of flight instruction is* 10000(1 + f) *where f is the annual rate of inflation*.

*The extra money you will have is* 10000 [(1 + *i*) – (1 + *f* )] = 10,000 (*i*−*f* ).

*Alternatively*: *Computing the difference in current dollar value using the real (uninflated) rate*

*of return r*: *Difference is* 10000(1 + r) – 10,000 *and since* (1 + i) = (1 + r)(1 + f), *the difference in current dollar values is* 10000(1 + *i*)/(1 + *f* ) − 10,000.

*This difference expressed in beginning of year 1 dollars is*

[10000(1 + *i*)/(1 + *f* ) – 10000] (1 + *f* ) = 10,000 [ (1 + *i*) – (1 + *f* )] = 10,000 (*i* − *f* )

(b) Assume you forgot to consider the fact that you will owe income taxes on the interest earned. Your income tax rate is *t*. How would your solution change if you include the tax payment?

*Solution* : *Replace each* 'i' w*ith* 'i (1 − *t*)'.

12. You must pay back a bank debt, say of \$1000, with interest, in 3 equal end-ofyear payments. Each payment contains the interest on the debt at the beginning of the year and some of the principal.

(As the debt decreases so do the interest payments in each successive A. The interest paid, Iy, at the end of a year y is based on the debt, Py, at the beginning of that year.)

The bank tells you the annual interest rate is 5%.

Show how to compute the principal and interest contained in each of the three end-of-year payments 'A' using the following steps:

(a) Write the equation for solving for payments A:

*Compute the three equal annual payments, A, given a present value of* \$1000. *Use the annual interest rate i* = 0.05.

$$1000 = A \left[ 1/(1+i) + 1/(1+i)^2 + 1/(1+i)^3 \right] \text{ and solve for A.}$$

(b) Show the equation for computing for the first interest payment, I1:

$$1000(i) = I\_1$$

(c) Given A and I1, show the equation for computing for the remaining debt at beginning of 2nd year, P1:

$$P\_{\rm l} = 1000 - (A - I\_{\rm l})^2$$

(d) Show the equation for computing for the interest paid in the 2nd payment:

$$(P\_1)(i) = I\_2$$

(e) Given A, P1 and I1, solve for the remaining debt at beginning of 3rd year:

$$P\_2 = P\_1 - (A - I\_2)^2$$

(f) You can deduct 30% of the annual interest payment from your income tax each year. Given all the interest payments Iy and A, show the equation you could use to compute the actual interest rate you are paying on your debt.

$$1000 = (A - 0.3I\_1)/(1 + i) + (A - 0.3I\_2)/(1 + i)^2 + (A - 0.3I\_3)/(1 + i)^3$$

#### **6. Solving Models Using Excel**

1. Regression involves finding functions that best fit some observed data. One criterion is to minimize the sum of squared deviations from observed and predicted values. Suppose you have a set of observed (known) x,y values, say x(i) and corresponding y(i).

> y(i): 4 10 18 11 22 7 10 14 19 3 x(i): 2 4 8 6 10 3 5 7 9 1

Define and solve an optimization model to determine the parameters of a nonlinear function y <sup>=</sup> <sup>a</sup> <sup>+</sup> bxc that best fits the above data.

*Minimize i* [*y*(*i*)–(*a* + *b x*(*i*) *<sup>c</sup>*)]<sup>2</sup> *to find the best values of a, b, c if non-linear. If linear*, *c* =1 *and the values of 'a' and 'b' will differ. This optimization will define the parameters* '*a*', '*b*', *and* '*c*' *of the function y* <sup>=</sup> *<sup>a</sup>* <sup>+</sup> *bx<sup>c</sup>*

2. Find the four linear functions that best fit the following four sets of data. Then plot the data. What does this tell you about fitting functions to data?



#### *Solution*:

*For each set of data, the mean of x and variance of x are the same. The same applies to the mean and variance of all the y values. The linear regression line is the same for all data sets. The other data presented in the table below is just for information*.


*Plots of each set follow. What this shows is that it is important to visualize the data as just a good regression can be misleading*.

#### **7. Discrete Optimization Modeling**

1. Consider the problem of allocating resources to three users. The allocations are X, Y, and Z. User 1 total revenue is 6X-X2. User 2 total revenue is 7Y– 1.5Y2. User 3 total revenue is 8Z–0.5Z2. The goal is to maximize (6X–X2) <sup>+</sup> (7Y–1.5Y2) <sup>+</sup> (8Z–0.5Z2) given 6 units of resources available.

Show how to solve this allocation problem using discrete dynamic programming with integer allocations. Show how the dynamic programming network would be modified to be able to consider 8 integer resources as well as 6 resources to allocate to the three users having the same net benefit (total return) functions. What would the integer allocations and total returns be given 8 available resources? Show how this can be solved using the forward moving and backward moving approaches.

To show that DP was used, show all F(S) values for each node S, and best decision (arrow or heavy line) if more than one possible decision.

*Solution* : *Back*w*ard method*

*For* 8 *resources* : *X* = 2, *Y* = 1, *Z* = 5 *for a total of* \$ 41. *For* 6 *resources* : *X* = 1, *Y* = 1, *Z* = 4 *for a total of* \$34.5.

2. (a) Using dynamic programming (i.e., a DP network) solve the following capacity expansion problem for the next 20 years (4 5-year construction periods) using forward and backward moving approaches.

The following table provides estimates for the costs of additional water treatment plant capacity needed at the end of each 5-year period for the next 20 years. Find the capacity expansion schedule that minimizes the present values of the total future costs. If there is more than one least-cost solution, indicate which one you think is better, and why.


Note: The discrete options in the first 5-year period are to add 2, 4, 6, 8 or 10 units of capacity. In period 2 one can add any discrete even amount of capacity up to a total capacity of 10 units so if the beginning period capacity is 2 at least 4 and at most 8 units can be added. And so on to the last period which must have an initial capacity of at least 8, and if so only two units can be added to reach 10 units total.


(*a*)*Solution* 1 : 10, 0, 0, 0. (*a*)*Solution* 2 : 6, 0, 4, 0. *Both costing* 26. *Best decision*? *Depends on other criteria*.

(b) *The discount factor is* :

(*Cost at beginning of* 5 − *year period t*)/(1 + *annual interest rate*) 5(*t*−1)


Find the wastewater treatment efficiencies at sites 1 and 2 that meet stream quality standards at sites 2 and 3 at a total minimum cost. Currently there is no treatment. All the wastewater is discharged into the stream.

Available Data:

Stream flow = 1000 m3/day at all sites. 1 kg/day/1000 m3/day = 1 mg/l. Fraction of waste discharged into stream at site 1 that reaches site 2: 0.25.

Fraction of waste discharged at site 1 that reaches site 3: 0.15.

Fraction of waste at and discharged into stream at site 2 that reaches site 3: 0.60.

Limits of treatment: removal of 30% required, but no more than 90%, for both sites. The initial concentration just upstream of site 1 is 32 mg/l.

The marginal cost of treatment at site 1 is 30 over the range of possible treatment fractions.

The marginal cost of treatment at site 2 is 20 over the range of possible treatment fractions.

Can you find the least-cost solution that meets the quality standards using dynamic programming?

Dynamic programming formulation:

States are existing discrete concentrations at site i

Stages are sites i

Decisions are the waste removal fractions xi at sites i = 1 and 2.

Transition function for pollutant concentrations Pj at sites j (quality).

Pj = Pi + (Wi/Qi)(1 − xi) aij where a12 = 0.25 and a23 = 0.60. Pj <sup>≤</sup> PMax i

While this is a dynamic programming network one does not need to apply dynamic programming to see the least-cost path from 32 mg/l at site 1 to 23 mg/l at site 3 while not exceeding 18 mg/l at site 2. That path involves 80% treatment at both sites 1 and 2. Pollutant levels less than 23 at site 3 were not considered since that would add to the cost that is to be minimized.

#### 4 Blueberries

There are three farmer's markets that sell organically and locally grown blueberries. The farmer who grows these blueberries gets 90 percent of the income from their sales; the markets get the other 10%. The demand for blueberries differs at each market. Some smart economist has determined that the demand (unit price) functions for blueberries at the three markets (m = 1,2,3) are 6/(1 + Q1), 7/(1 + 1.5Q2), and 8/(1 + 0.5Q3), respectively.

At each market m the unit price varies each week depending on the amount of blueberries available, Qm, to be sold. How should the farmer distribute a crop ranging from 1 to 6 bushels of blueberries each week to maximize the total amount of income received from all three markets?

Solve for the maximum revenue obtainable from a total of 6 bushels using discrete dynamic programming, assuming integer allocations. Use both backward and forward approaches. Show your work on a network, not just the solution.

*Assuming beginning with a total of 6 and a maximum allocation to each market of 4 and a minimum allocation of 1, and ending with nothing left over:*

*The links are the possible allocations, Q. The number on each link is the total revenue, TR, obtained for the particular allocation. The black numbers in the nodes are the remaining bushels of blueberries to be allocated. The red numbers are the maximum revenue obtainable from remaining allocation decisions. The green numbers are the maximum revenue that could be obtained from previous allocation decisions. The red and green numbers depend on the existing remaining bushels, the black numbers. The red links are the best decisions going forward, obtained from the backward moving approach, and the green arrows are the best decisions to have been made getting to the node or state, found by using the forward moving approach*.

#### **8. Linear Optimization Modeling**

#### 1. Bake Sale:

For a community fund raising event cakes and pies are to be sold. Find how many cakes and pies should be baked to maximize total income.

Let A and B be the number of cakes and B the number of pies produced. The following data apply:


There are 80 pans and 280 person hours available, and because of limited cake ingredients, no more than 50 cakes (A) can be produced.

> The model can be written Max total income = 6A + 8B Subject to : Pan Constraint : A + B ≤ 80 Labor Constraint : 2A + 4B ≤ 280 Ingredient Constraint : A ≤ 50 Model Solution : A = 20,B = 60, total income = \$600.

#### 2. Diet model

You manage the local SPCA (Society for the Prevention of Cruelty to Animals). Your dogs need to eat and there are two *varieties of dog food* available: foods D and C. Their unit costs are \$1.10 and \$0.90 respectively. Your job is to find the least-cost combination of pounds of D and C for each dog that meets various nutrition constraints shown on the table below. The ingredients are expressed in per pound of D and C.

> *Ingredient D C Daily minimum*/*dog*/*day Protein* 3 *ounces* 4 *ounces* 8 *ounces Carbohydrate* 5 *ounces* 12 *ounces* 11 *ounces Iron* 30 *mg* 35 *mg* 100 *mg*

(a) First describe your objective function and constraints in words.

*Minimize cost of dog food while providing requirements for protein, carbohydrate, and iron.*

(b) Define the parameters and variables, and their units, that you can use to create a mathematical model.

*Parameters* : *ounces of protein per pound of D and C*.

*Ounces of carbohydrate per pound of D and C*. *Mg of iron per pound of D and C*. Cos*t per pound of D and C Minimum daily requirements of ounces of protein and carbohydrate Minimum daily requirements of mg of iron*.

*V ariables* : *Pounds of D and C to buy*.

(c) Express the model mathematically.

```
Model : Minimize 1.10 D + 0.90 C
 subject to :
    3D + 4C ≥ 8.
    5D + 12C ≥ 11.
    30D + 35C ≥ 100.
    D ≥ 0,C ≥ 0.
```
(d) Show the solution by plotting the constraints and objective function on a graph of D versus C.

3. Labor Scheduling:

A social welfare program involves three projects. Projects A, B, and C require 18, 12 and 30 person months to complete. Four qualified social workers are available to work on these projects.

Their monthly salaries are \$3000, \$3500, \$3200, and \$3900 respectively.

All projects must be completed in 18 months, and each social worker can be assigned only to one project in each 6-month period. Multiple workers can be assigned to the same project.

Find the allocation of each worker to each job that minimizes the total cost of completing the projects.

*Solution* :

*Consider* 6 − *month* w*ork periods t*, *V ariables* : *Xijt* = 1 *if* w*orker Wi is assigned to project j during period t*, 0 *other*w*ise*. *Si* = *salary of Wi in six* − *month period* = 6 *times monthly salary*. *Pj* = *labor requirements of project j in* 6 − *month periods*. *Person* − *periods*. *P*1 = 3, *P*2 = 2 *and P*3 = 5 *C* = *total* cos*t*

*Model* :

*Minimize C*

*Subject to* :

$$\sum\_{j} Xjt \le 1 \qquad \forall t \quad \text{limits each worker to only one job in each period t}$$

$$\begin{aligned} C &= \sum\_{j \nearrow} Si \ Xjt \qquad \text{where } S1 = \ $3000^{\circ}6, S2 = \$ 3500^{\circ}6, S3 = \ $3200^{\circ}6, S4 \\ S4 &= \$ 3900^{\circ}6 \end{aligned}$$

$$Pj = \sum\_{i \nearrow} Xijt, \qquad \forall j \quad where P1 = 3, P2 = 2 \text{ and } P3 = 5$$

*All Xijt are integer binary* 0, 1 v*ariables*. *Solution* : *Cost* = \$198, 000. *t* : 1, 2, 3 *W*1 : *ACB W*2 : *A C W*3 : *ACB W*4 : *C*

4. A transportation problem

Assume there are 4 warehouses containing *Personal protective equipment*, commonly referred to as "*PPE*," supplies being used at 6 hospitals. Given the supplies available at each warehouse and the demand at each hospital, and the unit costs of transporting them (all known values), construct a model to determine how much gets transported from each warehouse to each hospital that minimizes the total transportation costs.

To do this you need to make up your notation for all variables and parameters. Plug in values of the parameters of the model and solve it to find how much is shipped from each warehouse to each hospital.

What condition must be satisfied for your model to be feasible?

 *j*

*Solution* : *Let X* (*i*, *i*) *be the amount shipped from supply* w*arehouse i to hospital j*. *W*(*i*) *be the supply of PPE a*v*ailable at* w*arehouse i*. *H*(*j*) *be the demand for PPE at hospital j*. *C*(*i*, *j*) *be the cost per unit of PPE shipped from i to j*. *Minimize i j C*(*i*, *j*)*X* (*i*, *j*) ' *i X* (*i*, *j*) ≥ *H*(*j*) *j* = 1,..., 6

To be feasible the total supply at all warehouses must equal or exceed the total demand at all hospitals.

*X* (*i*, *j*) ≥ *W*(*j*) *i* = 1,..., 4

5. Forest management

A particular State Forest has four different subareas whose characteristics such as species composition, age distribution, drainage, soil characteristics, etc. are similar. The areas of these subareas are known. Recent growth studies have produced predictions of the volumes per hectare for each subarea for the next 50 years. The forest manager is responsible for defining a cutting schedule that will produce a steady supply of logs to be cut into lumber over the 50-year life span of the forest. Her goal is to maximize a constant amount of wood (volume) that can be converted to lumber every year.

Develop a model for determining just how much volume can be cut in each subarea in each of 5–10-year periods. Once trees in any area are cut that area cannot be cut over again for another 50 years. Cutting trees from the forest in this sustainable way increases water yields, the quality of wildlife habitat, and timber income.

Define the variables, parameters, and constraints you need, and use them to build and solve a model for identifying the best cutting schedule—i.e., how much to cut, where, and when.

> *Let* v*olume be the unkno*w*n maximum constant* v*olume of* w*ood cut from the forest in each period*. *H*(*j*, *t*) = *the number of hectares to be cut in subarea j in period t*. (*unkno*w*n*) *V*(*j*, *t*) *be the kno*w*n estimated a*v*erage* v*olume per hectare in subarea j in period t*. *A*(*j*) = *the kno*w*n total number of hectares of land in subarea j*. *Maximize V olume*

$$\begin{aligned} & \text{Subject to } : \\ & \sum\_{j} H(j, t) V(j, t) \ge Volume \ t = 1, \dots, \mathfrak{K} \\ & \sum\_{t} H(j, t) \le A(j) \qquad j = 1, \dots, 4 \end{aligned}$$

#### 6. Water Quality Management Model

Find the wastewater treatment efficiencies at sites 1 and 2 that meet stream quality standards at sites 2 and 3 at a minimum total cost. Currently there is no treatment. All the wastewater is discharged into the stream.

#### Available Data: Stream flow <sup>=</sup> 1000 m3/day at all sites. 1 kg/day/1000 m3/day <sup>=</sup> 1 mg/l.

Fraction of waste discharged into stream at site 1 that reaches site 2: 0.25. Fraction of waste discharged at site 1 that reaches site 3: 0.15.

Fraction of waste at and discharged into stream at site 2 that reaches site 3: 0.60.

Limits of treatment: removal of 30% required, but no more than 90%, for both sites. The initial concentration just upstream of site 1 is 32 mg/l.

Can you find the least-cost solution that meets the quality standards without knowing the cost functions for treatment?

```
Solution :
Model : Assume marginal costs, c1 and c2, are constant
 between 0.3 and 0.9 removal
fractions and that because of greater waste loads at site 1 than at
 site 2, c1 ≥ c2.
Minimize = c1∗x1 + c2∗x2.
Quality at site 2.
   (32 + 200∗(1 − x1))∗0.25 ≤ 18.
Quality at site 3. 
    32 + 200∗(1 − x1))∗0.15 + 100∗(1 − x2)
                                             ∗0.60 ≤ 23.
Treatment restrictions.
   x1 ≤ 0.9; x2 ≤ 0.9;
   x1 ≥ 0.3; x2 ≥ 0.3;
Marginal costs :
   c1 = 30 assumed.
   c2 = 20 assumed.
Model Solution :
Objective value : 40.00000
V ariable V alue
x1 0.8000000
x2 0.8000000
Equivalent model :
```
*Note: From diagram, one can see if c1>*1/2 *of c2, solution will stay at above solution. One may not need cost data to find the least-cost solution. (But financing folks will need to know this.) Message: Use models to determine what data are needed and how accurate those data must be to identify optimal solutions*.

#### **9. Some Linearization Methods**

1. Groundwater pumping:

This is an exercise in the use of fixed costs and piecewise linear variable costs. Show how to consider the following cost functions for supplies S.


Develop a model to find the minimum cost to meet a demand from two sources of groundwater. Assume:

Qa <sup>=</sup> flow from source A—unknown m3/day Qb <sup>=</sup> flow from source B—unknown m3/day Ca(Qa) = cost function. \$ Cb(Qb) = cost function. \$ Demand <sup>=</sup> required to be met. m3/day Ka, Kb <sup>=</sup> maximum flow capacity of well fields A and B, respectively. m3/day To find cost effective ways of meeting demand:

> *Minimize* : *Cost* = *Ca*(*Qa*) + *Cb*(*Qb*) *Subject to* : *Qa* + *Qb* ≥ *Demand Qa* ≤ *Ka Qb* ≤ *Kb*

*Plus the equations and* v*ariables needed to con*v*ert cost functions*

*Ca*(*Qa*) *and Cb*(*Qb*)*to a linear form*, *including the use of* 0, 1 v*ariables*.

*For either a or b* :

*For cost function* 1 : *C*(*Q*) = 10 *Q For cost function* 2 : *C*(*Q*) = 5 *Q For cost function* 3 : *C*(*Q*) = 8(*q*1) + 15(*q*2); *q*1 + *q*2 = *Q*; *q*1 ≤ 5. *For cost function* 4 : *C*(*Q*) = 20*z* + 5*Q*; *Q* ≤ *K z*;*z* = (0, 1). *For cost function* 5 : *C*(*Q*) = 14*z* + 4(*q*1) + 12(*q*2); *q*1 ≤ 6; *q*1 + *q*2 = *Q*. *Q* ≤ *K z*;*z* = (0, 1). *For cost function* 6 : *C*(*Q*) = 20(*z*1) + 5(*q*1) + (20 + 7 ∗ 5)(*z*2) + 3(*q*2). *q*1 ≤ 7(*z*1); *q*1 + 7(*z*2) + *q*2 = *Q*;*z*1 + *z*2 ≤ 1. *z*1 = (0, 1); *z*2 = (0, 1).

Now consider increasing demands for flow over time. Develop a model that finds the minimum cost pumping schedule over time. Just assume Ca() and Cb() as the cost functions for adding additional flow capacity in any period t.

*Let* :

*Qa*(*t*), *Qb*(*t*) = *the total flo*w *from each* w*ellfield at end of period t*, *AQa*(*t*) *and AQb*(*t*) = *the additional flo*w *added in period t*, *Ca*(*AQa*(*t*)) *and Cb*(*AQb*(*t*)) = *the cost of the additional flo*w, *Demand*(*t*) = *the demand at end of period t Gi*v*en the estimated demands Demand*(*t*) *o*v*er time t*, *the capacity expansion problem is to* :

$$Minimize \sum\_{t} \left(1 + r\right)^{-t} [Ca(AQa(t)) + Cb(AQb(t))]$$

Subject to :

*Qa*(*t*) + *Qb*(*t*) ≥ *Demand*(*t*) *Qa*(*t* − 1) + *AQa*(*t*) = *Qa*(*t*) *Qb*(*t* − 1) + *AQb*(*t*) = *Qb*(*t*) *Qa*(*t*) ≥ *Qa*(*t* − 1); *Qa*(*t*) ≤ *Ka Qb*(*t*) ≥ *Qb*(*t* − 1); *Qb*(*t*) ≤ *Kb For all t*

2. Capacity expansion problem

To meet a growing demand for public housing, a community has decided to build more housing units. There are two sites where this can be done, and the question is which site is less expensive over time. Assume these sites are named A and B. Let A(t) and B(t) be the capacity of each of those sites at the beginning of period t. Let KA(t) and KB(t) be the added capacity in period t, costing Ca(KA(t)) and Cb(KB(t)). Construction periods last 5 years; hence each period t will be a 5-year period. Costs must be paid at the beginning of each period.

Cost functions:

Ca(KA(t)) = 15 + 8 KA(t) if KA(t) > 0; otherwise = 0.

Cb(KB(t)) = 5 + 9KB(t) if KB(t) > 0; otherwise = 0.

Assume these apply in each period t.

r = annual interest rate. Discount factor : 1/((1 + *r*) ∧ (5 ∗ (*t* − 1)))

Projections of future demands for public housing have been made. Estimates of total capacity requirement are:

End of period 1 5 End of period 2 10 End of period 3 18 End of period 4 33

Solve using linear programming, and show the sensitivity of the solution to the value of the annual interest rate r.

*Variables At and Bt are the additions to the housing capacities in period t. Ct is the total housing capacity at the end of period t. CAt and CBt are the costs incurred in period t. Dt is the discount factor for period t*.

*Minimize PWC*; *D*1 = 1; *D*2 = 1/((1 + *r*) <sup>∧</sup>5); *D*3 = 1/((1 + *r*) <sup>∧</sup>10); *D*4 = 1/((1 + *r*) <sup>∧</sup>15); *PWC* = *D*1 ∗ (*CA*1 + *CB*1) + *D*2 ∗ (*CA*2 + *CB*2) + *D*3 ∗ (*CA*3 + *CB*3) + *D*4 ∗ (*CA*4 + *CB*4); *CA*1 = 15 ∗ *ZA*1 + 8 ∗ *A*1; *CB*1 = 5 ∗ *ZB*1 + 9 ∗ *B*1; *MaxCap* ∗ *ZA*1 ≥ *A*1; *MaxCap* ∗ *ZB*1 ≥ *B*1; *CA*2 = 15 ∗ *ZA*2 + 8 ∗ *A*2; *CB*2 = 5 ∗ *ZB*2 + 9 ∗ *B*2; *MaxCap* ∗ *ZA*2 ≥ *A*2; *MaxCap* ∗ *ZB*2 ≥ *B*2; *CA*3 = 15 ∗ *ZA*3 + 8 ∗ *A*3; *CB*3 = 5 ∗ *ZB*3 + 9 ∗ *B*3; *MaxCap* ∗ *ZA*3 ≥ *A*3; *MaxCap* ∗ *ZB*3 ≥ *B*3; *CA*4 = 15 ∗ *ZA*4 + 8 ∗ *A*4; *CB*4 = 5 ∗ *ZB*4 + 9 ∗ *B*4; *MaxCap* ∗ *ZA*4 ≥ *A*4; *MaxCap* ∗ *ZB*4 ≥ *B*4; *All ZAi and ZBi* v*ariables are binary* 0, 1 v*alues*. *Demands*; *A*1 + *B*1 = *C*1; *C*1 ≥ *Dem*1; *C*1 + *A*2 + *B*2 = *C*2; *C*2 ≥ *Dem*2; *C*2 + *A*3 + *B*3 = *C*3; *C*3 ≥ *Dem*3; *C*3 + *A*4 + *B*4 = *C*4; *C*4 ≥ *Dem*4; *MaxCap* = 50; *Set r to different* v*alues as sho*w*n belo*w. *Demands at end of period t* : *Dem*1 = 5;

*Dem*2 = 10; *Dem*3 = 18; *Dem*4 = 33.

*Results* :


Notice the impact of an increasing interest rate on the capacity expansion schedule.

	- (a) What are the allocations that result in the maximum total income?
	- (b) If you have only 14 resources to allocate, show how you could get an approximate solution using linear programming.
	- (c) Show how the model would be modified to obtain the maximum equal income for both users.
	- (a) *Finding the slope functions by differentiating each function and setting them to* 0 *results in A and B* = 10.
	- (b) *Consider the following allocation model*.

*Maximize* (10*A*–0.5*A*2) <sup>+</sup> (5*B*–0.25*B*2) *where A and B cannot exceed* 14.

*A solution: Dividing A and B into two segments of* 5 *each. Calculate the linear slopes and add the new variables and constraints as indicated below*.

$$\begin{aligned} &\left(10^{\*}\left(5\right)-0.5^{\*}\left(\mathbb{S}^{2}\right)\right)/5 = sa1; \\ &\left(\left(10^{\*}\left(10\right)-0.5^{\*}\left(10^{2}\right)\right)-\left(\left(10^{\*}\left(5\right)-0.5^{\*}\left(\mathbb{S}^{2}\right)\right)\right)\right)/5 = sa2; \\ &\left(\left(5\*\left(5\right)-0.25\*\left(\mathbb{S}^{2}\right)\right)/5 = sb1; \\ &\left(\left(5^{\*}\left(10\right)-0.25^{\*}\left(10^{2}\right)\right)-\left(\mathbb{S}^{\*}\left(5\right)-0.25^{\*}\left(\mathbb{S}^{2}\right)\right)\right)/5 = sb2. \end{aligned}$$

*Linear model*:

$$\begin{aligned} \text{Max} &= \text{sa1}^\* \text{a1} + \text{sa2}^\* \text{a2} + \text{sb1}^\* \text{b1} + \text{sb2}^\* \text{b2}, \\ \text{A} &= \text{a1} + \text{a2}; \text{a1} \le \text{5}; \text{ B} = \text{b1} + \text{b2}; \text{b1} \le \text{5}; \quad \text{[Res]} &\text{A} + \text{B} \le 14. \end{aligned}$$


*Or one could take mid slopes of original non-linear income functions* (*that range from* 0 *to* 10), *say at* 2.5 *and* 7.5 *for determining the linear slopes of the approximate income function in each segment. Finding slopes of functions is discussed in the next chapter*.

$$\begin{aligned} \text{Maximize } sa1^\*a1 + sa2^\*a2 + sb1^\*b1 + sb2^\*b2. \\ (10 - (2.5)) &= sa1; \\ (10 - (7.5)) &= sa2; \\ (5 - 0.5^\*(2.5)) &= sb1; \\ (5 - 0.5^\*(7.5)) &= sb2. \\ A &= a1 + a2; a1 \le 5; \ B = b1 + b2; \ b1 \le 5; \ \text{[Res]}A + B \le 14. \end{aligned}$$

*The slopes are the same, as is the solution, but this entire model including the slope definitions are linear. Compare this solution with that of Exercise* 3 *in Chap.* 11.

(c) *If the objective were to find the maximum equal income the model and solution are*:

> *Maximize EqualIncome*; *sa*1∗*a*1 + *sa*2∗*a*2 ≥ *equalincome*; *sb*1∗*b*1 + *sb*2∗*b*2 ≥ *equalincome*; (10 − (2.5)) = *sa*1; (10 − (7.5)) = *sa*2; (5 − 0.5∗(2.5)) = *sb*1; (5 − 0.5∗(7.5)) = *sb*2.


Row Slack or Surplus Dual Price RES 0.000000 1.071429

#### **9. Solving Models Using Calculus**

1. Warmup.

The following examples show that if you want to compute the average value of a function over a range of values, you should compute the average of different functional values rather than computing the function's value of the average input value.

*A* = *a*1 + *a*2; *a*1 ≤ 5; *B* = *b*1 + *b*2; *b*1 ≤ 5; [*Res*]*A* + *B* ≤ 14.


Consider each of these functions:

#### Note that:

For concave functions:

Mean of function values ≤ function value for mean x.

15 5/<sup>6</sup> <sup>=</sup> <sup>15</sup>.<sup>83</sup> <sup>≤</sup> <sup>10</sup>(2.5)−2.52 <sup>=</sup> <sup>18</sup>.<sup>75</sup>

For convex functions:

Mean of function values ≥ function value for mean x

<sup>91</sup>/<sup>6</sup> <sup>=</sup> <sup>9</sup>.<sup>167</sup> <sup>≥</sup> <sup>2</sup>.52 <sup>=</sup> <sup>6</sup>.<sup>25</sup>

For linear functions:

Mean of function values = function value for mean x 12.5 = (5)2.5 = 12.5

Show that the true mean is between these two values for each function.

*One can integrate the function and divide by the interval over which it applies. In this case one-fifth of the integral from* <sup>0</sup> *to* <sup>5</sup> *of* (10*x*−*x*2) *is* (2/3) 52 <sup>=</sup> 16 2/3 *and a fifth of the integral of x*<sup>2</sup> *from* <sup>0</sup> *to* <sup>5</sup> <sup>=</sup> 8 1/3.

*This shows that*: *For concave functions*:

> *Mean of function* v*alues* ≤ *true mean* ≤ *function* v*alue for mean x*. 155/6 ≤ 162/3 ≤ 18.75

*For convex functions*:

*Mean of function* v*alues* ≥ *true mean* ≥ *function* v*alue for mean x*

$$91/6 \quad \ge \quad 81/3 \quad \ge \quad 6.25$$

*For linear functions*:

*Mean of function* v*alues* = *true mean* = *function* v*alue for mean x* 12.5 = 12.5 = 12.5

*Calculating the mean based on the two end points of concave or convex functions is assuming they are linear. It underestimates the mean for concave functions, and overestimates the mean for convex functions, as shown in the above figure*.

1. Benefit Cost analysis.

Assume a benefit function B <sup>=</sup> 60\*x0.8 and a cost function C <sup>=</sup> <sup>4</sup> <sup>+</sup> 7\*x1.5. The maximum difference between B and C are the net benefits, NB.

(a) Find the value of x that results in the maximum net benefits.

$$\begin{aligned} \, ^d d & \text{NB/dx} = 0 = d \left( 60 \ast \text{x}^{0.8} - \left( 4 + 7 \ast \text{x}^{1.5} \right) \right) / d \text{x} \\ \, ^{0.8} (60) / \text{x}^{0.2} &= 1.5 (7) \text{x}^{0.5} \text{ or } \text{x}^{0.7} = (48/10.5) \\ \, ^{7} \text{Thus, it occurs when } \text{x} &= 8.768622. \end{aligned}$$

(b) Would an increase in the fixed cost of 4 affect the value of x?

*Solution* : *It could if it caused the* cos*t function to be abo*v*e the benefit function*, *in* w*hich case x* w*ould* = 0.

2. Water supply utility

You are a mayor of a town that is considering privatizing the public water supply system. Currently the public water supply system is operating in such a way that maximizes the benefits to its consumers (willingness to pay) while still paying for the service. No profit is made. If it is privatized, the private company will want to maximize its profits (revenue less costs).

For example, consider the functions shown below:

The horizontal axis is the amount of water delivered, and the vertical axis is money representing the unit price of water charged, the total and marginal costs and the total and marginal revenue.

Willingness to pay is the area under the demand curve.

Public utility objective: maximize willingness to pay less cost of supplying water.

Private utility objective: Maximize total revenue less cost of supplying water.

Total revenue is unit price times the quantity Q sold.

For an amount of water Q assume the total cost = 5Q and the demand function = unit price = 12–1.5Q.

Given these data, find the best amounts of water to deliver and the associated unit prices to charge for both a public and private utility. The public utility should maximize consumer surplus (willingness to pay less its costs, and the private utility will maximize its producer surplus or profit (subject to any regulations it must meet. In this example there are none.).

Find the solutions and graph the solutions like in the figures above. Identify on the graph the consumer's surplus, producer's surplus, and total cost.

For a public utility what should the unit price be for the water supplied, and how does it compare to the marginal cost?

For a private utility what should the unit price be for the water supplied, and how does it compare to the marginal cost? Hence what is the unit and total profit?

*Solution* : **Private utility** : *Maximize Net Re*v*enue* = *Total Re*v*enue* − *Cost Total re*v*enue* = *price* <sup>∗</sup>*quantity* = (12 − 1.5*Q*)*Q Cost* = 5*Q Maximize* <sup>12</sup>*<sup>Q</sup>* <sup>−</sup> <sup>1</sup>.5*Q*<sup>2</sup> <sup>−</sup> <sup>5</sup>*<sup>Q</sup> d* <sup>12</sup>*<sup>Q</sup>* <sup>−</sup> <sup>1</sup>.5*Q*<sup>2</sup> <sup>−</sup> <sup>5</sup>*<sup>Q</sup>* /*dQ* = 0 = [12 − 2(1.5)*Q*] − 5 = 7 − 3*Q so Qpri* = 7/3 = 2.33 *This occurs* w*hen the marginal re*v*enue* = *marginal* cos*t* = 5. *The unit price* = 12 − 1.5(7/3) = 8.5. *Hence*, *the unit profit* = 8.5 − 5 = 3.5. *Total profit* = 3.5(7/3) = 8.167.

**Public Utility** : *Maximize Consumer Surplus* : *Consumer surplus* = 0.5 *q*∗ *Po* − *Po* − 1.5*q*<sup>∗</sup> + *q*∗ *Po* − *bq*<sup>∗</sup> − 5*q*<sup>∗</sup> *Maximize* 0.5 12 − 12 − 1.5*Qpub Qpub* + *Qpub* 12 − 1.5*Qpub* − 5*Qpub* = −0.75*Q*<sup>2</sup> *pub* + 7*Qpub d* <sup>−</sup>0.75*Q*<sup>2</sup> *pub* <sup>+</sup> <sup>7</sup>*Qpub* /*dQpub* = 0 = −1.5*Qpub* + 7 *Thus*, *Qpub* = 7/1.5 = 4.67 *Note* : *Qpub*(4.67) *equates unit price* (12 − 1.50(4.67))*to marginal cost* (5).

#### **11. Lagrangian Models**

1. Benefit Cost analysis.

Assume a benefit function B = 60\*xˆ.8 and a cost function C = 4 + 7\*xˆ1.5. The maximum difference between B and C, the maximum net benefits, occurs at x = 8.7686.

(a) Would an increase in the fixed cost of 4 affect the value of x?

Solution: It could if it caused the cost function to be above the benefit function, in which case x would = 0.

(b) Use a Lagrangian model to find the value of the shadow price, or Lagrangian multiplier, if x cannot exceed 5. What does the multiplier signify?

Solution :

$$\begin{aligned} \mathbf{L} &= 60^{\circ} \mathbf{x}^{0.8} - \left( 4 + 7^{\circ} \mathbf{x}^{1.5} \right) - \lambda^{\circ} (\mathbf{x} - \mathbf{S}) \\ &0 = 0.8^{\circ} 60^{\circ} \mathbf{x}^{(0.8 - 1)} - 1.5^{\circ} 7^{\circ} \mathbf{x}^{(1 - 0.5)} - \lambda \\ &0 = \mathbf{x} - \mathbf{5} \quad \text{an equality since x wants to be more than 5.} \end{aligned}$$

*When solved, x* = *5 and* λ = *11.31, the change in net benefits for a change in 5. It is the slope of the net benefit function at x* = *5.*

2. Allocating resources

Consider the problem of allocating resources to three users. The allocations are X, Y, and Z. User 1's total revenue is 6X/(1 + X). User 2's total revenue is 7Y/(1 + Y). User 3's total revenue is 8Z/(1 + Z). Assume 10 resources are available.

Show how to find the allocations that maximize the total revenue from all three users, and the associated shadow price of the resource constraint, using Lagrange multipliers. Compare that solution with one obtained from solving the model itself, say using Solver in Excel.

*Setting the slopes equal and to the shado*w *price* λ :

6/(1 + *x*) <sup>2</sup> <sup>=</sup> <sup>λ</sup>; <sup>7</sup>/(<sup>1</sup> <sup>+</sup> *<sup>y</sup>*) <sup>2</sup> <sup>=</sup> <sup>λ</sup>; <sup>8</sup>/(<sup>1</sup> <sup>+</sup> *<sup>z</sup>*) <sup>2</sup> <sup>=</sup> <sup>λ</sup>; *and x* <sup>+</sup> *<sup>y</sup>* <sup>+</sup> *<sup>z</sup>* <sup>=</sup> <sup>10</sup>. Results in :

Variable Value x 3.018770 λ 0.3715058 y 3.340768 z 3.640461

*Compared to:*

$$\text{Maximize}[6^\*x/(1+x)+7^\*y/(1+y)+8^\*z/(1+z)] \text{ subject to } \text{x}+\text{y}+z=10.$$

```
Objective value: 16.17042
  Variable Value
     x 3.018766
     y 3.340763
     z 3.640471
  Row Dual Price λ
  Resource constraint 0.3715060
```
3. There are two users of resources, A and B, whose income depends on the resources they are allocated. Let those allocations be *A* and *B* respectively. The income to user A equals 10*A*–0.5*A*2. The income to user B is 5*B*–0.25*B*2. You wish to know what allocations result in the maximum total income. You only have 14 resources to allocate and are curious what marginal increase in total income could result if you had a little more resources.

*Solving a Lagrange model: Noting that the maximum income values for A and B are* 10 *each, thus the constraint A* + *B*≤14 *will be an equality*,

$$\begin{aligned} \text{L} &= \left(10A - 0.5A^2\right) + \left(5B - 0.25B^2\right) - \lambda(A + B - 14) \\ \partial \text{L}/\partial A &= 0 = 10 - A - \lambda \\ \partial \text{L}/\partial B &= 0 = 5 - 0.5B - \lambda \\ \partial \text{L}/\partial \lambda &= 0 = A + B - 14 \end{aligned}$$

*From these equations*, *A* = 8; *B* = 6; λ = 2, *the marginal income gain for a unit change in* 14.

#### **12. Dealing with Uncertainty**

1. You have a job that requires you to be protected some of the time. The probability that the needed hours of protection, P, will be less than p is 0.2p–0.01p*2*. The cost of protection is \$50 each hour. What is the expected daily cost for your protection?

*The cumulati*v*e distribution* <sup>0</sup>.2*<sup>p</sup>* <sup>−</sup> <sup>0</sup>.01*p*<sup>2</sup> *equals* <sup>1</sup> <sup>w</sup>*hen p* <sup>=</sup> <sup>10</sup>. *The probability distribution of P must be d*(0.2*<sup>p</sup>* <sup>−</sup> <sup>0</sup>.01*p*2)/*dp* = 0.2 − 0.02*p for p* ≤ 10. *The area of the distribution* = 1 w*hen p* = 10. *One minus the cumulati*v*e distribution* (<sup>1</sup> <sup>−</sup> <sup>0</sup>.2*<sup>p</sup>* <sup>+</sup> <sup>0</sup>.01*p*2) *is the exceedance distribution*. *Area under the exceedance distribution is the mean of P*. *Expected cost* = \$50 *times mean P*.

$$\text{Expected cost from protection} = \ $\$ 0 \left[ \int\_0^{10} \{1 - (0.2p - 0.01p^\diamond 2) \} dp \right]$$

= \$50(10 − 10 + 10/3 = *mean* v*alue of P* = 0.33) = \$166.66 *per day*.

2. Probability of being flooded.

The probability of a flood expected to be exceeded once in n years on average is called the n-year flood. What is the probability of observing at least one 100-year flood or greater over a 30-year period, assuming annual floods (maximum flows in a year) are independent events?

> *Solution* : *Find* 1 − *probability of not being flooded in* 30 *years*. *Probability* = 1 − (1 − 1/*n*) <sup>30</sup>. *If n* <sup>=</sup> <sup>100</sup>, *Probability of seeing at least one flood exceeding the* 100−*year flood is* 1 − (1 − 1/100) 30 <sup>=</sup> <sup>1</sup> <sup>−</sup> <sup>0</sup>.9930 <sup>=</sup> <sup>0</sup>.26.

3. State Lottery

You are asked to establish a State lottery where the cost per ticket is \$1. Each ticket has a 3-digit number; each number is equally likely. Owners of winning tickets receive \$500 for each winning ticket.

Suppose you buy 1 ticket a week for an entire year, i.e., 52 tickets.

(a) Show how to calculate the probability that you will win one or more lotteries in the year. (The answer is 0.0507.)

> *Probability of* w*inning on any* w*eek* w*ith any number is* 1/1000. *Probability of losing e*v*ery time* = (1 − 1/1000) 52 1 − (999/1000) <sup>52</sup> <sup>=</sup> <sup>0</sup>.<sup>0507</sup> <sup>=</sup> *probability of* <sup>w</sup>*inning at least*1.

(b) If the lottery sells 1,000,000 tickets this week, what is the expected income to the State? Note: The expected income of 1 million tickets is the expected income from one ticket times 1 million.

*Solution* : *Expected income of each ticket* = −499(0.001) + 1(.999) = 0.500 *Thus for* 1, 000, 000 *tickets*, *expected income* = \$0.50(1, 000, 000) = \$500, 000

(c) Show how to calculate the variance of this income.

*Solution* :

*V ariance* = (−499 − 0.5) ∧2 (0.001) + (1 − 0.5) ∧2 (0.999) = 249.75 *S* tan *dard de*v*iation* = (249.75) <sup>∧</sup>0.5 = 15.8 *V ariance of* 1, 000, 000 *sales* = 1, 000, 000(249.75) *Std*. *De*v = 15.8∗1000

4. Book sale

Twice a year a town has a used book sale, and at the end of the sale they offer any book they have for \$1. The cost of handling books is estimated to be about \$0.65 per book. How many books should they have available to maximize their expected net revenue from the sale?

Past sales indicate that the probabilities of various ranges of books being demanded is as follows:


of books of demand Exceedance Pr(exceedance)


*Maximize NetBenefits*

*NetBenefits* = *ben* − *cost*; *cost* = *C*∗*x*; *C* = 65; *Ben* = 100∗(*xb*1 + *xb*2∗(1 + .9)/2 + *xb*3∗(.9 + .5)/2 + *xb*4∗(.5 + .1)/2 + *xb*5∗(.1/2)); *xb*1 + *xb*2 + *xb*3 + *xb*4 + *xb*5 = *X* . *xb*1 < 2; *xb*2 < 2; *xb*3 < 2; *xb*4 < 2; *xb*5 < 2.


#### 5. Bake sale

The mayor is considering having a \$100-dollar a plate dinner to increase the funds available for the homeless. Her problem is that she doesn't know how many people might come. Experience suggests that it largely depends on whether it rains or not.

The local weather service has indicated that the probability of a dry day is 0.70. Invitations must be sent out two weeks in advance.

If it doesn't rain there is an 80% chance that 500 people will attend, and a 20% chance that only 300 will attend (just to make it simple). If it rains, there is a 60% chance that 350 will attend and a 40% chance that only 200 will attend. Each dinner ordered in advance costs \$20. Everyone that comes must be served dinner. If additional dinners must be ordered because of a shortage, they cost \$30 each.


#### *Probability of rain* = 30%.

*Let X* = *number of dinners ordered in advance (at a cost of* \$20 *each*). *Let A* = *number of additional dinners ordered to make up demand*. (*at a cost of* \$30 *each*.)

*Let E* = *excess dinners not used*. (*at a cost of* \$20 *each*)

*Define Demand*(*i*) = *X* + *a*(*i*) − *e*(*i*) *for each possible outcome i*. 500 = *X* + *a*1 − *e*1 w*ith joint probability* 0.7(*dry* w*eather*) ∗0.8 (500 w*ill attend*) = 0.56 300 = *x* + *a*2 − *e*2 w*ith joint probability* 0.7(*dry*) <sup>∗</sup>0.2(300) = 0.14 350 = *X* + *a*3 − *e*3 w*ith joint probability* 0.3(w*et*) <sup>∗</sup>0.6(350) = 0.18 200 = *X* + *a*4 − *e*4 w*ith joint probability* 0.3(w*et*) <sup>∗</sup>0.4(200) = 0.12

*Joint probability of outcomes i*

= *Probability of* w*eather*∗*Probability of attendance*|w*eather The model objecti*v*e* : *Maximize expected net income* =

$$\begin{aligned} (100 - 20)X + [(100 - 30)a1 - (80 + 20)e1] & 0.56 \\ + [(100 - 30)a2 - (80 + 20)e2] & 0.14 \\ + [(100 - 30)a3 - (80 + 20)e3] & 0.18 \\ + [(100 - 30)a4 - (80 + 20)e4] & 12 \end{aligned}$$

*Note: X is hopefully sold and is assumed to be in the first term of the objective function*. *If less than X is sold, the excess is 'E' and the excess \$80 profit included in the first term in the objective function that assumes X is all sold must be subtracted from the objective function*.

*Solution*:

*Global optimal solution*

*Objecti*v*e* v*alue* : 31380.00


*The maximum amount the mayor would be willing to pay for a weather forecaster that could predict if rain would occur on a particular day would be the difference in expected income resulting from a dry day compared to previous solution based on expected weather values. To determine this value maximize expected income from dinners assuming no rain and subtract the expected net income without forecasting as obtained from the above model. That difference in expected income is the most she would be willing to pay for perfect weather forecasting*.

> *Maximize* (100 − 20) <sup>∗</sup>*X* + 70∗*a*1 − 100∗*e*1 ∗ 0.8 + 70∗*a*2 − 100∗*e*2 ∗ 0.2.

> > *Objecti*v*e* v*alue* : 36000.00


*In this case the most one would pay for perfect forecasting* = 36,000–31,380 = 4620.

6. Finding means, variances, medians.

For the following probability density functions, fx(x), of a random variable X, integrate them to find the equations for the cumulative distribution functions, Fx(x), (ranging from 0 to 1), and the median, mean and variance of each of the distributions. Finally, compute the area under the probability of exceedance function, 1- Fx(x).

#### 7. Swimming

Assume the admission to a public outdoor swimming pool in an urban area costs \$5 per person. Also assume the probability distribution of tickets sold per hour is uniform from 5 to 15, (as shown above in question 5). Find the expected revenue per hour. (You should be able to guess at the expected number of people buying tickets and that times \$5 will be the expected revenue.)

Assume the number of tickets sold/hour can range from 5 to 15.

$$\begin{aligned} \text{Probability of exceedance} &= 1 \text{ for } \mathbf{x} \le \mathbf{5}, \\ &= (1 - \mathbf{1}(\mathbf{x} - \mathbf{5})) \text{ for } \mathbf{5} \le \mathbf{x} \le \mathbf{15}. \\ &= 0 \text{ for } \mathbf{x} \ge \mathbf{15} \end{aligned}$$

*Hence expected re*v*enue* =

$$\begin{aligned} & \quad \ $ \$  (5) + \ $ 5 \left( \int\_{5}^{15} (1 - .1(\mathbf{x} - \mathbf{5})) d\mathbf{x} = 25 + \$  \Big( \ $ 1.5 \mathbf{x} / 2 - .1 \mathbf{x}^{2} / 2 \Big) \Big|\_{5}^{15} \right) \\ & = 25 + \$  ^\ast \Big( \Big( \ $ .5^\* 15 - .1^\* 15^{\diamond} 2 / 2 \Big) - \Big( \$  .5^\* 5 - .1^\* 5^{\diamond} 2 / 2 \Big) \Big) = 50 \\ & \quad \text{You have only x number of } \ $ (itketto \text{ to } \$  1. \text{ annotated in course is } \ $ \$  \text{x} \end{aligned}$$

*If you ha*v*e only x number of tickets to sell*, *expected income is* \$5*x if x* ≤ 5, *and* 25 + 5∗1.5∗*x* − .1∗*x*∧2/2 − 1.5∗5 − .1∗5∧2/2 *for* 5 ≤ *x* ≤ 15

#### 8. Planning a Park

A recreational park is being planned. It borders a lake. Planners need to decide at what lake level to build the recreational facilities such as docks, boat landings, picnic benches, tables, fireplaces, restrooms, etc. The potential benefits derived from these facilities increase with increasing lake level elevations due to the increasing shore-line perimeter (length) and flatter areas to develop.

The developers assume the marginal benefits obtained will equal \$5 per unit target level if the actual lake is at that target level. But the lake level varies over the recreational season. No matter what level is chosen as a target level for development, the actual level will likely differ. The developers estimate there will be a loss of \$7.5 per unit deficit (difference between target level and lower actual level) or a loss of \$1 per unit excess if the lake level is above the target level.

For example, if the target level is 5, but the actual level is 4, the net income will be \$5(5)–(5–4)7.5 = 17.5. If the actual level is 6, the net income will be \$5(5)–1(6–5) = 24.

The probability distribution of lake levels during the recreational season varies over a range of 0 to 10 units uniformly. What level within that range from 0 to 10 should be the target level that maximizes expected net income?

Discuss a modeling approach you would use to find the best value of the target level, and demonstrate its use.

*Solution suggestions*: Simulation *by trial and error*: *Pick a target level between* 0 *and* 10.

*For each successive period t, generate a probability P*(*t*) *uniformly distributed from* 0 *to* 1. *This can represent a value of the cumulative distribution of the uniform probability distribution from* 0 to 10.

*In Excel you can use the function 10Rand*() *to generate uniformly distributed lake levels from* 0 to 10. *Then depending on whether the level is below or above the target*, *compute the net benefits*, *e.g., using the Excel functions IF or MAX. From multiple samples compute the expected benefits associated with that target level. Do this for various target levels and select the best*.

*For example: Select a target* T. *Generate a value of X using x* = 10*Rand*().

*Net benefits* = 5(T)–E[*Losses*]

*Losses* = *IF*(*x* < *T*, 7.5(*T* − *x*), 1(*x* − *t*)) *ComputeE*[*Losses*]*by di*v*iding sum of all Losses by number of samples of x*.

• *Use of optimization*:

*Alternatively, you can define an optimization model having the objective of maximizing the expected net benefits*.

*Max 5\*target*—*ELoss*.

*The expected losses*, *ELoss, will involve the sum of two integrals*, *one for finding the expected losses associated with lake level deficits in the range from 0 to the unknown target, and the other for finding the expected losses from lake level excesses in the range from the target to 10. They must be integrated before using Excel to find the best value of the target*.

*Solution: Let target* = *T. the probability density function is f(L)* = *1/10 from 0 to 10*.

*ELoss* = *from* 0 *to T*: 7.5 (*T*−*L*) (*f* (*L*) *dL* + *from T* to 10: 1((*L–T*)(*f* (*L*))*dL ELoss* = *from* 0 *to T*: 7.5 (*T*−*L*) (1/10) *dL* + *from T to* 10: 1((*L–T*)(1/10)*dL ELoss* ={7.5/10 [(*TL*−*L*ˆ2/2) |0*T* + 0.1 (*L*ˆ2/2 – *TL*) |*T*10} *This results in a function of T, the target, {5 T – Eloss} that can be maximized*. *Let t be the target level*. *Maximize* 5\**t* − *ELoss ELoss* =(7.5 \* 0.1\*(*t*\**t* − (*t*ˆ2)/2) − (*t*\*0 − 0ˆ2/2)) + 1\*0.1\*(10ˆ2/2 − 10\**t* − (*t*ˆ2/2 − *t*\**t*)) (5 + 1)/(7.5 + 1) = *P* = *value of cumulative distribution at optimal target t*.

*Objecti*v*e* v*alue* : 16.17647

*V ariable V alue t* 7.058824 *ELOSS* 19.11765 *P* 0.7058824

*The value of the cumulative distribution function, FX(t)*, *associated with the optimal value of the target t, depends on the slopes of the benefit and loss functions only and not the distribution function*.

*If the lake level range were other than from 0 to 10 or if their probability distribution was not uniform, the value of P does not change, and for any distribution, P would define the cumulative distribution at the target value*.

9. Birthday problem

*What is the probability P of at least two in a group of n people having the same birthday* (*month and day*)? *Write the expression for P*.

*Solution*: 1*—probability of n people having different birthdays*

*Probability of* 2 *people having different birthday* = *probability of second person having different birthday than first* = 364/365 *thus*

*probability of 2 people having same birthdays* = 1–364/365 = 1/365

*Probability of* 3 *people having different birthday* = *probability of* 2 *not having same birthday*, 364/365, *and probability of third not having birthday on either of the* 2 *days the other two have them*. 363/365.

*Thus, probability of at least 2 having same birthday* 1 − (364/365)(363/365)(362/365)

*Probability of* 4 *people having different birthday* = *probability of* 2 *not having same birthday*, 364/365, *and probability of third not having birthday on either of the* 2 *days the other two have them*, 363/365, *and probability of fourth not having birthday on either of the* 3 *days the other three have them* 362/365.

> *Thus*, *the probability of at least* 3 *ha*v*ing same birthday* = 1 − (364/365)(363/365)(362/365)

$$\begin{aligned} \text{In general }: \\ 1 - \prod\_{2}^{n} [365 - (i - 1)/365] &= \text{P} \\ \text{Solations}: \frac{n}{20} \frac{\text{P}}{0.44} \\ 25 \ 0.60 \\ 30 \ 0.73 \\ 40 \ 0.90 \\ 50 \ 0.97 \\ 60 \ 0.998 \end{aligned}$$

10. Heart Attacks

Serious heart attacks occur in a county on average once every two weeks, but they are random. How many heart attacks should the physicians expect to respond to in a single year, on average?

*Ob*v*iously* 26 *since there are* 26 *t*w*o*−w*eek periods in a year*.

What is the probability that at least two heart attacks will occur on the same day?

*Suppose the ith heart attack occurs on day Di, one of the* 365 days *of the year*. *There are* 365 *possibilities*. *There are* 3652 *possibilities of combination of days that* *two heart attacks might occur*. *There are* 365n *possible combinations of days or sequences of days that n heart attacks might occur*.

*The probability that* 2 *heart attacks will occur on different days is* 364/365. *The probability that* 3 *heart attacks will occur on different days is* (364/365)(363/365). *The probability that n>*1 *heart attacks will occur on different days is*

(364/365)(363/365) . . . ..(365 − n + 1)/365 = 365!/ <sup>365</sup>n(<sup>365</sup> <sup>−</sup> <sup>n</sup>)! 

*When n* = 26, *probability* = 0.40 = *probability of none of the* 26 *heart attacks will occur on same day*.

*Thus, there is a*

1—*probability that heart attacks will occur on different days* = 1–0.4 = 0.6 *chance that 2 or more heart attacks may occur on same day*.

11. Taxicab problem

Three taxi stands that are serviced by taxi company: Sites A, B, and C. Three policies have been tested but not analyzed:

Policy 1: cruise around the site and pick up first person wanting a ride. Policy 2: return to nearest taxi stand and wait for rider. Policy 3: wait at nearest site for radio call. (Not available at B)

Questions:


To answer the questions, you will need data.

Data:

Average costs, Cik, of policy k at site i and resulting trip count:


Average travel costs, TCij, between sites i and j:

Average income, Yijk, costs, and net income, Rijk, from site i, policy k, and destination j:


*LP Model*:

$$\begin{aligned} \text{Maximize } & \sum\_{i} \sum\_{j} \sum\_{k} PikPijkRijk\\ \text{Subject to } & \vdots\\ \text{Pj} & = \sum\_{i} \sum\_{k} PikPijk \quad j = A, B, C\\ & \sum\_{k} Pik = Pi \quad i = A, B, C\\ & \sum\_{i} Pi = 1. \end{aligned}$$

*Solution* : *Objecti*v*e* v*alue* 13.34 = *expected return per trip*


*Steady-state probabilities of being at each site*:

*State A* : 0.0672 = *Pa* = *Pa*2 *State B* : 0.8571 = *Pb* = *Pb*2 *State C* : 0.0756 = *Pc* = *Pc*2

*Expected gains given state and best policy*:

$$\begin{aligned} g(a) &= \sum\_{j} Paj2 \ Raj2 = (1/16)8 + (0.75)2 + (3/16)4 = 2.75 \\ g(b) &= \sum\_{j} Pbj2 \ Rbj2 = (1/16)8 + (7/8)16 + (1/16)8 = 15.01 \\ g(c) &= \sum\_{j} Pcj2 \ Rcj2 = (1/8)6 + (0.75)4 + (1/8)2 = 4.0 \end{aligned}$$

*Overall maximum expected return* =

$$\sum\_{i} P \text{ig}(i) = 0.0672 \text{ g}(a) + 0.8571 \text{ g}(b) + 0.0757 \text{ g}(c)$$
 
$$= 0.0672(2.75) + 0.8571(15) + 0.0757(4) = 13.34$$

#### 12. Public library

A town's public library needs more space. Recently the town had to decide whether to relocate or renovate their public library. The old, and now empty, Woolworth Store was a potential new location. A Foundation indicated they would give the town \$2.5 million if they immediately chose the Woolworth Store. This gift would help pay the estimated relocation cost of \$9.5 million. It was not clear that the Foundation would give the \$2.5 million to the town if the town chose to renovate the existing library or to delay the relocation decision to first determine if the Woolworth Store could be rented.

The debate over what to do centered on the question of whether the Woolworth Store could be rented, and hence generate tax revenue for the town. If the library were moved to the old store, there would be no tax revenue derived from that store but there would be some income derived from the sale of the existing library building—if they could sell it.

Assume that when the Foundation made the offer, you were asked to help the town decide what to do.

You reason the town has some choices: It could decide to move its public library to the old Woolworth Store, or it could hire a consultant to evaluate the suitability of that store for another business and to obtain a better estimate of the likely income from the sale of the existing library building. If the town decides to move the library, the Woolworth relocation cost would be \$7 million (\$9.5 million less the Foundation gift of \$2.5 million) and take two years. If the town hires a consultant, the consultant will charge the town \$100,000 and require 6 months to make a recommendation. The benefits of a relocated or renovated library would be delayed by the additional 6 months required by the consultant.

If the consultant is hired and indicates the old Woolworth Store has no commercial value, then the relocation process could take place immediately, at a cost of \$7 million or \$9.5 million, depending on whether the Foundation gives the town \$2.5 million, less the expected income from the sale of the existing library building. On the other hand, if the consultant indicates the old store has commercial value, the town could act immediately to renovate the existing library, or it could wait and try to rent the store over the coming year. If after a year the store is not rented, the town would relocate the library. The relocation costs and time remain the same as before: \$7 million or \$9.5 million over two years, depending on whether the Foundation gives the town \$2.5 million, less the expected income from the sale of the existing library. In addition, the benefits of not having a new facility are further delayed by the waiting period, say a year.

Renovation of the existing library will take 2 years and cost \$13.5 million or \$11 million, again depending on the Foundation's \$2.5 million gift decision, less the expected capitalized tax revenues from the rental of the Woolworth Store (considering the possibility that it might not be rented).

If the town waits to see if it can rent the store, and succeeds in renting the store, say in a year, then it can begin the renovation of the existing library, again at a cost of \$13.5 million or \$11 million, depending on the Foundation's \$2.5 million gift decision, plus the lost benefits to the library users of delaying another year, less the capitalized (present value of the) tax revenues from renting the Woolworth Store.

Show how you would determine how to advise the town. Should the town relocate its library now or hire a consultant? What are your decision criteria? What probabilities do you need to estimate to answer this question? What other assumptions do you have to make? How would you determine how sensitive your recommendation is to all those assumptions?

*Define* : *D* = *loss from use of ne*w *library per year of delay*. *SV* = *income from sale of existing library times probability of it being sold*. *PF*(*i*) = *probability of Foundation gi*v*ing* 2.5 *Munder situation i*. *PV* = *probability consul* tan *t indicates store has commercial* v*alue*. *PR* = *probability of renting store PR* = *probability of renting store deri*v*ed from store rental*

*Work backwards from each endpoint to get expected costs. Squares are decision points; circles are chance events*.

*Perform sensitivity analyses on all assumed values, including probabilities, to see how sensitive your decision is to those assumed values*.

#### 13. Immigrants

Suppose you are a designer of a facility to temporarily house immigrants entering the country. The number of immigrants needing housing in the facility each week varies. Data exist that allow you to calculate the probability distribution of the number of people needing housing each week. Let P represent the discrete random variable for the number of people needing housing, and Pr(p) be the probability that P = p. The sum over all p of Pr(p) equals 1.

Your job is to determine the target population level of your new facility, realizing that you may have more or less than that target level each week. Those running the facility will get paid a certain amount based on both the target capacity of the facility and the actual average number in the facility each week.

The revenue obtained from having an amount equal to the target population, T, are defined by the concave function R(T) as shown below. (Note, if T were 20 and 20 people were housed, the benefits would equal –5 + 16(13) + 8(7). The –5 reflects fixed costs if the facility is built. If it is not built, T = 0 and R(T) = 0.

If the number of people in the facility is not equal to the target value T, there is a reduction in total net revenue. For each person less than the target, there is a loss of \$21. For each person more than the target there is a loss of \$3.

The loss function is shown below. Note: Losses are a function of the deviations from the target population T and are independent of the value of the target value, T.

So, suppose the T is 20 and the actual amount received is 15. The total net benefits would equal R(T) – 21(20–15) = –5 + 16(13) + 8(7) − 21(5).

Develop a linear model that will find the value of the target number T that maximizes the expected total net revenue. (Note: Total expected net revenue is targetthe revenue obtained from target T less expected losses from deviations from associated with each value p of P and its probability Pr(p). Show the model needed to determine the target T that maximizes total expected revenue.

*Defining non-negative deviations from target T, let*

$$p\_{\bar{l}} = T - D\_{\bar{l}} + E\_{\bar{l}} \quad \text{for all } \bar{i}.$$

*The probability of each Di and Ei will be equal to the probability Pr*(*pi*)*. Expected loss will therefore be*:

*Expected Loss* = <sup>i</sup> *Pr*(*pi*) [21 *Di* + 3 *Ei*] *Revenue from target R*(*T*) = −5*Z* + 16 *T*1 + 8 *T*2

$$T = T1 + T2$$

*T*1 ≤ 13*Z*, *T*2 ≤ 99*Z*, *Z is a* 0, 1 var*iable*

*Thus, the LP model*: *Maximize* −5*Z* + *16 T*1 + 8 *T*2 − Σ*i Pr*(*pi*) [21*Di* + 3*Ei*] *Subject to*: *T1* ≤ *13 Z T2* ≤ *99 Z (99 represents any number greater than each pi.) Z is a* 0,1*variable*. *T* = *T1* + *T2 pi* = *T – Di* + *Ei for all i*.

#### 5. Licenses:

The State allocates hunting licenses to a store that sells them for \$100 each. The demand for licenses is uniformly distributed between 10 and 30. At least 10 will be demanded and at most 30 will be demanded at that store.


$$\begin{aligned} \text{Expected income} &= \\$\\$w \text{ for } w \le \\$\\ &= \\$\\$ \left( \\$ + \int\_0^{w-\\$} (1 - 0.1w) \text{dw} \right) \quad \\$ \le \le \\$ \le 15. \end{aligned}$$

$$\mathfrak{l} = \mathfrak{S}\mathfrak{F}\left(\mathfrak{F} + \int\_{0}^{10} (1 - 0.1w) \mathrm{d}w \right) = \mathfrak{S}0 \quad \text{w} \ge 15^{\circ}$$

(b) *Assuming there are two stores, and the demand distribution at the other store is uniform between* 5 *and* 15. *If only* 25 *licenses are to be allocated, determining how many licenses to allocate to each store that will maximize total expected income*:

*Let x be the allocation to store* 1 *and y be the allocation to store* 2. *Just consider the remaining* 10 *licenses after* 10 *and* 5 *have been allocated to stores* 1 *and* 2.

*Maximize* 100 [ *x* <sup>0</sup>(<sup>1</sup> <sup>−</sup> *<sup>x</sup>* <sup>20</sup> )*dx* <sup>+</sup> *<sup>y</sup>* <sup>0</sup>(<sup>1</sup> <sup>−</sup> *<sup>y</sup>* <sup>10</sup> )*dy*] *Subject to x* + *y*≤10. *Hence: maximize* (*<sup>x</sup>* – *<sup>x</sup>*2/40 <sup>+</sup> *<sup>y</sup>* – *<sup>y</sup>*2/20) *where x* <sup>+</sup> *<sup>y</sup>*≤10.

*Or equate the slopes*:1– *x*/20 = 1 – *y*/10 *where x* + *y* = 10. *Hence x*/2 = (10−*x*) *or x* = 10/1.5 = 20/3 = 6.667 *and thus y* = 3.333.

#### **13. Stochastic Processes**

• Weather prediction.

The mayor is considering having a \$100-dollar a plate dinner to increase the funds available for the homeless. His problem is that he doesn't know how many people might come. Experience suggests that it largely depends on whether it rains or not.

The probability of a dry day depends on the past day's condition. The local weather service has provided the following conditional probabilities of dry and wet days:

$$\begin{array}{c} \text{Day t}: \frac{\text{Day t} + 1}{\text{Dry}} \frac{\text{Dry}}{0.80} \frac{\text{Wet}}{0.20} \\\underline{\text{Wet}} \end{array}$$

Invitations must be sent out two weeks in advance.

(a) What is the probability of the selected day being a dry one?

*Assuming a steady-state condition has been reached in two weeks*: *Solve the following simultaneous equations*: *P*(*dry*) = *P*(*dry*)0.8 + *P*(*wet*)0.47 *and/or P(wet*) = *P*(*dry*)0.2 + *P*(*wet*)0.53. *P*(*dry*) + *P*(*wet*) = 1. *Solution*: *P*(*dry*) =0.7, *P*(*wet*) = 0.3.

(b) Should the guests be encouraged to bring an umbrella? For this problem make up convenience 'benefits or costs' for each possibility: For example, if it is dry and they do not bring an umbrella, or if it is wet and they bring an umbrella, the benefit can be 10, If it rains and they do not have an umbrella, the benefit is –10. Otherwise, it is −5.

*Let pdn be the probability having no umbrella on a dry day. Pdy is the probability of having an umbrella on a dry da*y.

*Similarly for wet days. Pd is the probability of having a dry day; pw is the probability of the day being wet*.

$$\begin{aligned} pd &= (pdn + pd\mathfrak{y})^\ast.8 + (pwn + pw\mathfrak{y})^\ast.47\\ pw &= (pd\mathfrak{y} + pd\mathfrak{n})^\ast.2 + (pw\mathfrak{y} + pw\mathfrak{n})^\ast.53; \end{aligned}$$

```
pd = pdy + pdn;
pw = pwy + pwn;
pd + pw = 1;
```
*maximize pdn*∗ 10∗.8 − 10∗.2 + *pdy*∗ −5∗.8 + 10∗.2 + *p*w*y* <sup>∗</sup> −5<sup>∗</sup> − 47 + 10∗.53 + *p*w*n*∗ 10∗.47 + −10∗.53 ;

*Objecti*v*e* v*alue* : 5.089552


*This shows if in a dry day the best policy is not to bring umbrella. If in a wet state* '*Yes*', *bring an umbrella*.

*Consider using Dynamic Programming*:

*Let Ft*(*i*) *be the maximum expected benefits given state i with t periods* (*stages*) *to go to the last stage*.

*Assume F*0(*i*) =0 *for each state i*.

*Ft* + 1(*Dry*) = *max* { *Y*: (*Ft*(*Dry*)–5)0.8 +(*Ft*(*Wet*) +10)0.2, *N*: (*Ft*(*Dry*) + 10)0.8 + (*Ft*(*Wet*)–10)0.2}.

*Ft* + 1(*Wet*) = *max* { *Y*: (*Ft*(*Dry*)–5)0.47 +(*Ft*(*Wet*) +10)0.53, *N*: (*Ft*(*Dry*) + 10)0.47 + (*Ft*(*Wet*)–10)0.53}.

*Successive values of Ft*(*Dry*) *and Ft*(*Wet*) *are shown below along with the optimal policy*:


*Notice the successive differences Ft*+ 1(*state*)*–Ft*(*state*) *are converging on* 5.09 *for both Dry and Wet states. This is the expected income also found using the linear programming model shown above. The optimal policies identified by the LP and DP models are the same*.

• Gambling

You are given opportunity to begin with an investment of \$1 in a succession of gambles where in each iteration there is a 90% chance of doubling your money and a 10% chance of losing all your money. Hence if you win the first three gambles you will have \$8. You can quit playing at any time. What are your expected earnings and the probability of having all of them for successive iterations, and

#### when, and why, would you stop playing?

*Solution* :*Probability of* <sup>w</sup>*inning n successi*v*e gambles* <sup>=</sup> <sup>0</sup>.9*n*, *and earnings* w*ould be* 2*n*\$ *Expected earnings* <sup>=</sup> \$2*n*0.9*n*.

#### • Crime Reduction

A community center provides recreation facilities for young people. Among the benefits to the community are lower crime rates. Assume there are two states of crime rates—low (L) and high (H). Observed crime rates over time show that if the crime rate is low in any month, the probability of having a low rate the following month is 0.5. The probability of having a high-rate month following a low-rate month is 0.5. If the crime rate is high in a month, the probability of a high rate the following month is 0.9, and thus the probability of a low rate the next month is 0.1. These probabilities apply if the community center does not advertise. This is the 'do-nothing' policy. (Policy n). These conditional probabilities are shown in Fig. 1. However, if the center advertises its recreation programs, (policy a) the conditional probabilities change to those shown in Fig. 2.

The community center can change its policy at the beginning of each month. The high crime month costs 20 more than the low crime month, and advertising costs 10 per month.


Show how you would determine what policy to implement following each type of month (low or high crime rate) to minimize the total expected cost of crime and advertising expense.

Hint: You can use the network below if you wish. Work backward. Stop when the minimum cost policies (decisions) remain the same in two successive months.

You can use the network to solve for the steady-state policy that doesn't change given the state (H or L) over time. Or you can use excel to solve the dynamic programming problem represented by the network above, or a linear program where the variables are the joint probabilities of states and decisions.

*Let F*(*L*,0) *be the least-cost to continue 0 periods into the future from state L* = 0.

*Let F*(*H*,0) *be the least-cost to continue 0 periods into the future from state H* = 0.



*The expected minimum monthly cost is* 13.64 *and the policy is* '*n*' *if in state L and* '*a*' *in state H*.

#### **14. Chance Constrained and Monte Carlo Modeling**

1. Chance constraints and Monte Carlo simulation.

Consider an "allocation problem," but with chance constraints on meeting random demands Dj at demand sites j. For example, if the allocation Aj is to meet or exceed the demand Dj at site j at least 95% of the time, the chance constraint is:

$$\Pr\{\mathbf{A}\_{\mathbf{j}} \ge \mathbf{D}\_{\mathbf{j}}\} \ge 0.95$$

The deterministic equivalent is.

Aj <sup>≥</sup> d0.<sup>95</sup> <sup>j</sup> where d0.<sup>95</sup> <sup>j</sup> is the demand that is exceeded only 5% of the time.

Assume the cumulative distribution of demand d is d/(1 + d). This is the probability that the actual random demand will be less than d. When d is 0, the cumulative probability is 0. The probability is zero that the actual demand will be less than 0. As d increases, the probability that the random actual demand will be equal or less than d approaches 1. Therefore, dj 0.95, the demand that will be exceeded only 5% of the time, can be computed. The actual allocation, Aj, must be at least this amount to satisfy the demand at least 95% of the time.

The demand (dj 0.95) whose probability of being at least equal to the actual demand 95% of the time, is determined by setting the cumulative distribution to 0.95.

$$0.95 = \text{d}/(1+\text{d}); \quad \text{d} = 0.95 + 0.95 \text{d} \text{ thus } \text{d} = 0.95/0.05 = 19\text{d}$$

The deterministic equivalent of the chance constraint is Aj≥dj 0.95 <sup>=</sup> 19.

	- (i) Pr{Aj≥Dj}≥0.8 *Solution: Aj*≥*4*
	- (ii) Pr{Aj≤Dj}≤0.10 *Solution:Aj*≥*9*

(iii) Pr{Aj≥Dj}≤0.50 *Solution:Aj*≤*1*

(b) Generate a series of random uniformly distributed probabilities and their corresponding values of demand d. The proportion of d values less than or equal to 19 is a way to see if the minimum allowable allocation of 19 will satisfy the random demand at least 95% of the time. Now you can also check on your answer to (i) and (ii) above as well.

*Solution: Generate random numbers p uniformly distributed from* 0 to 1. *Compute the associated value of d* (*d* = *p*/(1−*p*). *If d*≤19, (or *p*≤0.95) *generate a* 1, *otherwise* 0. *Do this for a large number*, *n*, *of times*. *Add up all the* 1's *and divide by* n. *This will be the probability of the demand being met if the allocation is* 19.

2. Consider an allocation problem where the supply of resources available for various users in each time period is uncertain. Assume the supply's probability distribution in each time period is uniform between 5 and 15. Users want to know the tradeoff between what allocation they can count on and its reliability. If your objective when allocating the available resources is to minimize the maximum percentage deficit between what each user wants and what they get, or equivalently their maximum level of satisfaction, show the model you would use to generate the information they desire.

*Solution*:

*Let x*(*i*) *be each user's allocation*. *T*(*i*) *be their desired target allocation*. *S be the total supply that is random*. *R be the desired reliability*. *Maximize Satisfaction*, *subject to*: *Satisfaction*≤*x*(*i*)/*T*(*i*) *for all users i*. *Pr*( *<sup>i</sup> x*(*i*)≤*S*)≥*R whose deterministic equivalent* is

$$
\sum\_{i} \mathbf{x}(i) \le \mathbf{S} \text{ if } R = 1,
$$

$$
\sum\_{i} \mathbf{x}(i) = 10(1.5 - R) \text{ otherwise}
$$

*Recognizing that each x*(*i*)/*T*(*i*) *will be equal, let X be the sum of all x*(*i*) *and T be the sum of all T*(*i*). *X*/*T will equal each user's level of satisfaction. The Excel display below shows the tradeoffs between R and X/T assuming T is 10. There is no need to optimize*.


	- (a) Show how you would generate equally likely values of the random variable X that have the following probability distribution:

*Solution*:

*Generate values of p*(*t*) *that are uniformly distributed from* 0 *to* 1. *Assume p* = *value of cumulative distribution of f <sup>X</sup>*(*x*) = *x*/200. *Let each p* = *x*/200 *dx* = *x*2/400. *Hence x*(*t*) =20 *p*(*t*)0.5 *Note*: *If you assume a uniform rectangular one, again from* 0 *to* 20. *fX*(*x*) =0.05. *p* = *FX*(*x*) =0.05*x*. *Thus x*(*t*) =20*p*(*t*).

(b) Show how to compute the mean or expected or average value, and the variance, of n discrete x(t) values randomly generated from this probability distribution. Compare these values with the true values of the mean and variance.

Solution :

$$\text{Mean} = \sum\_{\mathbf{t}}^{n} \mathbf{x}(\mathbf{t}) / n$$

$$\begin{aligned} \text{Variance} &= \sum\_{t}^{n} \left( \mathbf{x}(t) - mean \right)^{2} / n \\ \text{True mean is } &\int\_{0}^{20} \frac{\mathbf{x}^{2}}{200} d\mathbf{x} = 13.33 \\ \text{True variance is } &\int\_{0}^{20} \frac{(\mathbf{x} - 13.33)^{2} \mathbf{x}}{200} d\mathbf{x} = 22.22 \end{aligned}$$

4. Consider a random variable X that has the following discrete probability distribution, ranging from 2 to 5.

(a) Describe how to generate multiple discrete values, x(i), of the random variable X that fit this distribution.

*Generate random values p*(*i*) *uniformly distributed between* 0 *and* 1 (*say using* = *RAND*()) *in Excel*. *Then follow the rules below*.

*If p*(*i*)*<*0.2, *x*(*i*) =2; *if* 0.2≤*p*(*i*)*<*0.5, *x*(*i*) =3; *if* 0.5≤*p*(*i*)≤0.8, *x*(*i*) =4; *if p*(*i*)*>*0.8, *x*(*i*) = 5.

(b) Write the equations for calculating the mean and variance of all the n values you obtained.

$$Mean = (1/n) \sum\_{i=1}^{n} \mathbf{x}(i) \quad Variance = (1/n) \sum\_{i=1}^{n} (\mathbf{x}(i) - mean)^2$$

5. You are having to decide how many trucks you need to purchase and drivers you need to hire to pick up trash each day. Between 10 and 30 truck-day units of trash are produced each day, and these amounts are uniformly distributed. All the trash must be picked up each day. Each truck can haul enough to bring in \$ 600 per day. However, for each day a truck and driver are idle because there is not enough trash to pick up, the loss is \$ 800 per truck. If private contractors must be hired to pick up any excess trash, the cost is \$ 200 per truck per day.

Example: If 20 trucks are available (the target) and only 18 are needed the net income is 20(600)–2(800). If 22 trucks are required, the net income is 20(600)– 2(200).


*Calculate the mean* net income: (1/n)*n <sup>i</sup>*=<sup>1</sup> *NI*(*i*) <sup>=</sup> *NI*.

*Select another target T and repeat. Find the target T that maximizes the mean NI*. (*In this case the best T is* 26.)

Develop and solve an optimization model for finding the number of trucks to buy that maximizes expected net income.

*Maximize* 600 T–800 *<sup>T</sup>* <sup>10</sup>(*<sup>T</sup>* <sup>−</sup>*x*(*i*))/20*dx*–200 <sup>30</sup> *<sup>T</sup>* (*x*(*i*)−*T*)/20*dx*. *This will result in T* =26 *and an expected net income of* \$10,400.

*Cumulative distribution value* = (6 + 2)/(8 + 2) = 0.80, *hence T* =26 *is* 80% *reliable*.

(c) If you wanted to be sure that your target number of trucks would be able to pick up all the trash produced at least 90% of the time, what would be the target number?

*Pr*(*T*≥*X*)≥0.90 *is equivalent to T*≥28 *since x exceeds* 28 *only* 10% *of the time*.

#### **15. Simulation Modeling**

1 Bus replacement

Every year 5% of the passenger buses in a town need to be replaced due to obsolescence and no longer meeting safety and environmental standards. Current plans and budget constraints call for the purchase of 10 new busses each year. How many busses must the bus company have if these rates of change can be sustained? Is this equilibrium stable?

*B*1+1 = *Bt* (1 − 0.05) + 10 *so if stable B*1+1 = *B*t. *Hence B*(0.05) = 10 *and thus B* = 200. *Check*: *If* B = 200 *now, next year it will be* 200(.95) + 10 = 200. *If B is* 100 *now, next year it will be* 100(.95) + 10 = 105. *It is increasing*.

*If B* is 300, *next year it will be* 300(.95) + 10 = 295. *It is decreasing*. *Thus, the equilibrium is stable.*

2. Controlling algal blooms

In many lakes algal blooms are an increasing hazard. They are often caused by excessive phosphorus, P, entering the lake.

Consider a small lake having a constant volume V cubic meters. Thus its inflow Q equals its outflow Q. Currently the mass of phosphorus entering the lake is P kg per day. The daily amount of phosphorus decay per unit phosphorus mass in the lake is the decay constant k. Each of these values, V, Q, P, and k, are known.

The daily change, *d*M/*d*t, of phosphorus mass, M, in the lake depends on the daily mass of phosphorus entering the lake, P, the mass of phosphorus that exits the lake in the outflow, QM/V, and the mass of phosphorus that decays in the lake, kM. This change in lake phosphorus mass can be written:

$$d\mathbf{M}/d\mathbf{t} = \mathbf{P} - \mathbf{Q}\mathbf{M}/\mathbf{V} - \mathbf{k}\mathbf{M}$$

(a) Suppose the initial lake nutrient mass at the beginning of day 1, M(1), is 0. Given a constant mass of phosphorus, P, entering the lake each day beginning in day 1, show how you could determiine the mass of phosphorus, M(t), at the beginning of each following day t.

$$\mathbf{M}(\mathbf{t}+\mathbf{l}) = \mathbf{M}(\mathbf{t}) + [\mathbf{P} - \mathbf{Q}\mathbf{M}(\mathbf{t})/\mathbf{V} - \mathbf{k}\mathbf{M}(\mathbf{t})] \Delta \mathbf{t} \quad \text{where } \Delta \mathbf{t} = 1.$$

*Solve this equation for successive days t starting when t* =1 *and M*(1) = 0.

(b) Will the phosphorus mass in the lake reach an equilibrium, and if so what is it? (express as a function of V,Q, P, and k.)

*W hen dM* /*dt* = 0, *equilibrium mass M* = *P*/((*Q*/*V*) + *k*)

Suppose the phosphorus entering the lake, P, can be reduced by X percent, This would cost C(X). How could you define the tradeoff between this cost, C(X), and the equilibrium phosphorus concentration, M/V, in the lake?

Pick various values of X and solve for corresponding equilibrium concentrations, M/V, and costs, C(X).

*Equilibrium concentration* = *M* /*V* = *P*(1 − *X* )/(*Q* + *kV*).

#### 3. Forest sustained yield

One measure of the amount of forest growth in the watershed is the basal area of trees. This is the cross-sectional area of the trunk near the base of the tree. For both hardwood and softwood species the increase in basal area per hectare per year is directly proportional to the initial basal area of that species. However, this potential increase in basal area is reduced by the loss in basal area due to competition from its own species and from the other species.

Let.


Equations that describe the changes in basal area over time for both tree species can be written.

$$\begin{aligned} d\mathbf{H}/d\mathbf{y} &= \mathbf{r\_{H}}\mathbf{H}(\mathbf{y}) - \mathbf{a\_{H}}\mathbf{H}(\mathbf{y})^{2} - \mathbf{b\_{H}}\mathbf{H}(\mathbf{y})\mathbf{S}(\mathbf{y}) \\ d\mathbf{S}/d\mathbf{y} &= \mathbf{r\_{s}}\mathbf{S}(\mathbf{y}) - \mathbf{a\_{s}}\mathbf{S}(\mathbf{y})^{2} - \mathbf{b\_{s}}\mathbf{H}(\mathbf{y})\mathbf{S}(\mathbf{y}) \\ \text{Assume } \mathbf{r\_{H}} &= 0.3; \mathbf{r\_{s}} = 0.5; \mathbf{a\_{H}} = 0.1; \mathbf{a\_{s}} = 0.1; \mathbf{b\_{H}} = 0.05; \mathbf{b\_{s}} = 0.05. \end{aligned}$$

If this forest is to be managed in a sustainable way to obtain a constant harvest of hardwood and softwood in each year, create a model to determine how much of each type of species can be harvested each year depending on the relative value per unit basal area of hardwoods compared to that of softwoods.

*Model*: *Let CH be the harvest of hardwoods, and CS be the harvest of softwoods*. *Maximize CH* + *v*\**CS*. *H* + *CH* = (1 + *rh*) \**H* − *ah*\**H*\**H* − *bh*\**S*\**H*. *S* + *CS* = (1 + *rs*)\**S* − *as*\**S*\**S* − *bs*\**S*\**H*. *rh* = *0*.3; *rs* = *0*.5; *ah* =0.1; *as* =0.1; *bh* =0.05; *bs* = 0.05.

Solution:


#### **16. Multi-Criteria Analyses**

	- (a) Express the following model in a form used for defining the efficiency frontier (tradeoff between the two objectives) using the weighting method and the constraint method.

```
Maximize z1 = 4x1 − x2
Maximize z2 = −2x1 + 6x2
Subject to x1 ≤ 4
          x1 + x2 ≤ 6
          x1, x2 ≥ 0
```

#### 2 Resource allocation

Consider again the resource allocation problem where three users obtain benefits B(X) from the resources X they get allocated to them. The functions B(X) and their maximum values are shown below.

$$B\_1(X\_1) = 6X\_1 - X\_1^2 \quad \rightarrow \quad X\_1^{opt} = 3 \quad \text{and} \quad B\_1^{\text{max}} = B\_1 \left(X\_1^{opt}\right) = 9$$

$$B\_2(X\_2) = 7X\_2 - 1.5X\_2^2 \rightarrow X\_2^{opt} = 7/3 \quad \text{and} \quad B\_2^{\text{max}} = B\_2 \left(X\_2^{opt}\right) = 147/18$$

$$B\_3(X\_3) = 8X\_3 - 0.5X\_3^2 \rightarrow X\_3^{opt} = 8 \quad \text{and} \quad B\_3^{\text{max}} = B\_3 \left(X\_3^{opt}\right) = 32$$

Instead of finding the values of each allocation that maximizes the total benefits, assuming only 6 resources are available, each user wants to maximize their own benefits. This is now a multi-objective problem. Show how to find the tradeoffs among each user using the weighting, constraint, goal attainment and goal-programming methods.

Weighting method:

$$\begin{aligned} \text{Objective}: \max & \left\{ W\_1 \frac{B\_1(X\_1)}{9} + W\_2 \frac{B\_2(X\_2)}{147/18} + W\_3 \frac{B\_3(X\_3)}{32} \right\} \\ \text{Subject to:} & X\_1 + X\_2 + X\_3 \le 6 \end{aligned}$$

Constraint method:

Objective: max{*B*3(*X*3)} Subject to: *X*<sup>1</sup> + *X*<sup>2</sup> + *X*<sup>3</sup> ≤ 6 *B*1(*X*1) ≥ α *B*2(*X*2) ≥ β

Goal Attainment method : Objective : min{*D*} Subject to : *X*<sup>1</sup> + *X*<sup>2</sup> + *X*<sup>3</sup> ≤ 6 *W*<sup>1</sup> 9−*B*1(*X*1) <sup>9</sup> ≤ *D W*<sup>2</sup> 147/18−*B*2(*X*2) <sup>147</sup>/<sup>18</sup> ≤ *D W*<sup>3</sup> 32−*B*3(*X*3) <sup>32</sup> ≤ *D*

Goal-Programming method:

Goal - Programming method: Objective : min{*L*1(*D*1) + *L*2(*D*2) + *L*3(*D*3)}

$$\begin{array}{c} \text{Subject to } : X\_1 + X\_2 + X\_3 \le 6 \\ 9 - B\_1(X\_1) \le D\_1 \\ \frac{147}{18} - B\_2(X\_2) \le D\_2 \\ 32 - B\_3(X\_3) \le D\_3 \end{array}$$

#### 3. **More multi-objective modeling**

Consider the following multiple objective optimization problem:

Maximize Z1. Maximize Z2. Z1 = 2X. Z2 = 3Y. X2 <sup>+</sup> Y2 <sup>≤</sup> 16.

Show how you could use the weighting and constraint methods to identify the tradeoff among various maximum values of Z1 and Z2.

Weighting method: Maximize w1 Z1 + w2 Z2 and vary the weights to define points on the tradeoff frontier.

Constraint method: Maximize Z1 subject to Z2≥L and vary the lower bound L between 0 and maximum Z2 (= 3\*4) to define points on the tradeoff frontier.

Goal Attainment method: Minimize D subject to w1(T1 – Z1)≤D; w2(T2 – Z2)≤D; for selected objective target values T and varying weights w. For example, assume T1 and T2 are both 10. T1 is more than can be obtained and T2 is less that can be obtained. For varying combinations of weights, the solutions are:


#### **17. Fuzzy Optimization**

1. Consider the problem of heating a swimming pool. You are told to maintain the right temperature, T, and not spend too much money, C(T), doing it. How might you develop a fuzzy model for determining the 'best' temperature and cost? Assume you know the cost function C(T). Draw and quantify the membership functions and develop the optimization model that maximizes the minimum membership value.

*Possible solution*.

*To simplify, assume the solution is within the concave part of each membership function*,

(*Otherwise, binary variables must be used and constraints for T and C*(*T*) *need changing*.)

*Maximize D Let sti and sci be the slopes of linear functions in segment i*

$$\begin{aligned} M\_T \ge D \ M\_T &= st1 \ t1 + st2 \ t2 + st3 \ t3 + st4 \ t4 \\ t1 \le a, \ t2 \le b - a, \ t3 \le c - b, \\ t1 + t2 + t3 + t4 &= T \\ M\_C \ge D \quad M\_C &= 1 + sc1 \ c1 + sc2 \ c2 + sc3 \ c3 \\ c1 \le e, \quad c2 \le f - e, \\ c1 + c2 + c3 &= \text{Cost}(T) \end{aligned}$$

2. Water quality management

Exercise 7 in Chap. 7 involved finding the 'least-cost' amounts of wastewater treatment (treatment efficiencies) at sites 1 and 2 that meet stream quality standards at sites 2 and 3: Currently there is no treatment. All the wastewater is discharged into the stream.

Available Data:

Stream flow <sup>=</sup> 1000 m3/day at all sites. 1 kg/day/1000 m3/day <sup>=</sup> 1 mg/l.

Fraction of waste discharged into stream at site 1 that reaches site 2: 0.25.

Fraction of waste discharged at site 1 that reaches site 3: 0.15.

Fraction of waste at and discharged into stream at site 2 that reaches site 3: 0.60.

Limits of treatment: removal of 30% required, but no more than 90%, for both sites. The initial concentration just upstream of site 1 is 32 mg/l.

Assume the costs of waste removal are 30\*fraction removed at site 1 and 20\*fraction removed at site 2.

Can you find a solution that "keeps the stream clean yet doesn't cost too much"?

*Model* : *Cost* = 30∗*x*1 + 20∗*x*2. *Quality at site* 2. (32 + 200∗(1 − *x*1))∗0.25 ≤ *P*; *Quality at site* 3.

 32 + 200∗(1 − *x*1) ∗ 0.15 + 100∗(1 − *x*2) <sup>∗</sup>0.60 ≤ *P*. *Treatment restrictions*. *x*1 ≤ 0.9; *x*2 ≤ 0.9; *x*1 ≥ 0.3; *x*2 ≥ 0.3

*Model solution* :


#### **Miscellaneous**

1. How many places on the earth's surface can a person travel 1 km south, then 1 km east or west, and finally 1 km north and end up at exactly where they started?

*Infinite. The north pole and anywhere on a parallel of latitude 1 km north of another parallel of latitude exactly 1/n km in circumference where n is any integer* > 0. *These parallel of latitudes would be just north of the south pole*.

2. The diagram below shows a rectangular room of dimensions 12×12x30 feet. On the inside surface of the end walls are two bugs. One is 1 foot up from the base and the other is 1 foot down from the top, and both are 6 feet from either of the side walls. They would like to meet each other. What is the shortest distance they can travel on the inside surface of the room to meet? (They cannot fly.) The answer is less than the straight path of 11 + 30 + 1 = 42.

3. A horn is created by rotating the function 1/x about the x axis from x = 1 to x = ∞. How much paint would you need to paint the inside surface of the horn? Hint: To find the surface area integrate the circumference 2 π r, where r = 1/x, from x = 1 to ∞. You will find the surface area to be infinite. Yet the amount of paint you need is finite.

4. Types of Averages:

How do you compute the average value of different discrete data?

If someone wants to find and average value of a data set most will think of computing the arithmetic average, also called the mean value.

Assume a data set {x(i)} i = 1, 2,…, n

The arithmetic mean, AM, is the sum of all n x(i) values divided by n. This assumes each x(i) is equally likely.

More generally, AM is the sum from 1 to n of the products x(i)\*p(i) where the sum of all p(i) = 1.

$$AM = \sum\_{i=1}^{n} \ge (i)/n \quad or \quad \sum\_{i=1}^{n} \ge (i)p(i)$$

In some cases, the geometric mean is a more accurate estimate of the average or mean value. The geometric mean, GM, is the nth root of the product of all n values of x(i)

$$GM = n\sqrt{\prod\_{i=1}^{n} \chi(i)}$$

Another average is the root mean squared, RMS. This is the square root of the sum of n values of x(i) squared divided by n.

$$RMS = \left[\sum\_{i=1}^{n} x(i)^2/n\right]^{0.5}$$

Finally, there is the harmonic mean, HM. This HM is n divided by sum of 1/x(i) or 1/ *n <sup>i</sup>* (1/*x*(i))/n.

$$HM = n / \left[ \sum\_{i=1}^{n} \left( 1 / \mathbf{x}(i) \right) \right] \text{ or } \quad \sum\_{i=1}^{n} a(i) / \left[ \sum\_{i=1}^{n} \left( a(i) / \mathbf{x}(i) \right) \right]$$

The values of these four different means have the following relationship.

$$\text{RMS} \ge \text{AM} \ge \text{GM} \ge \text{HM}.$$

Example: *n* = 6 Data : Variable Value X( 1) 4. X( 2) 3. X( 3) 8. X( 4) 5. X( 5) 9. X( 6) 1.

(a) Calculate each of the four averages of these data.

```
AM 5.000000
GM 4.035654
RMS 5.715476
HM 2.971114
```

$$((14,000/100,000) + (20,000/300,000))/2 = 0.103 = 10.3\text{ \%}$$

*alternati*v*ely*:

$$\sum\_{\text{y}}^{n} \text{(total tax)} / \sum\_{\text{y}}^{n} \text{(total income)} = 34,000/400,000 = 0.085 = 8.5\%$$

*W hich method is correct*?

(c) Finding the average annual rate of return i given various annual interest rates r(y).

(1 <sup>+</sup> i)n <sup>=</sup> (1 <sup>+</sup> r(1))(1 <sup>+</sup> r(2))….(1 <sup>+</sup> r(n)) where i is GM interest rate. Example: GM: (1 <sup>+</sup> i)2<sup>=</sup> (1 <sup>+</sup> 0.1)(1 <sup>+</sup> 0). i <sup>=</sup> 1.10.5–1 <sup>=</sup> 0.0488 not 0.05.

(d) Finding the average speed of a vehicle over a given distance.

If the speed over the first 100 km is 40 km/hour, and the speed over the next 100 km is 60 km/hour, the average speed is not the arithmetic mean, AM = 50 km/hour. If that is not obvious, consider a speed of 0 for the first 100 km, and a speed of 60 for the final 100 km. The average AM is 30 when in fact the vehicle would never reach the second half of the journey.

*The average speed is the harmonic mean*, *HM* = *total distance/total time* = 200/(100/40 + 100/60) = 48 km/hour.

5. What physical part of a train or trolly goes backward when the train or trolly goes forward?

*Any part of the flange of the wheel that extends below the surface of the track, as long as it remains below that surface*.

6. A jogger arrives at a railroad station an hour earlier than when her chauffeur usually picks her up to go to her home. Not being able to call her chauffeur she starts jogging at 6 miles per hour. She meets the chauffeur going the other way. He picks her up and drives her to her home. They arrive at her home 20 min before they usually get there. How fast does the chauffeur drive?

*The* 20 *min saved is the time the chauffeur drives from where she was picked up to the station and back, or* 10 *min each way. Had she kept jogging for* 10 *more minutes the car would have reached the station one hour after she started jogging. Hence, she jogged* 50 *min before being picked up. At 6 mph she jogged* 6 (50/60) = 5 *miles. The chauffeur drives those* 5 *miles in* 10 *min or at* 30 *mph*.

### **Index**

#### **A**

Adaptive policies, 16, 19 Africa, 25 African Development Bank, 23 Agriculture, 2, 37, 89, 94, 188 Akosombo Dam, 23 Algeria, 26–28 Algorithms, 3, 75, 89, 111 Allocation problem, 43–45, 48, 71, 72, 76, 79–82, 86, 121, 140, 182, 184, 208, 221, 227, 257, 305, 306, 313 Alternative plans, 4, 41, 207, 210–212, 218, 244 Annual values, 104 Applied systems analysis, 1 Arithmetic averages, 319 Art of modeling, 3, 239 Asia, 16, 25 Assumptions, 1–3, 5, 21, 38, 61, 159, 187, 201, 237, 241, 243, 244, 250, 260, 296

#### **B**

Backward moving approach, 79–81, 86, 257, 258, 262 Bayes' formula, 149, 150 Benefit/cost ratios, 58, 59, 250 Benefits, 2, 3, 7, 18, 23, 43–48, 51, 54, 58, 59, 61, 66, 69, 71, 76, 80–82, 121, 131, 140, 155, 159, 160, 172, 175, 177, 179, 221, 227, 228, 245, 250, 277, 280, 281, 289, 290, 295–297, 300–302, 313 Binary variables, 103–106, 111, 315 Bonds, 61, 62, 250, 251

#### Business schools, 7

**C**

Calculus, 8, 48, 66, 121, 122, 124, 125, 135, 275 Cambodia, 26 Canada, 18, 22, 28 Capacity expansion, 20, 24, 82–84, 86, 119, 258, 271, 273 Case study, 21, 22, 28 Cash flow diagram, 53, 55 Chance constraints, 177, 178, 182, 305 Chaos, 192 China, 25 Clean Water Act, 25 Climate change, 17, 19, 27, 102 Communicating, 238 Communications, 7, 16, 28, 224 Community park, 31, 33 Complexity, 5, 18, 19 Compounding, 52, 54–56 Compound interest, 53, 54, 195 Compromise solutions, 4 Computer programming, 75 Computers, 3, 75 Computer software, 4 Concave functions, 45, 114, 116, 130, 277, 297 Conceptual diagrams, 3 Conceptual model, 3, 6, 41, 243 Conditional probabilities, 149, 152, 163–165, 167, 168, 174, 175, 299, 302 Conflict, 7, 8, 22, 23, 28, 207 Conflicting criteria, 6, 7 Constrained optimization, 8, 75, 89 Constraint method, 213–216, 221, 312, 314 Consumer's surplus, 133, 279 Continuous rate, 56 Convex functions, 71, 82, 116, 130, 277 Coordination, 16 Corner points, 91 Cost-effective, 25, 26

© The Editor(s) (if applicable) and The Author(s) 2022 D. P. Loucks, *Public Systems Modeling*, International Series in Operations Research & Management Science 318, https://doi.org/10.1007/978-3-030-93986-1

323


#### **D**

Data, 1, 4, 7, 8, 14, 16, 17, 19–21, 23, 24, 28, 29, 37, 66, 67, 73, 83, 84, 87, 94, 97, 101, 106, 132, 147, 149, 152, 153, 156, 159, 163, 167, 201, 218, 230, 239, 242–244, 254–256, 260, 263, 267, 269, 279, 292, 297, 319 Data-driven, 8 Decision maker, 1, 2, 9, 18, 21, 38, 41, 211, 214–216 Decision making, 1, 2, 4, 8, 19, 20, 38, 121, 180, 207, 224, 239 Decision outcomes, 6 Decision sciences, 7, 13 Decision variables, 20, 33–36, 38, 41, 66–68, 70, 91, 92, 94, 111, 113, 135, 187, 188, 208, 209, 213, 214, 216, 243–245 Demand function, 45, 132, 260, 278 Derivative, 123–125 Design, 3, 5, 7, 13–18, 22, 24, 26, 34, 37, 69, 106, 187, 188, 237, 244 Deterministic equivalent, 178, 179, 183, 305, 306 Developing models, 37 Differentiation, 122–124, 126, 128 Disaster response, 17 Discount factor, 87, 259, 272 Discounting, 54 Discrete dynamic programming, 75, 76, 78, 81, 83, 86, 88, 257, 262 Discrete simulation, 190, 192, 193, 201 Discrete states, 75, 76, 167 Dominance, 209, 210 Dual variable, 48, 70, 91, 92, 95, 102, 106, 135, 215

#### **E**

Economic benefits, 6, 36, 37, 208 Economic impacts, 22 Economic pie, 44 Economics, 7–9, 14, 17, 20, 37, 44, 45, 57, 83, 89, 121, 188, 242, 246 Economies of scale, 82 Ecosystem preservation, 16 Ecosystems, 3, 22, 23, 26, 27 Effective rate, 56 Efficiency frontier, 213–216, 220, 221, 312 Efficient tradeoffs, 26, 209, 213, 214 Egypt, 22 Einstein, 16 Energy, 2, 3, 9, 17, 22, 23, 26, 242 Energy production, 16, 20 Engineering, 7, 37, 89, 188 Environment, 2, 3, 5, 13, 16, 20, 24, 25, 27, 178, 225, 226 Environmental, 2, 6, 14–16, 20, 36, 37, 203, 208, 231, 309 Environmental impacts, 38, 223 Environmental systems, 8, 17, 37 Equations, 3, 31, 34, 53–55, 57, 60, 62, 63, 66, 72, 85, 90, 126, 127, 136–140, 147, 149, 150, 155, 166, 167, 169, 172, 182, 184, 189–192, 197, 198, 200, 205, 251, 253, 254, 287, 300, 308, 310, 311 Equilibrium, 189, 190, 192, 193, 195, 198, 203, 204, 309, 310 Equity, 36, 231–233 Equivalence, 33, 51–56, 58, 62, 113, 146, 212, 213 Ethiopia, 22 Euphrates, 25 Europe, 25, 27 Everglades, 24, 25, 28 Evidence-based, 8 Exceedance distributions, 144, 179, 219 Excel, 4, 7, 65–67, 70–72, 91, 92, 103, 141, 167, 180, 181, 183, 281, 289, 290, 303, 306, 308 Expected income, 154, 159–161, 283, 286, 295, 298, 301

#### **F**

Face value, 61, 251 FAO, 25 Feasible, 35, 41, 75, 78, 84, 90, 91, 105–107, 177, 208, 209, 213–216, 244, 266 Feasible region, 90, 91, 208 Feedbacks, 6, 28, 239, 243

Fixed costs, 82, 103–105, 113, 118, 124, 131, 141, 160, 269, 277, 281, 297 FloRiAn, 25 Food, 3, 16, 17, 26, 107, 188, 263, 264 'For all' sign, 40 Forest management, 107, 196, 266 Forests, 3, 20, 107, 108, 196, 198, 199, 204, 205, 266, 267, 310, 311 Forward moving approach, 82, 84, 262 Future value, 52–55, 57, 58 Fuzzy membership functions, 223–225, 234 Fuzzy optimization modeling, 223 Fuzzy set, 224, 227

#### **G**

Global warming, 6 Goal attainment method, 216, 314 Goal-programming, 217 Goals, 2, 3, 6, 8, 15–18, 23, 27, 28, 36, 207, 209, 216, 237, 243 Governance, 22 Governmental agencies, 14 Grand Ethiopian Renaissance Dam, 22 Graphical solution, 93 Great Lakes, 22, 23, 28 Great Man-made River, 24 Greenhouse Gas and Air Pollution Interactions and Synergies Model (GAINS), 27

#### **H**

Hill climbing method, 43, 49, 247, 249 Human health, 7, 36, 167

#### **I**

Iceland, 18, 21, 27, 28 If-then-else models, 111 Incineration, 101 Income taxes, 57, 58, 62, 251, 253 India, 27 Indifference analysis, 211, 212 Inequalities, 31, 34, 92 Inequality constraints, 33, 136 Inflation, 7, 56–58, 60–62, 250, 251, 253 Inform, 1, 4, 5, 7, 8, 14, 16, 18, 19, 25, 29, 207, 237, 241, 242 Information needs, 237, 244 Informed decision-making, 2 Informing policymakers, 5, 237, 239 Infrastructure, 7, 8, 15, 16, 18, 25, 26, 61, 82, 98, 250 Infrastructure capacity, 17, 82, 83

Innovate, 3, 4 Insurance, 17, 22 Integer variables, 103, 106 Integration, 126, 128 Interactions, 15, 18, 31 Interactive, 4, 215, 217 Interactive simulation, 188 Interest, 20, 23, 28, 33, 38, 48, 52–57, 59, 61–63, 91, 98, 102, 104, 122, 139, 151, 180, 182, 195, 215, 217, 218, 237, 238, 241, 249–254 Interest rate, 2, 52–58, 61–63, 85, 87, 105, 120, 249, 251–254, 259, 272, 273, 320 International Commission for the Protection of the Rhine (ICPR), 25 International Institute for Applied Systems Analysis (IIASA), 3 International Joint Commission, 22 Intersection membership function, 227 Inverses of cumulative distributions, 181 Investments, 7, 52, 57, 58, 60, 61, 249–251, 301 Italy, 25 Iterative, 210, 211, 217, 239

#### **J**

Joint probabilities, 148–152, 169, 170, 174, 176, 303 Joseph-Louis Lagrange, 135, 136

#### **L**

Lagrange models, 282 Lagrange multiplier, 70, 91, 92, 136, 141, 281 Lake Como, 25 Lanchester model, 200 Leadership, 28 Legal system, 17 Lexicography, 211 Libya, 23, 24, 27 Linear programming, 89, 90, 111, 120, 170, 171, 176, 231, 301 Losses, 45, 48, 160, 217, 290, 297

#### **M**

Management, 1, 3, 14, 16, 17, 22, 24, 25, 28, 37, 41, 87, 100, 101, 108, 216, 230–232, 234, 243, 316 Marginal probability distribution, 150 Marginal values, 8, 66, 69, 104, 121, 194, 195 Market, 45, 46, 49, 61, 62, 87, 88, 165, 166, 247, 248, 251, 261, 262 Markov chain, 165–167 Mathematical, 3, 13, 31, 34, 39, 41, 75, 85, 89, 107, 192, 207, 264 Mathematical modeling, 1, 2, 245 Mathematics, 3, 7, 37, 122 Maximization, 36, 45, 71, 78, 209, 212, 214–217 Mean, 1, 20, 48, 130, 143, 145–147, 155, 180–184, 188, 191, 192, 220, 231, 237, 256, 277, 287, 307–309, 319, 320 Mean values, 144, 148, 218, 319 Median, 143, 148, 155, 180, 287 Mekong River, 25 Mental health, 16 Mental models, 39 Middle East, 25 Military affairs, 16 Minimization, 36, 71 Minimum value, 32, 33, 78, 121, 123, 135, 136, 227, 231 Misinformation, 8 Mode, 148 Modeler, 3, 16, 19, 23–26, 29, 31, 38, 207, 213 Modeling notation, 31, 34, 41 Models, 1–5, 7, 8, 16, 19–26, 31–34, 36–39, 45, 81, 89–92, 103, 106, 111, 121, 135, 139, 153, 168, 171, 174, 177, 178, 187–189, 207, 218, 223, 234, 237, 239, 249, 269, 275, 301 Model types, 4, 36 Monitoring, 16, 26, 28 Monte Carlo sampling, 180, 183–185, 188, 307, 309 Multi-component, 2 Multiple criteria, 6 Multiple goals, 1 Multiple objectives, 207, 209, 213, 220, 221, 312, 314 Multiple performance criteria, 207

#### **N**

Natural logarithm, 56, 126, 129 Natural resources, 2, 4 Natural sciences, 7 NB DSS, 25 Negotiation, 8, 22 Net benefits, 13, 48, 58, 59, 66–69, 79–81, 86, 131, 141, 160, 208, 229, 250, 257, 277, 281, 289, 290, 297

Netherlands, The, 21, 27, 28 Nile River Basin, 22 Node-link networks, 41, 243 Nominal rate, 55, 56 Non-governmental, 28 Non-governmental organizations, 2, 14 Non-linear functions, 8, 73, 89, 122, 254 Normal distribution, 147

#### **O**

Obesity rates, 15 Objective function, 32–34, 46, 48, 49, 67, 71, 75, 78, 85, 90–93, 101, 107, 121, 135, 136, 208, 209, 213, 216, 217, 264, 286 Objectives, 2–4, 17, 26–28, 34, 35, 41, 97, 135, 207–215, 217, 220, 231, 234, 243–245, 246, 274, 306, 312, 314 Operating policies, 17, 22, 23, 26, 174 Operations research, 2, 37, 135 Optimization, 1, 2, 4, 7, 8, 24, 32, 33, 35, 36, 41, 46, 48, 49, 65, 66, 68, 69, 72, 73, 75, 76, 78, 80, 85, 89, 90, 92, 94, 98, 102, 103, 106, 113, 118, 168, 170, 174, 185, 187, 188, 208, 213, 218, 221, 223, 225, 228, 231, 234, 244, 247, 249, 254, 255, 290, 309, 314, 315 Outside the box, 20, 22, 241

#### **P**

Parameters, 5, 26, 31–36, 41, 49, 69, 70, 73, 105, 107, 108, 111, 143, 187, 189, 191–193, 200, 201, 217, 223, 230, 243–246, 255, 264, 266, 267 Partial derivative, 124, 136, 137 Partial differentiation, 124 Performance criteria, 2, 8, 207, 218, 223 Physical impacts, 14 Piecewise linear approximations, 114, 115 Planning, 1, 3, 8, 16, 20, 24, 26, 37, 41, 60, 100, 155, 177, 188, 209, 211, 215, 216, 218, 243, 260, 289 Plastic disposal, 15 Policies, 2, 4, 8, 14, 16–18, 22, 24–27, 168, 172, 174, 176, 207, 208, 210, 218, 227, 238, 244, 292, 293, 300–303, 305 Policy options, 5, 16 Policy problems, 1, 4, 20, 72 Political process, 207, 238 Political risk, 4, 19

Population, 3, 17, 146, 147, 159, 160, 200, 201, 297 Present value, 53–55, 58, 59, 83–87, 105, 159, 250, 254, 258, 259, 296 Privatization, 8 Probability, 8, 9, 37, 143–146, 148–156, 159, 160, 163, 165, 167–170, 175, 176, 178, 183, 219, 282, 283, 285, 287–292, 297–302, 305, 306 Probability density function, 145, 155, 181, 287 Probability distributions, 143–148, 150–152, 155, 156, 159, 178–182, 184, 188, 189, 191, 192, 221, 223, 224, 289, 306–309 Producer's surplus, 133, 279 Product sign, 40 Public affairs, 7 Public health, 2, 7, 15, 16, 18, 28, 89, 167 Public health system, 14 Public policy modeling, 13, 37 Public school system, 13 Public sector, 2, 8, 9, 13, 15, 17–19, 29, 241 Public systems, 1, 7, 15, 16, 18, 27, 188 Public utilities, 8 Puzzles, 39

**Q** Qualitative expressions, 8 Qualitative statements, 3, 234 Quantitative models, 3

#### **R**

RAND(), 181, 183, 289 RAND Corporation, 2, 3 Random variables, 8, 143–148, 150, 151, 155, 159, 178–182, 184, 191, 221 Regional Air Pollution Information and Simulation Model (RAINS), 27 Regression, 73, 254, 256 Relative weights, 213, 214 Reliabilities, 8, 26, 34, 177–179, 184, 218–221, 306 Resilience, 218–221 Retirement account, 59, 61, 249 Risks, 18, 22, 28, 36, 49, 61, 178, 249

#### **S**

Satisficing, 210, 211 Scheduling, 96, 98, 107, 265 Schematic of optimization modeling, 36 Schematic of simulation modeling, 36 Screening, 5, 187, 188, 223, 244 Senegal, 25 Sensitivity analysis, 38 Sensitivity report, 72 Shadow price, 48, 70, 91, 92, 135–141, 281 Simple interest, 53, 55 Simulation, 1, 2, 4, 8, 36, 41, 180, 181, 183, 187–190, 192, 193, 198, 199, 202, 205, 218, 223, 244, 289, 305, 309 Slope, 45, 47, 48, 66, 90–92, 103–105, 114, 121–124, 126, 127, 140, 214, 273, 274, 281, 290, 299, 316 Slope function, 8, 46–48, 66, 69, 70, 121–124, 126, 127, 273 Social behavior, 17 Social impacts, 1, 18 Social sciences, 7 Social welfare, 4, 37, 107, 265 Soft systems, 3 Software, 3, 65 Solver, 7, 65–67, 70–72, 91, 92, 103, 141, 281 Solving models, 3, 7, 17, 37, 71, 254, 275 South-North ater diversion project, 25 Stable equilibrium, 198 Stages, 23, 75–77, 79, 301 Stakeholders, 6, 9, 18, 20, 23, 27–29, 207, 208, 211, 215, 237–239, 241, 244 Stakeholder trust, 37 Standard deviation, 147, 191, 192, 218 Statistical, 2, 143, 145, 163, 189 Statistical models, 2 Statistics, 8, 37, 93, 193 Steady state, 165, 167–170, 173, 176 Stochastic dynamic programming, 171, 172 Stochastic linear programming, 168 Stochastic process, 8, 163, 164, 167, 174, 299 Stochastic simulation, 188 Subscripts, 39, 40, 145, 172 Sub-systems, 14, 19 Sudan, 22 Sufficiency of information, 21 Summation sign, 40 Superscripts, 39, 40 Synthesize, 3, 16 System components, 31 System performance, 26, 31, 34, 36–38, 187, 189, 207, 218, 244 Systems analysis, 2, 3, 5, 7, 13, 17, 18, 20, 21, 89 Systems analysts, 3, 4, 16, 18, 237, 238 Systems approach, 3, 5, 15, 17–21, 25, 28 Systems engineering, 2 Systems of systems, 19

#### **T**

Target, 26, 45, 100, 155, 156, 159, 160, 185, 200, 216, 217, 289, 290, 297, 298, 306, 309, 314 Taxes, 7, 17, 57, 58, 61, 62, 246, 249, 250, 251, 253, 254, 295, 296, 320 Tigris, 25 Time value of money, 51, 52, 56 Tobacco use, 16 Toronto, 22, 28 Tradeoff frontier, 209, 314 Tradeoffs, 5, 8, 34, 177–179, 184, 204, 207, 211–213, 215, 217, 220, 221, 306, 310, 312–314 Transition matrix, 165 Transition probabilities, 165–169, 171, 173, 174 Transportation problem, 107, 266 Transportation system, 13, 17, 18, 28, 243 Trapping state, 167 Triangular distribution, 182 Trust, 20, 23, 24, 29, 39, 237, 238, 241

#### **U**

UN, 3 Uncertain data, 1 Uncertainties, 9, 15, 153, 237, 243, 259, 282 Unforeseen conditions, 28 Uniform distribution, 145, 180, 181 Unintended consequences, 15, 28 Unstable equilibrium, 195 Urban planning, 2, 89 US Army Corps of Engineers, 25

#### **V**

Value of money, 58

Variables, 3, 31–33, 35, 39, 40, 43, 49, 67, 69, 71, 75, 78, 85, 89, 90, 92, 93, 97, 102–108, 111, 113, 118, 122, 124, 125, 128, 136, 137, 143, 150, 171, 176, 189, 191, 195, 201, 218, 223, 244–246, 264, 266, 267, 269, 272, 273, 287, 297, 298, 303, 307, 308 Variance, 143, 147, 154, 155, 180, 182, 184, 220, 256, 284, 287, 307, 308 Vector optimization, 208 Velocity plot, 199 Verify, 16, 48, 66 Volta River, 23 VUCA, 18 Vulnerability, 218–221

#### **W**

Waste oil management, 16 Water management, 20, 22, 24, 25 Water Management System (CWMS), 25 Water resources, 3, 94, 227 Weighting, 213–216, 220, 221, 312–314 Welfare policies, 17 'What if', 2, 21, 36, 54, 75, 187, 237, 244 'What should be', 16, 36, 244 Wicked problems, 4 Within-year compounding, 55, 56 World Bank, 3

#### **Y**

Yemen, 24, 27

#### **Z**

Zambezi, 25