ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
model5.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00007 #include <admodel.h>
00008 
00009 void param_init_bounded_dev_vector::set_value(const dvar_vector& x,
00010   const int& ii, const dvariable& _pen)
00011   {
00012     dvariable& pen= (dvariable&) _pen;
00013     if (initial_params::mc_phase)
00014     {
00015       set_value_mc(*this,x,ii,minb,maxb);
00016     }
00017     else
00018     {
00019       ::set_value(*this,x,ii,minb,maxb,pen);
00020     }
00021     dvariable s=mean(*this);
00022     pen+=10000.0*s*s;
00023     if (!initial_params::mc_phase)
00024     {
00025       (*this)-=s;
00026     }
00027   }