An optimization tool for the assessment of urban energy scenarios