Sample is called the conference allocation.
Suppose we have we are about to organize a conference and um, for example, let's say the participants
are participating in this event from, let's say, 20, uh, different cities or countries.
And, um, but unfortunately, due to some restrictions, they can't all travel to one location to have
the conference right there and they don't have the, um, communication facilities at every city.
OK, so, um, the question is, is it possible to, um, pick up some specific cities and then connect
these cities with a teleconference to each other?
OK, so the question is, how can we, um, choose and some a specific number of cities for having the
teleconference facilities right there and then connect them together in a way that the traveling costs
are minimized?
OK, so, uh, let's solve the problem together.
OK, so we want to minimize the, um, traveling time and traveling distances.
OK, so let's define a binary variable like l iji.
It means that the travel should happen between IFJ.
And multiply it by the distance between these two cities and also, um, there are some other constraints.
For example, this one, the summation of Elijah over Jay means that every person living in a city I
should only travel to one city.
OK, so not more than that.
And also the number of chosen cities are already specified.
Let's call and see the sort of summation of UI, which is a binary variable as well.
And over I will be and see.
And finally, um, let's say UI is telling us if a city is chosen for having the teleconference facilities
or not, then, um, another consideration should be, uh, written here.
Let's say Ellijay should be less than equal to a UI plus Euge.
What does it mean?
It means that if a traveler is going to happen between I and J, then, um.
At least one of them should have the teleconference facilities, OK?
It can't be the case that if none of these cities have, uh, teleconference facilities and traveling
is happening, for example.
And here you can see that for 20, uh, cities, city number five, city number one and number 10 are
chosen to host the teleconference.
But, um, there is no travel happening between 11 and 16, for example.
OK, OK, so and this is it.
If I have, let me show you some sensitivity analysis.
So, uh, suppose we have, uh, the same number of cities, 20.
Mm.
So all of them are, um, scattered on the plane the same way.
But each case, the number of conference facilities are changed.
So first of all, only two cities are, uh, chosen.
You can see it here.
So the objective function is one point six three five.
If I increase the number of cities equal to, let's say, four, so the objective function will even
reduce.
And if I increase the number again by six, then it means that the objective function is now lower.
And finally, if I choose eight points, then the objective function is at minimum.
So you can see that if we have 20 cities and if it is possible to choose all of them to have teleconference
facilities, then the objective function will become zero because no traveling is going to happen.
OK, so, uh, just, uh, have another look at the, um, uh, formulation and I will, uh, run the
Python code for you.
So here you can see that, uh.
And this is the Python code.
So first of all, I import every required, um, well, packages, then, um, we have to write down
the, um, required constraints.
So and is the number of cities and the number of conference to be allocated.
I enjoy representing the nodes.
Um, you is the buyer valuable showing that if a city I is chosen for having the telecoms facilities
or not.
The link is telling that uh, if I are connected to each other, it's a binary variable as well as objective
function is also defined.
Um, the locations of the loans are randomly generated.
And also so I want to write down the codes so the summation of UI or AI is equal to NC and also a summation
of a link I j the submission of a J should be one.
You should keep in mind that J should be different with AI.
And also this one is telling us, um.
Modelling age should be less than UI plus huge if I are different than each other.
And finally, that's the objective function, objective function is defined this way, so, um, I didn't
define a new parameter d to to, um, to be calculated.
I just wrote that expression here.
OK, so you can easily see that how the objective function is defined, multiplied by digit, which
is an expression like this.
And the solver is chosen to be um glyptic and the number of cities are 20 and trees, uh, conference
centers are considered for this purpose.
The model will be created using D-line.
It means that all the constraints and the associated input data will be fed into the model.
And then, um, this is the chosen solver will solve that, uh, create model.
And the objective function is, uh, given to you.
OK, and, um, this case is solved for 20 cities and three conference centers, but you can easily,
uh, create a loop to change those, um, ency centers and see what is the impact.
Hmm.
So I run the code again for you since the code is written in a way that every time it is run, um,
the locations of the.
Cities are changed and updated in a random way, so the objective functions are different in every case,
but you can see that by increasing the number of cities, the objective function is reducing, you know,
see, OK.
And also, sometimes you want to know what's going on inside one of those equations, for example,
let me show you one of them.
For example, equation two here.
So it is doing what it is, um, trying to do the summation l i j link.
I'm doing this.
Much of it should be equal to.
One, it means that the outgoing, um, the travel between each node should be exactly one, not more
than that.
So here you can see at the end for, um, if the starting point is one, then one plus two plus one
plus three one four one five one six one seven to the end.
OK, though that that should be equal to one and you can see was exactly happening inside each constraint.
I just put the equation number two, but you can change the name of the equation and specify any other
equation that you want.
This is definitely useful for doing the debugging and finding out, um, where exactly you might have,
uh, wrongly coded your, um, constraints.
OK, thank you very much.