Small script for convex optimization of OBD