Notebooks illustrating use of decision optimization with Python and Spark.
The notebooks require a valid subscription to Decision Optimization on Cloud in order to run. The html versions show the notebooks as they look after running, including the maps, but are static and do not run. The data files (JSON) are also included but need to be linked to the notebooks in order to run.
Optimization Modeling and Relational Data
This notebook shows the relationship between mathematical models used in optimization and data models used to store and retrieve the data that populates a model instance. It illustrates, by means of an example, how the data structures of the OPL modeling language used in optimization can be constructed using SQL, focusing specifically on how to use Spark dataframes for this purpose.
In this notebook, you will learn how to set up the optimization problem using IBM's OPL modeling language and how to solve it using IBM's Decision Optimization on Cloud service. The notebook also shows you how access data from a source in IBM's DSX Community and how to use Apache Spark to manage the data input to and output from the optimization service.
Locating Warehouses to Minimize Costs Case 1 - No Uncertainty
This notebook demonstrates how to use decision optimization to solve a common business problem in supply chain design: where should a company locate its distribution warehouses in order to minimize its supply costs. Typically, such a problem arises as part of an annual planning process in which the company forecasts the sales of its products at various retail stores it supplies and decides how to configure its distribution network to meet those demands. This notebook is the first of a series which considers several cases of this business problem. This case addresses the situation in which the decision maker has no uncertainty about those demands.
In this notebook, you will learn how to set up the optimization problem using IBM's OPL modeling language and how to solve it using IBM's Decision Optimization on Cloud service. The notebook also shows you how access data from a source in IBM's Object Store service and how to use Apache Spark to manage the data input to and output from the optimization service. In addition, the notebook shows how to visualize the data and solution on a map.
Locating Warehouses to Minimize Costs Case 2 - Uncertain Demand
This notebook demonstrates how to use decision optimization to solve a common business problem in supply chain design: where should a company locate its distribution warehouses in order to minimize its supply costs. Typically, such a problem arises as part of an annual planning process in which the company forecasts the sales of its products at various retail stores it supplies and decides how to configure its distribution network to meet those demands. This notebook is the second of a series which considers several cases of this business problem. This notebook extends the example discussed in case 1 to the situation when the demands to be served by the warehouse network are uncertain.
In this notebook, you will learn how to set up the optimization problem using IBM's OPL modeling language and how to solve it using IBM's Decision Optimization on Cloud service. The notebook also shows you how access data from a source in IBM's Object Store service and how to use Apache Spark to manage the data input to and output from the optimization service. In addition, the notebook shows how to visualize the data and solution on a map.