func generateCandidateTypeA(current_solution Candidate) (c Candidate, swapped_node int) {
	neighbor := Candidate{}

	neighbor.Solution = make([]int, len(current_solution.Solution))
	neighbor.Hubs = make([]int, len(current_solution.Hubs))
	copy(neighbor.Solution, current_solution.Solution)
	copy(neighbor.Hubs, current_solution.Hubs)

	random_node, _ := selectRandomNodeAndHub(neighbor)

	hub_to_switch := neighbor.Solution[random_node]

	for i, hub := range neighbor.Solution {
		if hub == hub_to_switch {
			neighbor.Solution[i] = random_node
		}
	}

	for i, hub := range neighbor.Hubs {
		if hub == hub_to_switch {
			neighbor.Hubs[i] = random_node
		}
	}

	return neighbor, random_node
}
// swap a node with its hub
swap a node with its hub
// swap a node with its hub
func generateCandidateTypeA(current_solution Candidate) (c Candidate, swapped_node int) {
	neighbor := Candidate{}
	neighbor.Solution = make([]int, len(current_solution.Solution))
	neighbor.Hubs = make([]int, len(current_solution.Hubs))
	copy(neighbor.Solution, current_solution.Solution)
	copy(neighbor.Hubs, current_solution.Hubs)
	random_node, _ := selectRandomNodeAndHub(neighbor)
	hub_to_switch := neighbor.Solution[random_node]
	for i, hub := range neighbor.Solution {
		if hub == hub_to_switch {
			neighbor.Solution[i] = random_node
		}
	}
	for i, hub := range neighbor.Hubs {
		if hub == hub_to_switch {
			neighbor.Hubs[i] = random_node
		}
	}
	return neighbor, random_node
}
func generateCandidateTypeA ( current_solution Candidate ) ( c Candidate , swapped_node int ) { neighbor := Candidate { } neighbor . Solution = make ( [ ] int , len ( current_solution . Solution ) ) neighbor . Hubs = make ( [ ] int , len ( current_solution . Hubs ) ) copy ( neighbor . Solution , current_solution . Solution ) copy ( neighbor . Hubs , current_solution . Hubs ) random_node , _ := selectRandomNodeAndHub ( neighbor ) hub_to_switch := neighbor . Solution [ random_node ] for i , hub := range neighbor . Solution { if hub == hub_to_switch { neighbor . Solution [ i ] = random_node } } for i , hub := range neighbor . Hubs { if hub == hub_to_switch { neighbor . Hubs [ i ] = random_node } } return neighbor , random_node }
swap a node with its hub
swap a node with its hub