Given weighted edges, how would you optimize for a path that satisfies multiple conditional requirements?