Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include <admodel.h>
00008
00009 void param_init_matrix::allocate(const ad_integer& rmin,
00010 const ad_integer& rmax, const index_type& cmin,
00011 const index_type& cmax, int phase_start,const char *s)
00012 {
00013 named_dvar_matrix::allocate(rmin,rmax,cmin,cmax,s);
00014 initial_params::allocate(phase_start);
00015 if (ad_comm::global_bparfile)
00016 {
00017 *(ad_comm::global_bparfile) >> dvar_matrix(*this);
00018 }
00019 else if (ad_comm::global_parfile)
00020 {
00021 if (allocated(*this))
00022 *(ad_comm::global_parfile) >> dvar_matrix(*this);
00023 }
00024 else
00025 {
00026 if (allocated(*this))
00027 for (int i=indexmin();i<=indexmax();i++)
00028 if (allocated((*this)(i)))
00029 (*this)(i)=(initial_value);
00030 }
00031 }
00032
00033 void param_init_matrix::allocate(const ad_integer& rmin,
00034 const ad_integer& rmax, const index_type& cmin,
00035 const index_type& cmax, const char *s)
00036 {
00037 allocate(rmin,rmax,cmin,cmax,1,s);
00038 }