Coding a Flower Route Optimization problem on Matlab, need help, resources and input
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello everyone,
I am currently working on a project that involves optimizing transportation routes for a flower delivery company. The goal is to maintain the quality of perishable goods through a cold chain and improve the efficiency of the delivery routes.
I have developed a mathematical model with an objective function that minimizes the total cost, including travel cost, fixed truck cost, and penalties for early and late deliveries. The model also accounts for the vase life of flowers based on delivery times and temperatures.
Here are the key variables and constraints of my model:
- Decision Variables:
- xijk: binary, 1 if truck k goes from location i to j, 0 otherwise
- yk: binary, 1 if truck k is used, 0 otherwise
- qj, ej, lj: binary, indicating if location j is serviced on time, early, or late, respectively
- aj: arrival time at location j
- Other relevant variables include distances Sij, types of flowers F, truck capacities Bk, costs Cijk, and vase life coefficients Af, Bf
- Constraints:
- Limiting the number of trucks by customer locations
- Ensuring each truck does not exceed its capacity
- Servicing each customer node only once
- Time windows for delivery at each location
The optimization model is supposed to run in MATLAB, and I aim to compare the solutions from a heuristic Genetic Algorithm (GA) with an exact solution obtained from GAMS.
I need help with the following:
- Formulating the fitness function in MATLAB that adheres to the outlined objective function and constraints.
- Developing the genetic algorithm in MATLAB, including initializing populations, selection, crossover, and mutation functions that respect the problem constraints.
- Integrating penalty functions for constraint violations within the GA framework.
- Handling input and output data through Excel, since the GA parameters and results need to be easily accessible and modifiable by non-programmers.
I am new to MATLAB and would greatly appreciate any guidance, code snippets, or resources that you can share to assist me in developing this genetic algorithm.
Thank you in advance for your help!
3 comentarios
Umang Pandey
el 19 de Ag. de 2024
Hi Shahd,
You can refer to the MATLAB Onramp training to get familiarity with the language and its constructs :
For the optimization problem, you can refer to the following MATLAB example for understanding how are objective functions and constraints formulated, how are various GA parameters set and how are inputs and oututs handled:
Hope this helps!
Respuestas (0)
Ver también
Categorías
Más información sobre Genetic Algorithm en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!