Agent-based Dynamic Optimization of Fiscal Systems