Simplex revised method implemented in Python