10:50 2007-4-5 mengzhen
* modification of function Gl_StateOccupy. 
  It is now controlled by rythm ratio (rt_a). Its declaration is changed from 
  [StateO] = Gl_StateOccupy(Tu_O) to [StateO,state_n] = Gl_StateOccupy(N,rt_a,Tu_O). See detail in the source code.
* modification of gl_read_target and format of target files. 
  The format of target data is changed as follows to be easy to read:

  (TargetTypes : 0= Complete, 1=Compartment....  comment area)

  NumberPlant(NumPlt)  1

  PLANT (CA) 27 (PA) 1 (TargetType) 0
  Root(Q_R)  -1

  //-GU--NbSub--IDSub--Q_B--Q_P--Q_I--Q_Ff--Q_Fm-S_B--S_I--H_I- 

  AXIS  (ID) 0 (PA) 1  (CA)  27  (PosLow) 1

* multifitting on single stem plants (cotton) was tested

10:45 2007-4-13 qirui & mengzhen
* Updated parameter files with new parameter for layer computation
* New way of computing layers(gl_demand,gl_main,gl_qorg), now gl_demad is inside the loop of gl_main
* three possible ways of computing expansion function (gl_expan)

14:24 2007-5-13 mengzhen
* fitting on wheat with new parameters of layer
  * a bug in gl_demand for root demand computation is fixed;
  * when there is no layer, both Global_Sink_Layer(Slay)  and Global_Sink_Coefficient(Slope) should be 0.;
  * Expansion_Mode(gl_expan) and Root_Demand_Mode(gl_qorg) are added to parameter file. Other files need to be updated. 
  * to QR: keep Leaf_direction(Flag) as 0 in updating

11:36 2007-5-21 mengzhen & qirui
* fitting on cotton with new layer computation was NOT successful. This will influence the fitting on chysanthemum;
* adding variable functioning time and expansion time, from another version where these modifications have been done;
  test on file wheat.sci;  changed files include:
  gl_read:       to read parameters with new format;
  gl_organ_axis: to compute the living leaf number in an axis with T_f;
  gl_topo_phy:   the one who call gl_organ_axis; change of function parameters;
  gl_main:       new parameters T_f (variable functioning time) and T_exp (variable expansion time)
  gl_simulate:   change of function (gl_topo_phy, gl_main) parameters;
  gl_expan:      to compute new expansion law with T_exp;
  gl_demand:     to replace Tu_O with T_f (only living organs have expansion);
  gl_resistance: to compute total living leaf area with T_f;
* TODO: change of all parameter file format;

9:38 2007-5-22 mengzhen
* fitting on wheat with variable functioning time; touched files include:
  gl_fit_para:   change of function (gl_topo_phy, T_f) parameters;  
  sim_fit_Hidden:change of function (gl_main, T_f, T_exp) parameters; note T_exp is not from fitting, thus x_t_exp
                 is removed. In the target file, one can remove the line 'Time_Expansion(c_t_exp) 0 0 0 0 0 0 0';
* cleaning the code:
  gl_organ_axis_ori --> gl_organ_axis;
  gl_read_target_new_new --> gl_read_target;

15:56 2007-6-4 QiRui
* new interface with parameters for layer and variable functioning and expansion duration
* a bug in gl_qorg is fixed for computing layer allocation in growth units
* TODO: a bug using interface in Scilab version 4.1 to be fixed

11:31 2007-6-5 MZ
* gl_StateOccupy: StateO(id,i,p)==0 -> StateO(id,i,p)=0
* gl_organ_axis: No(3,k,m)=Ne;//internode always exist wrong. Should be changed in c code. Done.
  
17:55 2007-6-7 MZ
* version 9.5, simulating remobilization, specially for wheat, rice, etc.
* gl_qorg: q(t)=qmax(1-F0(1-k^(t-tf))). F0: max portion of loss, k: remobilization speed, tf: functioning duration
* gl_photosynthesis: another part of Q come from remobilization

15:38 2007-6-25 MZ
* fitting with detailed data and compartment data; touched files include:
  gl_output_FitResult: output compartment data in GC;
  sim_fit_hidden: two modes of output data, 1 for fitting, 2 for compartment data in GC; compartment data is computed from QO;
  bug remains in sim_fit_hidden: when there is more than one metamer in one GU, output is wrong.

* simulation of organ prunning
  BUG: in gl_topo_phy, C code. flag = (Flag_pruning(b)~=1) | (nb<=NM(b)+Tu_O(1,1,b)+Pruning_delay(b)) ; 
  To hide the old organs (prunning), change code in Draw_3D.

* simulation of different fruit number along the stem
  To change in gl_state_occupy, read from file.

17:50 2007-6-26 MZ QR
* TODO: gl_organ_axis: internode should always live. Done.

11:17 2007-6-27 MZ
* simulation of different number of GU in substructures along the stem (eg. few GUs in branches at beginning and then increase)
  gl_organ_axis; gl_topo_phy; gl_org,..., functions where Nb_O and Nb_BI are used.
  gl_draw_phy; in Draw_AddOrgan and Draw_GetOrgan, the position of a substructure becomes a new attribute to write into the substructure file.
  gl_retrieve_structure, Draw_3D: to get the 3D with new id (position). Tested with parameter file Test_NuMa.sci.
  MEMO: maybe a bug in gl_org for layer computation
  BUG: in gl_draw_phy, flag=( flag & (Flag_pruning(b)~=1) | (kk<=NM(b)+Tu_O(1,1,b)+Pruning_delay(b)) ); so that branches with living leaves are not prunned

16:15 2007-6-28 MZ QR
* Tomato wag stateOccupy