16.24 A system consists of two power plants that must deliver loads over a transmission network. The costs of generating power at plants 1 and 2 are given by
$F_1 = 2p_1 + 2$
$F_2 = 10p_2$
where $p_1$ and $p_2$ = power produced by each plant. The losses of power due to transmission $L$ are given by
$L_1 = 0.2p_1 + 0.1p_2$
$L_2 = 0.2p_1 + 0.5p_2$
The total demand for power is 30 and $p_1$ must not exceed 42. Determine the power generation needed to meet demands while minimizing cost using an optimization routine such as those found in, for example, Excel, MATLAB, or Mathcad software.