Python Tutorial : Basics of optimization

Linear programming basics for supply chain optimization. A supply chain is the network fulfilling customer requests. An LP model has three parts: decision variables, an objective function, and constraints. The example maximizes calories burned in 10 minutes with push-ups and running, yielding 50 push-ups and 0 miles as the optimal solution.
Chapters
Welcome to this course on supply chain analytics. In this first lesson, we will talk about the basics of optimization. This course will focus on supply chain optimization. So let us briefly define what a supply chain is. A supply chain consists of all the parties involved, directly or indirectly, in fulfilling a customer's request. That includes external suppliers, manufacturing, production, planning, and more. When fulfilling a customer's request, there are often multiple routes through the supply chain. Supply chain optimization attempts to find the best path to achieve an objective based on constraints. For example, a production plan is limited by the production capacity available. Or a logistics plan might be limited by how much truck capacity is available. Supply chain optimization attempts to use the different resources that are available to achieve an objective. That objective could be focused on delivering the lowest cost or highest service. Okay, here is a crash course in linear programming or lp. LP is a powerful tool for modeling decisions for optimization. It is an optimization method used using a mathematical model whose requirements are represented by linear relationships. There are three basic components of lp. First are the decision variables or the things that you can control. Next, the objective function, which describes the goal as a mathematical expression. It is what you want to maximize or minimize, such as profit or cost. Finally, because we live in the real world, there are constraints that limit our possible solutions. For example, manufacturing capacity. To provide more context, let's start with an example. Imagine that you are deciding on an exercise routine. In this situation, you only have 10 minutes to exercise and you want to maximize the number of calories you will burn. For every push up, it takes 0.2 minutes and burns 3 calories. For every mile ran, it takes 10 minutes and burns 130 calories. Based on a chart, what combination of push ups and running should you do? Let's model this as an LP problem. First we decide on the decision variables. In this case, it is the number of push ups in miles ran. Next, the objective function captures the number of calories burned for each push up in miles ran. So, based on our chart, we add three times the number of push ups to 130 times the number of miles. We want to choose the combination of decision variables that maximizes this function. Finally, we need to express our constraints. The first constraint captures how many minutes it takes to perform the exercise, which must be less than or equal to 10 minutes. We also want to ensure our decision variables are not negative. Points in the blue area of the graph all satisfy the constraints. To find an overall point that maximizes the calories burned, you could randomly test the shaded area, but that will take a long time. In our next lesson we will explore how to solve similar problems in Python. In this example, the optimal solution is 50 pushups and and 0 miles. In our example, our decision variables were the number of push ups and miles ran. We modeled them as continuous variables, meaning the optimal result could mean performing 0.5 push ups or 0.1 of a mile. The continuous nature of the decision variables makes this a linear programming problem. If push ups in miles ran could only be whole numbers, then this becomes integer programming. If we combine the two, it is mixed integer programming. In this lesson we define supply chain optimization. Through example, we define linear programming and its basic components. Finally, we define the meaning of lp, IP and mip. Let's.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







