Thank you! I had looked at the example (the code, not the actual book). I will have a look at the book-chapter as well and see if I can get some inspiration from there. My problem (I describe it in detail in an answer to @cvanaret) is a bit more involved - but maybe it can be reduced to a minimum ellipse problem.
And I tried JuMP and found it to be a bit unintuitive for me. I like working with the code for the actual computation - probably due to my lack of experience with symbolic programming.