 Hello, and welcome back from the breakout rooms. I hope you enjoyed that time chatting with your colleagues of SC0X. And I hope you have some good insights and comments for us to keep the discussion going. While we received your feedback from the breakout rooms, Matias will continue his presentation just to tell you how he and his team are introducing uncertainty, particularly uncertainty in demand in their distribution network models. Exactly. So I hope you had some good discussions. And let's first start thinking about why it would even be worthwhile, including uncertainty into a network design model. And there could be multiple sources of uncertainty. For instance, there are probably uncertainties related to demand. That's the most common uncertainty that we consider because you never really know how a demand realization might look the next day. You never really know which customer is going to order when and in which quantity and what product and even maybe in which location. Maybe a customer has multiple different locations and you don't know in advance where he's going to place the next order. So that's the most common uncertainty, just demand. But there's other sources of uncertainty, especially in cities, you have to consider uncertainty that's related to travel times, for instance, because of traffic, because of congestion. There might also be uncertainties related to weather and the like, but that obviously gets more and more difficult to actually capture from the data side. So the example that I'm going to present today is mostly going to focus on uncertainty that stems from demand uncertainty. But nevertheless, the same concept, the same technique that we are using could also be applied to the other sources of uncertainty. And actually, if you look into the literature, it's actually amazing how few works have been done so far that actually systematically account for uncertainty in large scale network design problems. But it's a very important thing to do, because actually you can show that if you include uncertainty into the design process of a distribution network, you will have a more robust network at the end. That's kind of obvious. If you plan for uncertainty, the result should be able to cope better with that uncertainty in the future than if you did not include it in the planning process. But what's also interesting is that if you look at the expected cost of operating a distribution network, if you design it without looking into uncertainty, you will actually find that the expected cost from operating that network are actually higher than if you included uncertainty in the initial design phase. And I'll show you that in the case study that we worked on in a bit. And also, it reduces downside risk. So if you include uncertainty into the planning and design process, then not only are you basically obtaining a lower expected cost, but also, let's say, the worst case cost, so the worst possible cost that you might get from operating that network, will actually be lower than if you ignore that uncertainty in the first place. So how do we model distribution networks, including uncertainty? And if you think about uncertainty, you also have to think about different time frames. If we design a network, for instance, there are certain design decisions that are strategic to the long term, because they are very hard or very costly to change. And there are other decisions that are more easy to change and therefore, less long term, but more short term. And we call them the operational planning decisions, basically. So on this chart, what you see is how we basically split up the distribution design that I presented to you previously as one integrated problem, how we split that up into, let's say, the strategic part and the operational part. Strategic part is obviously, for instance, the network architecture, the network facility architecture, because it's just not possible to locate a distribution center somewhere else on a daily basis. It's very costly, it's a big asset, you can't move it. So obviously, investing into facility infrastructure, so distribution centers and satellite facilities is typically a strategic decision. Same thing usually holds true with vehicle fleets. So if you operate a distribution vehicle fleet, then you usually decide ahead of time how many vehicles of which type you have available, you buy or you rent. And then you use them on a daily basis, but you can't easily change the composition of that vehicle fleet. On the short term, so operational side, we have other decisions. For instance, the service areas might be defined on a day-to-day basis. So the parts of the city that are being served from one facility, that decision might change depending on how demand actually materializes. Or also, let's say you have a certain vehicle composition of that is composed of different vehicle types, you might make decisions on a day-to-day basis which vehicle type to choose on which route on that particular day. So that's also a short-term decision. And then another thing that you might consider as a short-term decision is not to serve demand, right? So for instance, if you don't have enough facilities or if you don't have enough vehicles to serve the entire demand, the only option that might be left to you is not to serve certain customers. That's called lost sales. And so accepting certain lost sales, so accepting not to serve certain customers might also be a short-term decision variable in your optimization problem. And you see that illustrated on this chart. Now, if we think about the first stage strategic decisions, so basically, where do we locate how many facilities and how do we compose our vehicle fleet? We can formulate that as an optimization problem where the objective is obviously to minimize the total cost of operation. But if you look very closely at the lower left part of this chart, we now obviously take into account the facility cost and the vehicle cost, but on the operational cost side, we now don't look at, let's say, one single cost figure that emerges from routing the vehicles across one particular demand realization, but we look at an expected cost figure. And expected because we're looking at multiple possible probabilistic realizations of demand. So it's a stochastic problem now. Now, where does this expected cost figure come from? Well, it basically comes from solving multiple sub-problems. So let's say we have a year. Let's say we have a year with 365 days. Everything single day is one possible demand realization. So we might end up modeling the uncertainty in demand by discretizing the year in two days and basically using every single day as one possible realization of demand and then sampling from those realizations. And basically what we're doing now for every single scenario is we solve, for every single day, so every possible demand realization, we solve the sub-problem, which takes the strategic decisions. So where we put the facilities and how we compose the fleet, take those strategic decisions as a given, as a fixed given, and then only optimize over the operational decisions. So we only optimize now over how we allocate service areas to facilities, which vehicles we choose to serve certain areas of the city and where to accept lost sales. And again, this is a minimization problem. Again, we're trying to minimize the operational cost of that scenario, looking into routing costs, cost of less sales, and obviously fulfilling all the necessary constraints of the overall model. So for every single realization of demand, we have one optimal solution on the operational side and one cost figure that this translates to. And then from looking over all the different possible realizations of demand, we then calculate the expected operational cost, which then feed into the objective function of the first level problem, the strategic problem. Now to scare all our enemies, we have to show the math. So this is basically a simplified version of how such a model would be formulated. Don't worry, I'm not gonna go into details here. I'm rather gonna address the most important challenge here, namely computational complexity, because let's stick with this example. We have 365 demand scenarios, 365 days. If you wanted to solve this problem, which is already very complex by itself, over 365 different scenarios, you would never end up with a solution in reasonable amounts of time. So we have to simplify the problem. And one approach that we usually use for this is called sample average approximation. So again, it sounds very complicated, but actually isn't. So we have 365 demand scenarios, for instance, and we sample from that. We sample two different populations of scenarios from that. One is we select randomly a small number of so-called training scenarios, which are called N on this slide. Let's say out of the 365 days, we sample 20 randomly selected days to be our training days, basically. And then we sample a much larger number, probably even the whole dataset, to be our test scenarios. So let's say we train the model on 20 scenarios, and then we test it on the whole 365. So this is the first step in this process. We generate those two populations of demand scenarios. Then in the second stage, we take the small number of design scenarios or test scenarios to come up with a reasonable distribution network design. So we solve the problem that I just introduced to you. That's two-stage problem for only 20 randomly selected demand scenarios. And then we basically store the network design. So the locations of the facilities, the vehicles, and so on and so forth that we obtained from optimizing only over those 20 scenarios. Since it's 20 now, not 365, it's much easier to solve the problem. And then in the third stage, we basically test that design. So we fix that design and just test how well or how badly the distribution network actually performs if we test it on all the 365 scenarios. Because maybe we designed the network for 20 scenarios that are very particular. And so the network design is now good at serving those 20 scenarios, but for the remaining scenarios, it's really bad. And that's something we want to avoid. So we first design and then we test on the entire data set. And we do that not only once, but we do it like multiple times. M times, maybe 20, maybe 50 times. So we basically get 20 or 50 different designs. Each of them we test against the entire data set. And then it's very easy. We just take the design that yielded the best results in the test phase to be the most likely solution that is closest to the true optimal design of the network. Sounds complicated. That's why I'm kind of repeating those steps once again. So again, first step is scenario generation. This chart here basically shows you all the different demand scenarios that we had in our case study, for instance. So every single observation in that data set relates to something like what you see on the right. So one realization of demand in Bogota on a particular day. And then we pick from that, from the total amount of demand scenarios, we pick a small number of design scenarios and a large number of test scenarios. Then in the design phase, we use only the small number of design scenarios to actually optimize the whole model, the whole two-stage optimization problem, and get an optimal network design for that particular design stage out of that. And then we take that network design, take it as a given, and basically test it one more time on the entire data set. So a larger set of scenarios to get the expected performance of that design. And then we choose design that yields the best expected performance. So that leads me to the case study where we actually applied this technique to a real-world distribution problem of beverages in Bogota, which is a major city, obviously, of the Latin Americas. And here you see a map of Bogota. The blue area in this map is actually the one that we considered for this case study, so not the entire city area, but the area that captures the most demand. And for instance, you see here different vehicle options that the model could choose from to serve certain pixels within the city. So we ranged from everything between a 10-pillar truck so very big vehicle down to a motor trailer or even a pedestrian delivering only with a handcart. Similarly, we gave the model different facility options. We allowed it to locate the first level distribution center but also different types of satellite facilities within the city. Basically, we called them mini warehouses and we basically analyzed different sizes of those mini warehouses. Now, the interesting part is what happens if we compare a deterministic solution to this problem, to the stochastic solution? So if we take into account uncertainty or not. So the challenge here was obviously to design a distribution network that would serve the demand depicted in this map in the most cost-optimal way. Now, if we only work with average demand, so we took the entire year and just looked at the average day and we would run a distribution network design as the one that I showed you in the first part of this session, we would get to a very simple distribution network. We would get to a network that operates out of one single distribution center for the entire city and also our fleet would mostly be composed of large vehicles, 10 pallet trucks or four pallet trucks. Now, on the right side, you see the same data, the same problem, but this time solved taking into account stochasticity. So taking into account the demand uncertainty that we see in that city. And you see that the network design changes. Now we have one distribution center but we also have three little satellite facilities somewhere within Bogota that help us transship to smaller vehicles. And that also reflects to in the fleet composition. Now, we don't only deal with big trucks but we also have a substantial amount of, let's say smaller vehicles like motor trailers or buggy since so forth. So you see the network design as such changes but is it really better? We don't really know yet and that's why I have another slide for you namely a slide that compares for instance the cost performance of that network and obviously things had to be masked here and standardized but nevertheless the message holds true. So again, look at the left side, look at the deterministic model and you will see that in the design generation phase we obtain a certain objective value. So a certain expected cost from the deterministic model that optimizes the distribution network design and we standardized that cost to a hundred. So that's basically the total cost of operation of running this network on a particular day. That's the design part. If we then take this deterministically designed network and actually test its performance against all the 365 demand scenarios that we actually have we see that the true expected cost is much higher. Actually, if you take the average cost across all 365 scenarios you end up with almost 115 costs. So you basically we underestimated the true cost of the network by 15% because we didn't take into account uncertainty. Now if you look on the right side, the stochastic model obviously yields a higher cost in the design phase from in the first place because I mean you're designing a network now that is able to do more that is able to cope with uncertainty better. So naturally it will cost more to run such a network but the interesting part is that now the cost that we basically came up with in the design phase the 111 that you see here is very close to the one that we get when we actually evaluate the performance of the network over the whole 365 days which is actually if we increase the number of design scenarios we would actually get to the exact same number for both figures. So now we basically have a deviation of only about 3% between the expected cost from the design phase and the true cost when we evaluate it against the true uncertainty in the market. So basically it gives you a better estimation of the true cost of operating your network if you include stochasticity. The other important part apart from cost is risk. So how do you measure risk usually by measuring variability for instance through standard deviation and you see that the standard deviation of cost is much higher if you look at the results from the deterministic model and the stochastic model. So that means if you run, if you design your network using uncertainty you have a network that performs better at lower expected cost and also more predictably. So you are more certain about the level of cost that you will see in real life on a day to day basis. And the last figure that you see here is that worst case scenario that I was talking about earlier. So like the worst possible cost that you could obtain on the worst possible day from operating that network is actually significantly lower for the network that was designed taking into account uncertainty as compared to the one that was designed under deterministic assumptions. So that's basically it. That was a very brief introduction to stochastic network design I know and maybe some of this reflected what you had been discussing in the breakout rooms. If not, we'd be happy to hear other ideas or other questions that you might have. Yeah, thanks Matias. I think it was a fantastic presentation presenting a very complex project in a very clear way. So thanks again. And we got a lot of feedback from our breakout rooms. So let's hear what they want to share with us. First of all, well, they found that this presentation is helping them understand how the techniques they have learned in a CCRX can be hard to be applied in real world problems. So they love to see how mixing to your linear programming and approximations are being applied in your project. They also like a lot the pixel idea to pixelate the cities. And they're interested in knowing a little bit more about it. Maybe if we could share some references for them to dig into that a little bit further. I know you developed this idea here or you got inspired by all the work. Well, actually, I kind of started using this technique in my PhD thesis back in the day. And actually the paper that does this is available online in Transportation Science. I can probably give you the number and the issue and stuff. But the idea is not ground working, right? You need to have a way of discretizing demand, of discretizing geography of a space, of a city somehow. But the beauty of the pixels is that they are all comparable. You can actually size them up or down to get different levels of resolution. But one pixel is always comparable to the other. That's the key challenge if you want to compare performance of a logistics process across a geography. You need to have units of analysis that are actually comparable to each other. The downside of pixels, however, is that they don't always kind of coincide with the true geographical features of a city. For instance, you have a river somewhere. And obviously, if there's no bridge, you cannot serve both sides of the river within the same route because you can't get across the river. The pixel doesn't know that. The pixel is probably right on top of the river. So part of the pixel is on the left side. The other part of the pixel is on the right side. So that's where a little bit of imprecision is introduced to our models because of that pixel logic. And you could think of other logics, like looking at, for instance, sensor cells or blocks or road network shapes that you could use as units of analysis that basically resemble the true topography of a city better. But then you lose the comparability because these cells are never exactly the same. So it's hard to compare logistics performance in one very oddly shaped and big part of the city and one very small but very nicely shaped. But you will get different numbers but they are not gonna be really comparable. That's why we typically stick with the pixel logic. Right? They also think, well, they know the techniques but the difficult part is to develop the procedure to develop this kind of project, like putting all these different techniques together and of course getting the data. So yeah, they would like to know how to get some, they could get some inspiration to learn how to develop this kind of project. And also how did you get your data? Well, data is always the most challenging part of the problem well, not the most challenging but the most cumbersome part of the problem. And we luckily work with large companies around the world that help us tackle these research questions because we help them tackle one of their business problems. So they provide us with a lot of real-world data but some of the data that we work with, as I mentioned before, is also publicly available. Nowadays, much more than let's say five or 10 years ago, we have sources of data that are really powerful. We have just think of Google Maps or Google APIs that can teach you so many things about the geographic shape and structure of a city, the road network, the points of interest, the commercial activity. There are publicly available sources on population density, for instance. You can match that with census data. All of this is freely available. There's open street maps, which is even more freely available because it's crowdsourced data on road network and city maps across the entire globe, no matter where you go. So there's a lot of rich information out there. And if you are able to combine that with private information from companies, that's what makes those research projects so interesting. While developing such research projects, well, that's why we have PhD students and master students and postdocs working on this. It's not an easy task. It's nothing that you could usually do in three months. It's more like something you can do in a year or so. So it's a major project. Each of single research project that we do here is a major effort. And I hope that SC0X and the other courses are preparing you to probably at some point run such a project yourself as a student or as a project leader in a company or somewhere else. Great. So some of them were commented as simulation and also regression models might be useful. I don't know, did you think about that? Yeah, I mean, simulation is obviously kind of the second step. So if you design a network and you wanna know how it performs, you usually use simulation. In a way, if you think about the presentation that I gave, there are some simulation components to it because we randomly sample from an existing set of demand scenarios. That's the essence of Monte Carlo simulation. And so we design with an optimization model and then we evaluate in a way with a simulation model. It's not a discrete event simulation or there's nothing moving around but you use Monte Carlo simulation principles in this case to evaluate the performance of a given distribution network design. So yes, optimization and simulation kind of go hand in hand with these problems. Great. And then maybe one last question before we're running out of time. One of our students is commented that last night the delivery is highly competitive and lucrative for logistics companies. How do delivery standards get incorporated into models? Delivery standards. I guess he might refer to different speeds of delivery or... I saw customer service maybe, that's what I understand. Yeah, I mean, the model or the example that you saw kind of considered only one kind of service level, right? You have commercial P2B customers that order something and usually get delivered based on fixed delivery schedules or delivery lead times. So there's kind of only one delivery service that you need to model. In an e-commerce setting, for instance, we need to model different, sometimes we call it pipelines. So the same day delivery, next day delivery, instant delivery, and it just gets more complicated because you have to model different operational processes for the different service qualities. For instance, if you have immediate delivery, there's no way that you could even touch a facility with one of the shipments. It's basically you pick up the package and you ship it right to the destination. Or even with same-day delivery, you probably consolidate shipments somewhere, but not at the distribution center, but rather at the satellite facility. And then you ship it from there on the same day to the destination. So basically the products that you're shipping take different ways through your network. And that needs to be modeled differently. That makes the optimization model much more complicated and therefore also much harder to solve in reasonable amounts of time. But the general principles are still the same that you won't solve in this presentation. Okay, great. So thanks so much, Matias, for being here today with us because we know how busy you are and you made a great effort to share your project and all your insights with our students in SCRX. Yeah, thanks for having me. That was fun. Yeah, it was great. I learned a lot with you. And I think this is a great link between the first part of the course and the second part of the course because in the first part of the course, we were focusing very much in optimization models. And in the second part, we will introduce uncertainty. Week seven actually, title is managing uncertainty. And we will introduce probabilistic models there. So I'm sure you will love it. And what we learned with Matias that modeling is an art and also creating this complex, tackling these complex problems is challenging but combining different techniques always helps. And I hope you will be able to combine all the techniques you're learning here to deal with your day-to-day problems at work. That's all I wanted to say about the life events. I hope you enjoyed it. The videos will be in YouTube. So you want to watch them again and keep learning with Dr. Matias. You're welcome to go into YouTube and check the videos again.