1. Homepage
  2. Programming
  3. Team Software Design Project: Load balancing of a bike fleet

Team Software Design Project: Load balancing of a bike fleet

Engage in a Conversation
CNAMTSDP2Team Software Design ProjectJuliaSSB

TSDP2
Team Software Design Project
CourseNana.COM

Team Software Design Project Load balancing of a bike fleet CourseNana.COM

Y ear 2023/2024 CourseNana.COM

1) Objective
The objective of this project is to study an optimization problem. You will have to propose a model and then solve instances of the problem. This problem concerns the management of a self-service bicycle (SSB) fleet. Several formulations of this problem are possible. We suggest a quadratic formulation using integer and 0-1 variables, but every other valid formulation will be accepted, in particular you may propose a more classical linear formulation, inspired by the capacitated traveling salesman problem (TSP). If you choose a quadratic formulation, you will have to apply a linearization technique, presented during the course. You will also have to use the Julia programming language, its library JuMP and a free ILP solver (Cbc) for solving small instances and to implement a heuristic method to solve large instances.. CourseNana.COM

2) Description of the project CourseNana.COM

A company is in charge of a self-service bicycles (SSB) fleet in a big city. A great deal of stations are installed in the city. A user may take a bike that is available at a station A and go to a station B where he drops the bike taken at A. Some locations of the city are more attractive than others Therefore the number of bikes that are available at each station fluctuates a lot during the day. This is a double problem : a station may be empty (no bike available) if it is not attractive or located high up in the city ; on the contrary, in the a touristic area, a station may be full (each station can contain a limited number of bikes). This is naturally problematic since a biker arriving at a full station must find another station. To avoid these two problems as much as possible, the company in charge of the fleet balance the stations at night : a trailer circulates in the city, visits the different stations, unblocks the saturated stations and deposit some bikes at the too empty stations. CourseNana.COM

The objective of this project is to determine the tour of the trailer that balances the bike stations. CourseNana.COM

Hypotheses and contrainsts that must be respected : the tour of the trailer begins at the wharehouse where a stock of bikes, sufficiently important, is always present. The trailer is loaded with a given number of bikes (this number will be a variable of the problem, it is not fixed). The trailer must pass through each of the n stations of the fleet, including those that are already balanced (in order to check the state of the station and eventually trigger an intervention, is necessary). At the end of the tour, the trailer goes back at the warehouse, eventually with some bikes. Each station is visited exactly once. We must naturally respect the capacity of the trailer. CourseNana.COM

Data. We know in advance : CourseNana.COM

o The number n of stations visited during the tour and their geographical location : the stations are located in a coordinate system. In this coordinate system, one unit corresponds to an hectometer (1u=100m), inside a square of 10km side length. Concretely, we know the coordinates (x, y) of each station. The coordinates of the warehouse are also known ; CourseNana.COM

o The capacity K of the trailer (it is the maximal number of bikes that can be carried in the trailer) ; CourseNana.COM

o The distance 𝒅𝒊𝒋 between two stations i and j (and the distance between the warehouse and each station) is computed thanks to the coordinates of the different stations and of the warehouse. You will necessarily round the euclidean distance (with the function round(Int64, x)). CourseNana.COM

o The number nbpi of bikes present at the station i and the maximal capacity capi of the station i; CourseNana.COM

TSDP2 Y ear Team Software Design Project 2023/2024 CourseNana.COM

o The number ideali that represents the ideal number (not too many, not too few) of bikes that should be present at the station i for an optimal functioning of the station (this number is about 75% of the maximal capacity of the station, but it also depends on the location of the stations. Anyways, it is known). CourseNana.COM

o Remark : some bikes may be stolen : 𝑛 𝑛𝑏𝑣𝑝 ≤ ∑𝑛 𝑖𝑑𝑒𝑎𝑙 𝑖=1 𝑖 𝑖=1 𝑖 CourseNana.COM

  • Goals of the tour : two questions arise. First we want to know wether it is possible or not to reset each station at its ideal level within a unique tour. We will say that a station has been balanced when it has been reset at its ideal number of bikes. If, after the tour, a station has not its ideal number of bikes, the number of bikes above or under the ideal number is called « imbalance of the station » (this number is nonnegative). The first objective consists of organizing the tour in order to minimize (and if possible to annul) the global imbalance, defined as the sum of the imbalances of each station. The second question is to know, among all the possible tours that minimize the global imbalance, which one minimizes the distance traveled by the trailer. A second objective, having a lower priority than the first one, consists of minimizing the total distance traveled, after having minimized the imbalance. So, an optimal solution of the problem will be a solution for which the value i* of the global imbalance is minimal and for which the distance traveled is the smallest one among all the solutions having an imbalance equal to i*. CourseNana.COM

  • Suggestions for the modeling CourseNana.COM

    Several formulations of this problem can be considered. We suggest a quadratic formulation with 0-1 and integer variables. The deadline for handing in the mathematical model is April 17th 2024, 23:59 (on moodle). Then, during the session of April 18th, a quadratic model and its linearization will be proposed : for the rest of the project, you will then be able to use your own formulation of the model proposed by the teacher on 04/18/2024. CourseNana.COM

    We suggest to use two types of variables : CourseNana.COM

    • some 0-1 variables 0-1 xij with the following meaning : xij equals 1 if and only if the station i is the jth visited station. The tour has n « steps » (a step corresponds to the visit of a station). The departure from the warehouse and the return to the warehouse are imposed and they are not considered as steps of the tour (but the distances traveled from the warehouse to the first visited station and from the last visited station to the warehouse must be counted in the total distance). CourseNana.COM

    • some integer variables (nonnegative) loadj (j ranges from 0 to n) represent the number of bikes that are present on the trailer. The initial content of the trailer, at the departure of the warehouse, is load0. The variable loadj (for j ≥ 1) represents the number of bikes present on the trailer after the jth step. CourseNana.COM

    • some integer variables (positive, negative or zero) dropij representing the number of bikes dropped at the station i (if some bikes are missing) or removed from the station i (if some bikes are in excess) at the step j. We must ensure that dropij can be different from 0 only if the station i is visited at setp j. CourseNana.COM

      Important remarks : CourseNana.COM

    • The total distance traveled by the trailer is intrisically quadratic if we use the variables xij. We can linearize the function representing the distance in order to obtain a linear model using mixed variables (some of the variables are real, others are 0-1, others are integer). CourseNana.COM

    • The global imbalance is a the sum of the individual imbalances. Each individual imbalance represents a notion of error. It is natural to represent this error with a norm. Here we use the absolute value of the difference with the ideal (we could have considered a quadratic error). Therefore we have to représentent an absolute value with a linear function and constraints. CourseNana.COM

    • You will try to write a unique model allowing us to take into account the two objectives. 2 CourseNana.COM

3) Instance format CourseNana.COM

TSDP2
Team Software Design Project
CourseNana.COM

Y ear 2023/2024 CourseNana.COM

The instances you have to solve can be find on moodle.
The basic example, illustrated in the next section is the instance mini_6 :
CourseNana.COM

name mini_6
K6
stations
# id x y nbp capa ideal 182 9 8118
CourseNana.COM

26979 3 97 371 910107 46493 2 64 56513 5 75 warehouse 50 50 CourseNana.COM

File mini_6.dat CourseNana.COM

All the instance files respect the same syntactical rules. A line beginning with ‘#’ is a comment. The string after the keyword nameis the name of the instance. The number after the keyword Kis the capacity of the trailer. The lines after the keyword stationsand located before the keyword warehousecorrespond to the characteristics of each station : an identifier, its abscissa, its ordinate, its ‘nbp’ (number of bikes present before the tour), its ‘cap’ (capacity of the station), and its ‘ideal’ (ideal number of bikes). A last line contains the keyword warehousefollowed by the coordinates (x, y) of the warehouse. CourseNana.COM

4) Three examples and their solution CourseNana.COM

To illustrate the optimization work, we will consider 3 variants of the same instance, the instance mini_6 of the previous section, in which we change the value of the parameter K (capacity of the trailer). The instances mini_5 and mini_2 differ from the instance mini_6 only on the value of K (equal to 5 for mini_5 and 2 for mini_2). Solving the three instances yields the following optimal solutions. CourseNana.COM

Legend : CourseNana.COM

  • The mention in brackets indicates the initial situation of the station CourseNana.COM

  • indicates the number of bikes dropped (𝑥 ≥ 0) at the station or removed (𝑥 ≤ 0) from the station CourseNana.COM

  • The stock indicates the number of bikes present in the trailer CourseNana.COM

  • The unit of distance is the hectometer (1 unit = 100 meters) CourseNana.COM

TSDP2 Y ear Team Software Design Project 2023/2024 CourseNana.COM

Optimal solution of the instance mini_6 CourseNana.COM

Optimal solution of the instance mini_5 CourseNana.COM

TSDP2 Y ear Team Software Design Project 2023/2024 CourseNana.COM

Optimal solution of the instance mini_2 CourseNana.COM

5) Detailed work plan, output format and deadlines CourseNana.COM

The project has to be realized by a team of at most 5 students. You have to : CourseNana.COM

  • Propose a model of the problem. You have to hand in your mathematical model before April 28th 23:59 (Beijing time). You may propose a different formulation than the one that is suggested. In case of a quadratic model, its linearization is asked. A correction will be presented during the session of April 29th (therefore no delay can be accepted for the model). CourseNana.COM

  • Write the (linear) model in Julia/JuMP and solve the instances with the solver Cbc. You may limit the exact solution by the solver to 5 minutes. If the optimal solution cannot be found within 5 minutes, you will have to indicate it in your final report. CourseNana.COM

  • Determine a good solution of the problem, not necessarily the optimal solution, using a heuristic or a metaheuristic. You may either invent an algorithm to find a solution of the problem, as good as possible (without using the solver), or use a metaheuristic such as the simulated annealing. This will probably be the only way to solve the larger instances. CourseNana.COM

  • Determine lower bounds of the imbalance. You will have to modify your model written for the exact solution in order to compute the continuous relaxation of the problem. The lower bound provided by the continuous relaxation will be usefull to evaluate the quality of your heuristic method. CourseNana.COM

  • Write a report indicating the obtained results. You have to hand in your report not later than the day of the oral defense of your project (June 3rd). This report must contain : CourseNana.COM

o the code of your programs (in appendix)
o an explanation of the idea of your heuristic method,
o theILPmodels,
o a presentation of the numerical results obtained on the instances mentioned in CourseNana.COM

section 3. For this presentation, complete as far as you can the following table. You CourseNana.COM

CourseNana.COM

TSDP2 Y ear Team Software Design Project 2023/2024 CourseNana.COM

may eventually add some other informations if you think they are relevant. You may present the results in several tables for a greater readibility. CourseNana.COM

The last column of the table indicates the name out the output file that you create (and join) when the optimal solution will be obtained in less than 5 minutes. This output file must respect the following syntax. Each line beginnig with a ‘#’ will be a comment, then, in order, a line beginning with the keyword namemust indicate the name of the instance, a line beginning with imbalancewill indicate the global imbalance, a line beginning with distancewill indicate the total distance traveled, a line beginning with init_loadwill indicate the initial content of the trailer at the beginning of the tour, then a line will contain the keyword stations. After that, in the order of the optimal tour found, you will write a line per station visited, by indicating its identifier, the number of bikes dropped (positive value) or removed (negative value). The file ends with a line containing the keyword end: CourseNana.COM

         name mini_2
         imbalance 3
         distance 259
         init_load 2
         stations

42 3 -2 50 10 22 end CourseNana.COM

Important dates : CourseNana.COM

file mini_2.sol CourseNana.COM

  • April 16th : description of the project CourseNana.COM

  • April 17th, 23 :59 : hand in your mathematical model of the problem. A corrected model will be CourseNana.COM

    presented during the session of April 18th. CourseNana.COM

  • May, 18th 2024 23:59 : hand in your final report CourseNana.COM

  • An oral defense of your team project will be scheduled after this date.  CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
CNAM代写,TSDP2代写,Team Software Design Project代写,Julia代写,SSB代写,CNAM代编,TSDP2代编,Team Software Design Project代编,Julia代编,SSB代编,CNAM代考,TSDP2代考,Team Software Design Project代考,Julia代考,SSB代考,CNAMhelp,TSDP2help,Team Software Design Projecthelp,Juliahelp,SSBhelp,CNAM作业代写,TSDP2作业代写,Team Software Design Project作业代写,Julia作业代写,SSB作业代写,CNAM编程代写,TSDP2编程代写,Team Software Design Project编程代写,Julia编程代写,SSB编程代写,CNAMprogramming help,TSDP2programming help,Team Software Design Projectprogramming help,Juliaprogramming help,SSBprogramming help,CNAMassignment help,TSDP2assignment help,Team Software Design Projectassignment help,Juliaassignment help,SSBassignment help,CNAMsolution,TSDP2solution,Team Software Design Projectsolution,Juliasolution,SSBsolution,