This study takes into consideration a problem that commonly occurs at the design stage of underground cable lines and that relates to the manner of determining the optimal values for dimensions of cable trench and bedding, interaxial spacings between power cables in flat formation and cable ampacities. The problem is formulated as a non-linear optimisation problem with constraints. The gravitational search algorithm, simulated annealing algorithm and generalised pattern search algorithm are used to solve the problem. The optimal solutions are obtained based on the following three optimisation criteria: (i) minimisation of the total installation costs, i.e. the total costs for producing the cable trench, laying the bedding material, laying the backfill material and installing the cables, (ii) maximisation of the cable ampacity and (iii) a simultaneous application of the minimisation of the total installation costs and the maximisation of the cable ampacity. The constraints on design and control variables are introduced through penalty factors by means of which the objective function is expanded. The procedure is conducted taking into account the effect of drying out of the soil surrounding the cables.