[ADMB Users] Matrix functions for ADMB-RE

dave fournier davef at otter-rsch.com
Mon Jun 30 17:56:34 PDT 2014


On 06/30/2014 05:24 PM, Johnoel Ancheta wrote:

Hi Johnoel,

It is one of those stupid design decisions I made on the fly a long time 
ago.

The problem is with the variable sign.  It is only there to check that 
the determinant is
positive.  So it only needs to be an int all cases (probably). Something 
like

dvar_vector solve(const dvar_matrix & aa, const dvar_vector & z,
                   prevariable & ln_unsigned_det, int & sign);

dvector solve(const dmatrix & aa, const dvector & z,
               const double &ln_unsigned_det, int &sign);


df1b2vector solve(const df1b2matrix & aa, const df1b2vector & z,
                   df1b2variable & ln_unsigned_det, int & sign);


But over time a whole bunch of these things may have proliferated.

      Dave















> Sorry, it took awhile, but I finally understood it was just needed the 
> function.  It has been
> added and committed to the source repository (see Revision 2152 
> <http://www.admb-project.org/redmine/projects/issues/repository/revisions/2152>). 
>
>
> To use the most current version, read the INSTALL 
> <http://www.admb-project.org/buildbot/documentation/INSTALL.html> 
> procedure.
> Remove the GLOBALS_SECTION, the rebuild.
>
> Let me know,
> Johnoel
>
>
> On Sun, Jun 29, 2014 at 10:41 PM, Stirrup, Oliver 
> <oliver.stirrup.13 at ucl.ac.uk <mailto:oliver.stirrup.13 at ucl.ac.uk>> wrote:
>
>     Hello again Dave
>
>     I've now succeeded in compiling and running the example by adding
>     the function that you provided to the GLOBALS_SECTION as you
>     suggest. This should allow me to move forward in terms of the
>     modelling that I am trying to achieve, for which I have found no
>     solution other than ADMB, so thank you very much for your help!
>
>     Best wishes
>
>     Oliver
>
>     Oliver Stirrup
>     PhD Student
>
>     MRC Clinical Trials Unit at UCL
>     Institute of Clinical Trials & Methodology
>     e-mail: oliver.stirrup.13 at ucl.ac.uk
>     <mailto:oliver.stirrup.13 at ucl.ac.uk>
>
>     -----Original Message-----
>     From: dave fournier [mailto:davef at otter-rsch.com
>     <mailto:davef at otter-rsch.com>]
>     Sent: 27 June 2014 22:41
>     To: Stirrup, Oliver; users at admb-project.org
>     <mailto:users at admb-project.org>
>     Subject: Re: [ADMB Users] Matrix functions for ADMB-RE
>
>     On 06/27/2014 02:14 PM, Stirrup, Oliver wrote:
>
>     It compiles OK for me.  However I have long since forgotten the
>     details.  Maybe you are missing the attached function,
>     f1b2sol2.cpp.  can you cimple and link that in with your program?
>
>     Or you can add the guts of it to your tpl file in the GLOBALS_SECTION.
>
>           Dave
>
>
>
>     > Thanks for getting back to me again, Dave. I have made the
>     amendment to the TPL file that you suggest, but still haven't
>     quite got this working. Compilation seems to progress to a later
>     stage than previously, but I am ending up with the following error
>     message:
>     > <<<
>     >
>     > *** adcomp -r orange
>     > g++ -c -O3 -Wno-deprecated -D__GNUDOS__ -Dlinux -DOPT_LIB
>     > g++ -DUSE_LAPLACE -fpermissive -I.
>     > g++ -I"c:/ADMB/admb101-gcc452-win64\include" -o orange.obj
>     orange.cpp
>     >
>     > *** adlink -r orange
>     > g++ -s -static -L"c:/ADMB/admb101-gcc452-win64\lib" orange.obj
>     > g++ -ldf1b2o -ladmod -ladt -lado -ldf1b2o -ladmod -ladt -lado -o
>     > g++ orange
>     > orange.obj:orange.cpp:(.text+0xeb3): undefined reference to
>     `solve(df1b2matrix const&, df1b2vector const&, df1b2variable
>     const&, double&)'
>     > orange.obj:orange.cpp:(.text+0x3fe5): undefined reference to
>     `solve(df1b2matrix const&, df1b2vector const&, df1b2variable
>     const&, double&)'
>     > collect2: ld returned 1 exit status
>     >
>     > Error: could not create orange.exe
>     >
>     > Oliver
>     > ________________________________________
>     > From: dave fournier <davef at otter-rsch.com
>     <mailto:davef at otter-rsch.com>>
>     > Sent: 27 June 2014 17:46
>     > To: users at admb-project.org <mailto:users at admb-project.org>;
>     Stirrup, Oliver
>     > Subject: Re: [ADMB Users] Matrix functions for ADMB-RE
>     >
>     > Line 75 in your tpl file should be
>     >
>     >
>     >
>     >       dvar_vector tmp=solve(Vi,res,ld,sgn);
>     >
>     >
>     > Sorry this is so finicky.  Maybe eventually  we will get past pretty
>     > printing documentation and just fix stuff.
>     >
>     >        Dave
>     >
>
>     _______________________________________________
>     Users mailing list
>     Users at admb-project.org <mailto:Users at admb-project.org>
>     http://lists.admb-project.org/mailman/listinfo/users
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20140630/66b8f460/attachment.html>


More information about the Users mailing list