rohams / capstone

Capstone project
0 stars 0 forks source link

fitness value #12

Closed rohams closed 10 years ago

rohams commented 10 years ago

Write up of the fitness value:

fitness value = off_routing_rate * off_routing_distance + total distance

off_routing_distance() function:

If truck x is visiting: s1, s5, s9, s7, s2 off-routing distance for truck x is: (dc, s1, s5, s9, s7, s2) - (dc , s2) the output of off_routing_distance() function is the off-routing distances of all the trucks.

shzq commented 10 years ago

How do I know which truck goes what route?

rohams commented 10 years ago

use the breaks array for that. if the breaks array is: 2,5 that means the fist truck serves up to index 2 of the routes array and the second truck up to index 5, and the last truck from index 6 to end.

shzq commented 10 years ago

So off_routing_distance() should take routes and brks as the parameters? off_routing_rate and off_routing_distance is to come from global variable?

rohams commented 10 years ago

yes!

shzq commented 10 years ago

I've committed the code. What I see is it's just basically like the totalDist() function with the additional calculation of off_routing_distance