Dave-<div><br></div><div>Thank you very much for your work on this.  With your example as a template I was able to get my tpl to compile and run. I 've not yet verified it with simulated data and the example I've run is not pos def.  I do get the following warnings at the compile stage that point to the location at which trapzd returns the value.  I wasn't certain if that was related to your comment about removing lines in the htp file.  I wasn't certain what to remove. I had to remove the dvariable_funnel function because it wouldn't compile.  All of my files can be found at </div>
<div><a href="https://github.com/jlaake/ADMB-Examples/tree/master/Random%20Effect%20Line%20Transect">https://github.com/jlaake/ADMB-Examples/tree/master/Random%20Effect%20Line%20Transect</a><br></div><div><br></div><div>Note that it is not written generally yet for more than one random effect parameter. My next step will be to write this as a separable function so it runs more quickly.</div>
<div><br></div><div>regards--jeff</div><div><br></div><div><div>distcovre.cpp: In member function 'dvariable model_parameters::trapzd(double, double, int, const dvariable&)':</div><div>distcovre.cpp:129:35: warning: passing 'const dvariable' as 'this' argument of 'dvariable& dvariable::operator=(const prevariable&)' discards qualifiers [-fpermissive]</div>
<div>distcovre.cpp:136:36: warning: passing 'const dvariable' as 'this' argument of 'dvariable& dvariable::operator=(const prevariable&)' discards qualifiers [-fpermissive]</div><div>distcovre.cpp: In member function 'df1b2variable df1b2_parameters::trapzd(double, double, int, const df1b2variable&)':</div>
<div>distcovre.cpp:284:35: warning: passing 'const df1b2variable' as 'this' argument of 'df1b2variable& df1b2variable::operator=(const df1b2variable&)' discards qualifiers [-fpermissive]</div>
<div>distcovre.cpp:291:36: warning: passing 'const df1b2variable' as 'this' argument of 'df1b2variable& df1b2variable::operator=(const df1b2variable&)' discards qualifiers [-fpermissive]</div>
</div><div><br></div><div><br></div><div><br></div>