I have a simple Modelica model calls an external function (C code via ExternalObject) that (nonlinearly) interpolates properties over the space s1, s2, s3 where s are all bound between 0 and 1. The model needs to invert/solve f1 = f1(s1,s2,s3), f2 = f2(s1,s2,s3), f3 = f3(s1,s2,s3) to find the initial s given known f. Unfortunately, the OpenModelica nonlinear solvers attempt to evaluate f using out of bounds s, despite defining s1,s2,s3 as:
Real s1(min = 0.0, max = 1.0, start = 0.5, nominal = 0.01);
Real s2(min = 0.0, max = 1.0, start = 0.5, nominal = 0.01);
Real s3(min = 0.0, max = 1.0, start = 0.5, nominal = 0.01);
As far as I can tell, there is no way of dealing with this other than to pull the inversion into the external C object. Have I missed something?