Coder Social home page Coder Social logo

luismescobarf / csp-prins-ts Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 3.32 MB

Tabu Search algorithm for the Crew Scheduling Problem, using a modified Prins encoding.

License: GNU General Public License v3.0

Python 100.00%
operations-research python3 crew-scheduling-problem metaheuristic-optimisation

csp-prins-ts's Introduction

csp-prins-ts

Tabu search algorithm for the Crew Scheduling Problem, using a modified Prins encoding.

csp-prins-ts's People

Contributors

kennycp06 avatar luismescobarf avatar

Stargazers

 avatar  avatar

Watchers

 avatar

csp-prins-ts's Issues

Codificación Prins Adaptada

Integrar la generación de los itinerarios filtrados por factibilidad, construcción del digrafo y función de shortest path.

Bellman-Ford Shortest Path

Modulito (archivo.py) que resolverá el shortest-path con un formato similar al que se utilizó en MATLAB. A continuación contextualización proveída por @kennycp06

Creación de Nodos

function [FuncionObj, Rutas] = Traduccion(vector, D, contenedor, Vehiculos);
%Lista de nodos productores
m = [];
n = [];
w = [];
%Recorrer el contenedor
for i = 1:length(contenedor)
viaje = contenedor(i).Ruta;%Guardar e viaje
nviaje = length(contenedor(i).Ruta);
LonViaje = nviaje-2;
%Guardar nodos productores
posReceptor = find(vector == viaje(nviaje-1));
if (posReceptor-LonViaje) > 0
%Guardar nodos productor
m = [m vector(posReceptor-LonViaje)];
%Guardar nodos receptor
n = [n vector(posReceptor)];
%Guardar el peso
w = [w D(m(i),n(i))];
else
%Guardar nodos productor
m = [m viaje(1)];
%Guardar nodos receptor
n = [n vector(posReceptor)];
%Guardar el peso
w = [w D(m(i),n(i))];
end
end
[FuncionObj,Rutas] = BellFordMan(vector, D, w,m,n,Vehiculos);
end

Generación del Grafo (Input de este componente)

function [FOBJ, PathO] = BellFordMan(vector, D, w,m,n,Vehiculos)

N=length(vector); %Numero de nodos
s=N+1; % Deposito
e_num= length(m);%Numero de aristas
%names={'1','2','3','4','5','6'};
GPrins=digraph(m,n,w); %Digrafo de cobertura de Prins

esqueletoTabuSearch

Esquema de la metaheurística. @kennycp06, hagamos todo modular, este esqueleto importará de archivos externos la codificación y sus componentes, el lector de instancias y demás funcionalidades para facilitar la integración.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.