Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only two routes? #1

Open
olushako opened this issue Mar 21, 2018 · 3 comments
Open

Only two routes? #1

olushako opened this issue Mar 21, 2018 · 3 comments

Comments

@olushako
Copy link

I am trying to test the model with more trucks with limited capacity, but the model continuously separating optimization for two parts: truck1 and rest. Can we somehow generate more routes for more trucks?

@fermenreq
Copy link
Owner

Hi @olushako,

VRP algorithm generates routes that should be adjusted to the available fleet of trucks in order to get minimum costs. I set up the VRP algorithm in order to generates two routes only:

L325

def VRP(k):
    VRP_PROBLEM = Problem_Genetic([(0,10),(1,10),(2,10),(3,10),(4,10),(5,10),(6,10),(7,10),
                                   (trucks[0],capacity_trucks)],
len(cities), lambda x : decodeVRP(x), lambda y: fitnessVRP(y))

So you can set up the environments here:

capacity_trucks = 60
trucks = ['truck','truck']
num_trucks = len(trucks)
frontier = "---------"

@olushako
Copy link
Author

olushako commented Mar 21, 2018

thanks Fernando for your reply. I have added additional 4 trucks (like example), but still this is dividing it only for two routes... until and after frontier.. maybe because of trucks[0]...

or do you mean to to execute VRP_PROBLEM for all trucks? but it will not balanced in the system and synchronized...

@fermenreq
Copy link
Owner

Hi @olushako ,

Yes , you are on right. If you want you could improve the code adding new functionality, as you comment. For that, I just created a new branch develop.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants