This paper presents a method for configuring the locations of any number of cables, for the best total ampacity. The optimal configuration is determined through a proposed two-level optimization algorithm. At the outer level, a combinatorial optimization based on a genetic algorithm explores the different possible configurations. The performance of every configuration is evaluated according to its total ampacity, which is calculated by using a convex optimization algorithm. The convex optimization algorithm, which forms the inner level of the overall optimization procedure, is based on the barrier method. The proposed approach is tested for a duct bank installation containing 12 cables and 15 ducts, comprising two circuits and two cables per phase, and compared with a brute force method of considering all possible configurations. The proposed approach is also applied to an installation consisting of a single circuit inside a large magnetic steel casing.