 Okay, so in this case, we're going to solve the cloud balancing problem with up top on a word bench So we have two classes a computer class and a process class And we'll have to assign those processes to those computers, right? So for all these computers, which are our hosting machines All of each of them has a specific cost and each of them has also some hardware requirements to just for example the memory, right and then for our Processes, which we see here our processes are assigned to specific computer and that's actually Planning variables. So if we actually show that here, you can see that this is a planning variable So the computer changes during planning the other fields like this one for example don't right and then besides that We also have the memory field and the others of course the other hardware requirements For this process. Okay so Let's take a look at the computer field again So the computer again, so the computer has a cost and one of the guided rules that we have Is to make sure that when we have a specific computer and there exists at least one process assigned to that computer so where the computer is equal to The computer which we have here then we're going to reduce the score with the cost of that computer right, and I'll actually clean this up for the in the future version as you don't have to write Java code here anymore and Then you have a solver configuration. This is a pretty basic one where we say, okay, we're going to automatically stop after three seconds, right? Okay, so I've have this already deployed an execution server. I have this running the solver already and Right here. You can see we're going to send in a problem. So we're going to send in a List of computers and we're going to send in three computers as you can see, right and This computer has four Geobytes of memory this one eight and this one sixteen and they all have a different price tag And of course the more memory they have the more expensive they become and we have now two processes We're going to also Ask to which we're going to ask to assign and the first process has one gigabyte of memory The second one has seven gigabytes of memory, right? Okay, let's send this in Okay, here we go And now let's get the best solution for a record You don't have to wait until those three seconds are over. You can actually get the best solution faster You can get it the best solution up to this second, right? If you for example solving for 30 seconds Okay So what do we see in here? We again see our three computers, right? We see still that cost. That's all the same And we see our two processes the one with one the one with seven required memory And we can see that both of the processes are all our both assigned Now by optoplar and they're both assigned to computer two, which is this one This is computer two, right? Why is that computer two? Because this is an expat Expand reference, right? So that's why that's computer two and because they start from one expat references Now what you can also see is that the cost of that computer is three thousand So our soft score is actually minus three thousand. You can see that those two things match up, right? We don't have to pay two thousand or four thousand because we're not using those two computers We're only using that second computer. So that actually that's nice, right? Okay, so here's our solution and let's suppose now that This particular process over here, which is seven which is now assigned to the second computer Cannot actually run on that computer because it's a Windows operating system and that process requires Let's say Linux, right? so Let's go back to the workbench So back to the computer field and let's say let's add that information We can say that certain field that's there are different operating systems, right? So operating system Let's add a field for that. So from then on we'll be able to give that to our Computers, right? So now we have an operating system field and for the process the same thing and a field Let's call it the required Operating system, right? And let's also make that a string for now It's for easiness sake that I make it a string of course, right? Okay, great Now let's add an extra guided rule because of now we have that information here And we have that information there, right? And of course we have to save both of these. Let me just do that Okay, and now let's add an extra guided rule where we say here we go where we say Operating operating System check right, okay, and so here we say when We have a computer Okay, and there is a computer. Let's bind that to see right when you have a computer see and then we have a process right and The process has a computer which is equal to See right so when that comes that is the process. It's actually running on that computer Right, then we might actually have a problem, right because the because of the operating system, right? So let's say then Let's Let's add a restriction there when the required operating system is Is not null Alright And Will again do this field when and the required operating system is not equal to It's not equal to the computers operating system So Let me just check here Lateral value from the former expression editor choose yes from see the operating system, right? so Here we go Just to open that a little bit more right Operating system, okay Then and then we again have to Reduce the score. So let me just check over here. What's that at? So we'll just reduce the score Of the heart constraint, right? And we'll just do minus one Right, and we'll save this. Okay Great. Let's see if we can validate this. So let's validate this Great successfully validated. Perfect. Now. Let's deploy this So we're going to let's deploy this as version 1.2, right? Let's deploy this version 1.2 Save this for a second And let's deploy this Here we go Great. Now, let's get back to our rest clients, right? So, uh, one of the things we can do is we can dispose the current, uh, key container So, uh, let's do this. Let's kill the key container, right? It's version 1.1 that was deployed. So let's kill that one. Okay And now let's create a new key container With the same id, but let's give it version 1.2 here, right? Okay, so now we have those new, uh, rules actually deployed with those new fields, right? So, uh, we can again create a solver. Here we go. We've created a solver. He's ready And now let's try to solve this case again, right? So we have these fields again, but now we can add something we can say, for example, say that, uh, this is Operating system is, for example, linux, right? Operating system And this one will make that windows Right and this one will make that Uh, linux also, right? Um, okay And now we can do a required operating system. So for this one, let's add, uh re required operating system in there, uh, which is linux. All right And Let's send that in. Send that in. Here we go. It's actually okay So I did not write any typo mistakes and let's ask for the best solution Here we go. And now what we see is that both of the machines are actually assigned to three To computer three, right? Not no longer computer two. So they're now assigned that linux machine. Why? Because the this comp this particular machine over here requires linux And so this Canna and this needs seven cp seven memory. So it cannot run That's first computer because it only has four memory It cannot run on that second computer because that's windows and it needs linux So it can only run on the third computer which has testing 16 you might send linux and then of course the first Thing which only use one mega one Gigabyte of memory it can run on the third computer too Okay, so you've seen we've changed the rules, uh without any problem