Stav dette: Modeling, computation and optimization