Created
December 4, 2014 14:05
-
-
Save felixlindemann/48ffb43e50790d89b3f7 to your computer and use it in GitHub Desktop.
Calculate the fitnes of the rout: number of stops in a genetic algorithm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getNumberOfStops <- function(tour){ | |
# wieviele Stops führen zum Depot zurück? | |
n <- which(tour==1) # 1=depot | |
return (length(n)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment