Adapt python scripts to AMPL output (work in progress)