Magnetic resonance imaging systems are sensitive to heating: hot spots can lead to a degradation of the image quality and system failure. Gradient coils are required to produce highly uniform and fast switching magnetic fields in order to spatially encode samples within a volume. When optimizing for heating and power loss there is a tradeoff for ideal magnetic performance. This paper investigates an automatic design procedure for gradient coil cooling systems which allows a strict relation between gradient coil design, performed through different criteria power and energy oriented, and its optimal cooling layout. Power and energy optimized split gradient coils are both cooled using an optimized layout based on a Dijkstra's algorithm approach. Both systems see a large reduction in temperature values allowing the magnetically optimized coil to be used despite its increased power loss. This method can help ensure gradient coils can be optimized primarily for magnetic performance while keeping excess heating under control.