adbuerger / casiopeia

Casadi Interface for Optimum experimental design and Parameter Estimation and Identification Applications
GNU Lesser General Public License v3.0
34 stars 6 forks source link

Error while running the lotka_volterra_pe.py example #22

Closed ankur-gupta closed 7 years ago

ankur-gupta commented 7 years ago

Hi, I used to be able to run the lotka_volterra_pe.py example but it seems to throw this error now:

and where phi is defined by
y[0] = x[0]
y[1] = x[1]
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
/home/ankur/toolbox/numerical-software-examples/examples/casiopeia/example.py in <module>()
     62
     63 pe = cp.pe.LSq(system = system, time_points = T, xinit = yN, \
---> 64     ydata = yN, wv = wv, discretization_method = "collocation")
     65
     66 pe.run_parameter_estimation()

...
...
...

NotImplementedError: Wrong number or type of arguments for overloaded function 'Function_map'.
  Possible prototypes are:
    map(self,int,str)
    map(self,str,str,int,[int],[int],dict)
    map(self,str,str,int,[str],[str],dict)
  You have: '(Function,[DM|np.array(float)|MX])'

I am running casiopeia 0.2.0 and casadi version 3.2.0 on a Ubuntu 17.04. I would be grateful if you could take a look and help me.

adbuerger commented 7 years ago

Hi again! I did not yet find the time to get casiopeia working with CasADi 3.2.0, for the moment you would need to use CasADi 3.1.0 to make it work. Does that solve your problem?

ankur-gupta commented 7 years ago

Thanks, I tested it out with casadi 3.1.1 and that worked! Perhaps the interface changed in casadi v3.2.3.