Overview
Comment:Works with ident DIY rep
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: b135670b5f6829a88ba2270489cef5e5a9405c3da0eec28c5bed12e938d35e00
User & Date: gawthrop@users.sourceforge.net on 2002-08-20 15:43:45
Other Links: branch diff | manifest | tags
Context
2002-08-20
15:51:17
Update to work with ident DIY rep check-in: 743fd2bdd3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:43:45
Works with ident DIY rep check-in: b135670b5f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:39:47
New identification DIY reps check-in: bca1a038ac user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/control/PPP/ppp_optimise.m from [d54b2723b3] to [a2aa18325f].

25
26
27
28
29
30
31



32
33
34
35
36
37
38
  ######################################
  
  ###############################################################
  ## Version control history
  ###############################################################
  ## $Id$
  ## $Log$



  ## Revision 1.11  2002/05/20 13:32:36  gawthrop
  ## Sanity check on y_0
  ##
  ## Revision 1.10  2002/05/13 16:01:09  gawthrop
  ## Addes Q weighting matrix
  ##
  ## Revision 1.9  2002/05/08 10:14:21  gawthrop







>
>
>







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  ######################################
  
  ###############################################################
  ## Version control history
  ###############################################################
  ## $Id$
  ## $Log$
  ## Revision 1.12  2002/06/11 11:25:25  gawthrop
  ## No longer delay the simulated data.
  ##
  ## Revision 1.11  2002/05/20 13:32:36  gawthrop
  ## Sanity check on y_0
  ##
  ## Revision 1.10  2002/05/13 16:01:09  gawthrop
  ## Addes Q weighting matrix
  ##
  ## Revision 1.9  2002/05/08 10:14:21  gawthrop
62
63
64
65
66
67
68
69


70
71
72
73
74
75
76
  ##
  ## Revision 1.1  2000/12/28 11:58:07  peterg
  ## Put under CVS
  ##
  ###############################################################


  ## Copyright (C) 1999,2000 by Peter J. Gawthrop


  sim_command = sprintf("%s_ssim(x_0,par,simpar,u,i_s)", system_name);

  ## Extract indices
  i_t = free(:,1);		# Parameters
  i_s = free(:,2)';		# Sensitivities

  if nargin<9







|
>
>







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  ##
  ## Revision 1.1  2000/12/28 11:58:07  peterg
  ## Put under CVS
  ##
  ###############################################################


  ## Copyright (C) 1999,2000,2001,2002 by Peter J. Gawthrop

  ## Simulation command
  sim_command = sprintf("%s_ssim(x_0,par,simpar,u,i_s)", system_name);

  ## Extract indices
  i_t = free(:,1);		# Parameters
  i_s = free(:,2)';		# Sensitivities

  if nargin<9
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
    printf("\n");
  endif
  
  while (abs(reduction)>extras.criterion)&&\
	(abs(err)>extras.criterion)&&\
	(iterations<extras.max_iterations)

    iterations = iterations + 1 # Increment iteration counter

    [y,y_par,x] = eval(sim_command); # Simulate
    [N_data,N_y] = size(y)

    if (N_y!=n_y)
      mess = sprintf("n_y (%i) in data not same as n_y (%i) in model", n_y,N_y);
      error(mess);
    endif

    ## Use the last part of the simulation to compare with data
    ## ### Removed #### And shift back by one data point
#     if ( (N_data-n_data)<1 )
#       error(sprintf("y_0 (%i) must be shorter than y (%i)", n_data, N_data));
#     endif
    
    y = y(N_data-n_data+1:N_data,:);
    y_par = y_par(N_data-n_data+1:N_data,:);

    if extras.visual==1
      ## Plot
      title("Optimisation data");
      plot([y y_0])







|


|











<







124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

146
147
148
149
150
151
152
    printf("\n");
  endif
  
  while (abs(reduction)>extras.criterion)&&\
	(abs(err)>extras.criterion)&&\
	(iterations<extras.max_iterations)

    iterations = iterations + 1; # Increment iteration counter

    [y,y_par,x] = eval(sim_command); # Simulate
    [N_data,N_y] = size(y);

    if (N_y!=n_y)
      mess = sprintf("n_y (%i) in data not same as n_y (%i) in model", n_y,N_y);
      error(mess);
    endif

    ## Use the last part of the simulation to compare with data
    ## ### Removed #### And shift back by one data point
#     if ( (N_data-n_data)<1 )
#       error(sprintf("y_0 (%i) must be shorter than y (%i)", n_data, N_data));
#     endif

    y = y(N_data-n_data+1:N_data,:);
    y_par = y_par(N_data-n_data+1:N_data,:);

    if extras.visual==1
      ## Plot
      title("Optimisation data");
      plot([y y_0])


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]