How to add (soft?) constraints to the model?

You can find more information in the stan manual: http://mc-stan.org/users/documentation/. See part 47. In brief it allows you to put down the system of equation in your model as constrain without specifically work out how to express the solution.