Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In an older Sage (5.6) I get the following very nasty traceback.

capi_return is NULL
Call-back cb_calcfc_in__cobyla__user__routines failed.
Traceback (most recent call last):
<snip>
TypeError: Error executing code in Maxima
CODE:
    batchload("/home/sageuser/.sage/temp/sage/9875/interface/tmp9882-1415464813");1+1531812931;
Maxima ERROR:
kill(sage8)$batchload("/home/sageuser/.sage/temp/sage/9875/interface/tmp9882-1415464813");1+1531812931;
Expecting a number when the initial state is replaced in the equations, but instead found: 

 -44.46235161288734/(-1)^0.5

#0:
rk(odes=-sqrt(36881329/400-92425547*r^2/101387157)*(36506*r^2-2499558239)/(36506*sqrt(92425547*r^2*(36506*r^...,state=dummy_dvar,initial=0,domain=[r,303.619635,240.675997139,-0.0209913342871])(dynamics.mac line 392)
 -- an error. To debug this try: debugmode(true);
(%o68)

Now, what this all says to me is the following: Maxima is trying to solve a differential equation in order to get in the constrained minimize function. But apparently f is rather more complicated than your previous uses of find_tire_width. In particular, it looks like somehow in your initial value for one of the things it is trying while minimizing gives a complex number as an initial value! -44.46235161288734/(-1)^0.5

But to try to debug this properly would require someone who really understood your specific situation, as this is a pretty complicated numerical setup. My uninformed guess is that one of your inputs is really close to some badly behaved point in your DE, but I am not at all a numerical analyst so I won't hazard anything more specific than that.

As I point out in the comment, if you can turn this into something simpler that has the same problem, that would help. There is a lot of extraneous stuff, especially the interact; why not just plug in very specific numbers and see if you can get the same problem?