ding0.grid.mv_grid.util package¶
Submodules¶
ding0.grid.mv_grid.util.data_input module¶
Based on code by Romulo Oliveira copyright (C) 2015, https://github.com/RomuloOliveira/monte-carlo-cvrp Originally licensed under the Apache License, Version 2.0. You may obtain a copy of the license at http://www.apache.org/licenses/LICENSE-2.0
-
exception
ding0.grid.mv_grid.util.data_input.
ParseException
(value)[source]¶ Bases:
Exception
Exception raised when something unexpected occurs in a TSPLIB file parsing
Parameters: value (type) – Description
-
ding0.grid.mv_grid.util.data_input.
calculate_euc_distance
(a, b)[source]¶ Calculates Eclidian distances from two points a and b
Parameters: Returns: float – the distance.
-
ding0.grid.mv_grid.util.data_input.
read_file
(filename)[source]¶ Reads a TSPLIB file and returns the problem data.
Parameters: filename ( str
) –Returns: type – Problem specs.
ding0.grid.mv_grid.util.util module¶
Based on code by Romulo Oliveira copyright (C) 2015, https://github.com/RomuloOliveira/monte-carlo-cvrp Originally licensed under the Apache License, Version 2.0. You may obtain a copy of the license at http://www.apache.org/licenses/LICENSE-2.0
-
ding0.grid.mv_grid.util.util.
print_solution
(solution)[source]¶ Prints a solution
Parameters: solution (BaseSolution) – Example
[8, 9, 10, 7]: 160 [5, 6]: 131 [3, 4, 2]: 154 Total cost: 445