I recently compiled a tpl using an older version of ADMB for which the betai function worked (not sure which version it was). I then tried to compile it USing 10.0 and received and error. I included the fvar.hpp header in the globals section, and still received the following error. <br>
<br>Error E2268 anchoveta.cpp 74: Call to undefined function 'betai' in function model_data::model_data(int,char * *)<br clear="all"><br><br>Here is the beginning of the code with data types and function call. I left out the loop increments, as clearly I have missed something having to do with the function call or globals section. I looked at the betai function in the fvar header file and I am unable to determine why my function call is not working.<br>
<br>Thanks,<br>Brandon<br><br><br>GLOBALS_SECTION<br> #include <admodel.h><br> #include <math.h><br> #include <fvar.hpp><br> #include <stdio.h><br> #include <stddef.h><br> #include <stdlib.h><br>
#define PI 3.141592654<br> #include <iostream><br> #include <iomanip> <br><br><br> ofstream pars("pars.out");<br><br>DATA_SECTION<br> init_number Ch; //size of the MPA<br> init_number ChMPA;//size of the MPA<br>
init_number PeMPA;//size of the MPA<br> init_number Pe; //size of the MPA<br> init_number priH; //h prior to MPA<br> init_number adA; //adult alpha<br> init_number adB; //adult beta<br> init_number rcA; //recruitment alpha<br>
init_number rcB; //recruitment beta<br><br> LOCAL_CALCS<br> Rs(1,y) = betai(rcA, rcB, Ch); //Chile<br> Rs(2,y) = betai(rcA, rcB, Ch + ChMPA) - <br> betai(rcA, rcB, Ch); //Chile MPA <br>
Rs(3,y) = betai(rcA, rcB, Ch + ChMPA + PeMPA) - <br> betai(rcA, rcB, Ch + ChMPA); //Peru MPA <br> Rs(4,y) = 1 - betai(rcA, rcB, Ch + ChMPA + PeMPA);<br> //Peru<br>
<br>-- <br><br><br>Brandon Chasco<br>University of California Santa Barbara, Bren School<br><br>