I think I solved the modulus problem:

introduce contraints:

|20x2 - 10| < a

20x2 - 10 < a

-20x2 - 10 < a

therefore

min 10x1 + a + max{...

s.t. old constraints +

20x2 - 10 - a < 0

-20x2 - 10 - a < 0

anybody know if this is correct?

Also, is it perhaps acceptable to do something like this for the max{},

let b = max{5,x1}

and add constraints

b > 5

b > x1