Curve fitting -- including convexity constraint

I think that paper is behind a paywall. I could not read it. Thus in the following I may say something stupid.

How is Z′′>0∀s ensured in the code? That’s the criteria for convexity, if I’m not wrong.
That could be addressed by reformulation to a Lagrange - Multiplier problem and
the keyword I read somewhere else is bordered hessian matrix.

If this problem could not be solved easily maybe the algebra solver may a help for.

Updated. I think you can do it with: