A mathematical programming solution to the Mars Express memory dumping problem