Hi everyone. Welcome to our last example here for a non-linear problem. Very similar to the last one, just a slight variation just to go through it. If you want, pause the video, read the question, see if you can set it up, grab the template from the last one or since it's a new template, rebuild it as we go. Ready? Motorcross of Wisconsin produces two models of snowmobiles, the XJ6 and the XJ8. In any given production planning week, Motorcross has 40 hours available in its final testing bay. That sounds like a constraint. Each XJ6 requires one hour and each XJ8 requires two hours. Let's put those in. We can already see those are coming. We have some constraints, this is going to be our hours requirement. We have XJ6s require one hour and XJ8s require two hours. We'll put in our labels of left-hand side sign and our right-hand side, we know our sign is going to be less than or equal to the 40 hours available. If you're good at this you could already see it coming. We'll add some borders on, expand the columns, and center everything so it is pretty unreadable. We'll color code our variable cells to be green, how many of each one that I want, and then revenue in thousands of dollars, watch your units here, given as follows. Now, revenue is going to come from a formula. I have R equals and then this formula here, X(4 minus 0.1X plus Y(5 minus 0.2). This is a bit more complicated formula than you used to if you've done some of these business problems in other classes, you might notice the revenue formula tends not to be linear, so we need to somehow program that in. But notice though they do use just X, so X here is the number of XJ6s. Maybe I'll just to label things say like X equals the number of XJ6s and Y equals the number of XJ8s. What other pieces do I need here? Now, there's two ways to do this. You could do some algebra and maybe distribute this across and simplify some things. That's fine. But I really don't want to do algebra. I'd recommend against it if at all possible. I want to somehow figure out my revenue. But what do I need? Well, I have X and I have Y, and these other terms that I need, so let's label this 4 minus 0.1X. I'm going to need 5 minus 0.02Y. I'm going to label these up there. Instead of putting it down below I'm just going to put them to the right and you'll see why in a second. I'm just going to put them to the right. Now, these are calculations. They are not decision variables on their own. I don't want to find this number, I want to calculate this. Let's build it equals 4 minus 0.1 times the X number. Great. Then 5 minus 0.02 times the Y number. We'll center those. These numbers are calculated and as you put it in different numbers for X's and Y's, well, then I have 3.8 and 4.9. There are different numbers that are calculated and you can play around with this and put in some dummy numbers, again, just to make sure that your spreadsheet is working. Then I have my objective which is going to be revenue which I want to maximize. Let's build out this formula. Again, color-code the cell gray, the formula for revenue. Again, grab it from the word problem. It's going to be the X number times this other term 4 minus 0.1X, so I'll multiply it by D_2 and then plus my Y term times 5 minus 0.02Y and I hit "Enter". This is a non-linear formula. Now, be careful, some people think this is linear because each term is linear like X by itself is linear, the 4 minus 0.1 is linear, Y is linear, 5 minus 0.02Y, that is also linear. But when you multiply them together, like this revenue formula does, you'll see you'll get an X-squared. I'm going to need to use the GRG nonlinear program to solve this. The revenue, I just want to remind myself that the units are in thousands. I'll make a note for myself for my summary sentence. This here would be like 22,000. Let's add the left-hand side formula. Once again, some product of our variable cells, the two variable cells, sum, product, and then the coefficients in the constraint and hit "Enter". This is the only constraint I have. Let's go to Solver, put in our objective function, maximum, and changing our variable cells, the two green cells, subject to my one lonely constraint here, hit "Okay". Make sure the box is checked to make unconstrained variables non-negative. You don't want to come up with a negative number and then select your solving method GRG nonlinear and hit "Solve". Hey, look at that Solver found solution. All constraints are satisfied. Hopefully again, if you caught this give yourself a little pat on the back. It's going to be weird if you come back as your summary sentence to produce say 9.047 snowmobiles. Hopefully you stop right there and say how the heck do I make 0.047? Even though this is a non-linear example, here is the mix and blend of all the skills in this course. Go back to Solver, what did I forget? Maybe you caught this. Take the two decision variables, they are the number of snowmobiles. They have to be an integer. You're allowed to use all these things together. This is perfectly fine and you hit "Okay" and you run it one more time. Now Solver found an integer solution within its tolerance, all constraints are satisfied and we hit "Okay". So 10 and 15 are the correct answers and it will produce revenue of $100,500. You can fix our summary sentence to actually have make sense produce 10 XJ6 snowmobiles and 15 XJ8 snowmobiles for a max revenue of 100,000 multiply 1,000, so $100,500. Here are two of the variables, both decision variables were integers. You can imagine a problem where some are, some are not, and we start putting all these skills. If you got this answer, great job. Go over the spreadsheet, recreate it, make sure you understand what each piece is doing. You can imagine introducing more complexity as you go along. Nice job on this integer programming non-linear program. Great job. Will see you next time.