<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
1) The idea is to ask the user for an arithmetic starting value
which is used to initialize a log scale parameter (unbeknownst to
the user who does not think in logs).<br>
<br>
2) I have a vector of doubles declared in the DATA_SECTION called
srx_init(1,2). See line 193 in attached tpl file. <br>
<br>
3) I declare a bounded_number_vector in the PARAMETER_SECTION called
logsrx(1,2). See line 283 in tpl file.<br>
<br>
4) In the PRELIMINARY_CALCS_SECTION (line 410) I want to initialize
the bounded_number_vector with code like:<br>
logsrx=log(srx_init);<br>
<br>
5) However, the compiler complains:<br>
<tt><small><small><small><small><small><small>C:\Users\ljacobso\Documents\Assessments\Shrimp_2013\CSA-v4\july18_2013>cl
/c /EHsc /DUSE_LAPLACE /DWIN32 /DSAFE_ALL /D<br>
__MSVC32__=8 /I. /I"C:\Program Files\ADMB"\include
/I"C:\Program Files\ADMB"\contrib\include csav41.cpp<br>
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
16.00.30319.01 for 80x86<br>
Copyright (C) Microsoft Corporation. All rights
reserved.<br>
<br>
csav41.cpp<br>
csav41.cpp(362) : error C2679: binary '=' : no
operator found which takes a right-hand operand of
type 'dvector' (or the<br>
re is no acceptable conversion)<br>
C:\Program Files\ADMB\include\admodel.h(2700):
could be 'param_init_bounded_number_vector
¶m_init_bounded_nu<br>
mber_vector::operator =(const
param_init_bounded_number_vector &)'<br>
while trying to match the argument list
'(param_init_bounded_number_vector, dvector)'<br>
</small></small></small></small></small></small></tt><br>
6) I've tried doing the assignment in a loop like:<br>
for (i=1;i<=nsurveys;i++) logsrx(i)=log(srx_init(i));<br>
<br>
using an intermediate dvar_vector like:<br>
dvar_vector temp(1,2)=srx_init;<br>
logsrxi=srxinit;<br>
<br>
and many other hacks (trying to find a combination of data types
with an assignment operator).<br>
<br>
6) Any ideas or suggestions?<br>
<br>
Cheers and thanks!<br>
<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
**********************
Opinions that may be expressed herein are my own
and not official positions of NOAA or the National
Marine Fisheries Service.
**********************
Larry Jacobson
National Marine Fisheries Service
Northeast Fisheries Science Center
166 Water Street
Woods Hole, MA 02543-1026
Voice: 508-495-2317
Fax: 508-495-2393
E-mail: <a class="moz-txt-link-abbreviated" href="mailto:larry.jacobson@noaa.gov">larry.jacobson@noaa.gov</a>
**********************
</pre>
</body>
</html>