diff options
| author | Dayana31 <[email protected]> | 2022-04-11 01:55:25 -0500 |
|---|---|---|
| committer | Dayana31 <[email protected]> | 2022-04-11 01:55:25 -0500 |
| commit | b84975e11b70045c2eaa9e1981da1478513bf51f (patch) | |
| tree | 16d653dfd22baac03e81f5471b01b6b6aa614afb /VRP/src/Algoritmo/VRP.java | |
| parent | f990de080acbd103d287b274e33b18ff220dd702 (diff) | |
| download | DP1_project-b84975e11b70045c2eaa9e1981da1478513bf51f.tar.gz DP1_project-b84975e11b70045c2eaa9e1981da1478513bf51f.tar.bz2 DP1_project-b84975e11b70045c2eaa9e1981da1478513bf51f.zip | |
Clases para algoritmo en Java
Diffstat (limited to 'VRP/src/Algoritmo/VRP.java')
| -rw-r--r-- | VRP/src/Algoritmo/VRP.java | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/VRP/src/Algoritmo/VRP.java b/VRP/src/Algoritmo/VRP.java new file mode 100644 index 0000000..b1423b9 --- /dev/null +++ b/VRP/src/Algoritmo/VRP.java @@ -0,0 +1,57 @@ + +package Algoritmo; + +/** + * + * @author DAYANA + */ + + +public class VRP { + + + public static void genetic_algorithm(int max_iter){ + //generar poblacion inicial aleatoria + PlanTransporte poblacion[] = new PlanTransporte[200]; + PlanTransporte nueva_generacion[] = new PlanTransporte[200]; + + poblacion = init_population(); + + //evaluar fitness de la poblacion + evaluar(poblacion); + + for(int i=1;i<max_iter;i++){ + nueva_generacion = generar_nueva_generacion(poblacion); + //aplicar operadores geneticos a la nueva generacion + poblacion = survive(poblacion, nueva_generacion); + } + + } + + private static Tramo[] generar_nueva_generacion(Tramo[] poblacion) { + return null; + } + + private static Tramo[] survive(Tramo[] poblacion, Tramo[] nueva_generacion) { + return null; + } + + public static Tramo[] init_population(){ + + + for(int i=1;i<10;i++){ + + } + + return null; + } + + public static void evaluar(Tramo[] poblacion){ + + + } + + public static void init_data() { + + } +} |
