[ADMB Users] Circumventing a type mismatch
Steve Martell
martell.steve at gmail.com
Wed Dec 7 10:09:14 PST 2011
Mark,
Based on the definitions of the variables you have defined in the DATA_SECTION and PARAMETER_SECTIONS, it appears that your trying to overwrite data-type variables with values from the differentiable variables. I would try in the PRELIMINARY_CALCS_SECTION or procedure section:
now_values=value(par_values);
the value function will allow you to overwirte a Data type variable with the values from the dvar_matrix.
Steve
On 2011-12-07, at 9:37 AM, Fowler, Mark wrote:
> I'm looking for a convenient way to bypass a type mismatch in data objects. I know go-arounds for this but they require lots of typing, I'm hoping for a simple translation syntax solution, or maybe a format definition I haven't come across.
>
> Example
>
> Define a matrix in the DATA_SECTION
>
> matrix now_values(1,n_values,1,2)
>
> Define another matrix in the PARAMETER_SECTION (so type dvar)
>
> matrix par_values(1,n_values,1,2)
>
> Capture or create values of par_values in PRELIMINARY_CALCS_SECTION. Something like
>
> now_values=justgimmethecurrentnumbers(par_values);
>
> Or
>
> par_values=dvarwannabe(now_values);
>
> Seeking a simple way to keep track of associated initial and fitted values in outputs, or alternatively pass computed initial values from a suite of choices to a parameter object. Inspired by hordes of ogives.
>
> Mark Fowler
> Population Ecology Division
> Bedford Inst of Oceanography
> Dept Fisheries & Oceans
> Dartmouth NS Canada
> B2Y 4A2
> Tel. (902) 426-3529
> Fax (902) 426-9710
> Email Mark.Fowler at dfo-mpo.gc.ca
> Home Tel. (902) 461-0708
> Home Email mark.fowler at ns.sympatico.ca
>
>
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20111207/0c40040d/attachment.html>
More information about the Users
mailing list