def RemoveRedundantPaths(childrenList, nodeList, partialCostTable):
	"""
		RemoveRedundantPaths:   It removes the Redundant Paths. They are not optimal solution!
								If a node is visited and have a lower g in this moment, TCP is updated.
								In case of having a higher value, we should remove this child.
								If a node is not yet visited, we should include to the TCP.
		:params
				- childrenList: LIST of NODES, set of childs that should be studied if they contain rendundant path
								or not.
				- nodeList : LIST of NODES to be visited
				- partialCostTable: DICTIONARY of the minimum g to get each key (station id) from the origin Node
		:returns
				- childrenList: LIST of NODES, set of childs without rendundant path.
				- nodeList: LIST of NODES to be visited updated (without redundant paths)
				- partialCostTable: DICTIONARY of the minimum g to get each key (station id) from the origin Node (updated)
	"""
	def gen_parents(node):
		while node:
			yield node
			node = node.father
	newChildrenList=[]
	for child in childrenList:
		if child.station.id in partialCostTable and child.g<partialCostTable[child.station.id]:
			partialCostTable[child.station.id]=child.g
			nodeList=list(filter(lambda x: child.station.id not in [y.station.id for y in gen_parents(x)], nodeList))
		elif child.station.id in partialCostTable and child.g>partialCostTable[child.station.id]:
			continue
		elif child.station.id not in partialCostTable:
			partialCostTable[child.station.id]=child.g
		newChildrenList.append(child)
	return newChildrenList, nodeList, partialCostTable