A discrete formulation of minimum cost design of framed structures