Signal setting with demand assignment: global optimization with day-to-day dynamic stability constraints