Question: #Python Code include: #Problem Narration #Define Gurobi model using python #Set and their explanation #Parameter / data and their description #decision variabel and their explanation

#Python Code include: #Problem Narration #Define Gurobi model using python #Set and their explanation #Parameter / data and their description #decision variabel and their explanation #Contsraint and their explanation #run optimization and their explanation #Print the result and explanation
10.6.1 Model formulation Let NINIT be the number of vans already rented at the beginning of the planning period. We define Integer variables rentem to denote the number of contracts of type C (CE CONTR = {3,4,5}) to start at the beginning of month m (m MONTHS = {1,..., 6)). To clarify the constraint formulation we are using, let us first look at a specific formulation. Take for example the constraint for month 5 (May) represented in Figure 10.4: the running contracts may be 5-months contracts signed in January, 4 or 5-months contracts signed in February, 3 or 4-months contracts signed in March, or 3-months contracts signed in April. These contracts must satisfy the requirement of 425 vans for the month of May. Note that for instance a 5- month contract cannot be signed in March because it does not terminate at the end of June, nor can any contract be signed in May. m=1: NINT + rent31 + renta +rents > 430 m=2: NINT + rent31 +renta +rentsi +rente + renta +rents > 410 m=3: renta +renta +rentsi + rent3z + renta2 +rents2 + renta +rente > 440 m=4: renter +rents1 + rent3z + renta +rentsz + renta +rente +rent: > 390 m=5: rentsi + renta2 +rents2 +rentsa + rentaz + rent34 425 m=6: rents + renta +rent34 > 450 It is possible to write these constraints in a generic way. Let NM denote the number of months, COST the cost per van of contracts of duration cand REQ.m the requirement of vans in month m. minimize COST - rentem (10.6.1) + + CE CONTR ME MONTHS minimNM-C+1) Vm = 1,2: NINIT + renten REO (10.6.2) CE CONTRO-max,m-c1) minim, NMC+1) CE CONTR-maxim-c1) Vm = 3,...,NM: renton REO (10.6.3) VC E CONTR, ME MONTHS: rente EN (10.6.4) The objective function is to minimize the total cost for all contracts that are signed (10.6.1). A contract lasts C months, therefore the requirement of vans in any month m is covered by the contracts of type C signed in the months max(1, m-C+1) and minim, NM-C+1). The constraints (10.6.3) specify that starting from March the signed contracts have to cover the need for vans of the month. For January and February, the constraints (10.6.2) also include the number of vans Initially available NINIT. The constraints (10.6.4) establish the Integrality constraints for the variables. From LP theory it is possible to show that this mathematical program is equivalent to a minimum cost flow problem that is known to have Integer values at the linear) optimum. It is therefore possible to replace the constraints (10.6.4) by simple non-negativity conditions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
