/[ascend]/trunk/models/basemodel.a4l
ViewVC logotype

Diff of /trunk/models/basemodel.a4l

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1289 by johnpye, Wed Jun 21 07:00:45 2006 UTC revision 1290 by johnpye, Mon Feb 26 04:54:45 2007 UTC
# Line 184  STOP does not crash the ASCEND system. Line 184  STOP does not crash the ASCEND system.
184    
185  } END NOTES;  } END NOTES;
186    
187    STOP {Error! Standard method "check_self" called but not written in MODEL.};    (* STOP {Error! Standard method "check_self" called but not written in MODEL.}; *)
188    
189  END check_self;  END check_self;
190    
# Line 198  all the received models and variables, t Line 198  all the received models and variables, t
198  stuff.  stuff.
199  } END NOTES;  } END NOTES;
200    
201    STOP {Error! Standard method "check_all" called but not written in MODEL.};    (* STOP {Error! Standard method "check_all" called but not written in MODEL.}; *)
202    RUN check_self; (* intentionally _second_ *)    RUN check_self; (* intentionally _second_ *)
203    
204  END check_all;  END check_all;
# Line 219  By default, just 'default_self' will be Line 219  By default, just 'default_self' will be
219  Any model that has an on_load method can override this behaviour however.  Any model that has an on_load method can override this behaviour however.
220  Note that this behaviour applies only in the C++/python interface at this stage.  Note that this behaviour applies only in the C++/python interface at this stage.
221  } END NOTES;  } END NOTES;
222    RUN default_self;      RUN reset;
223        RUN default_all;
224  END on_load;  END on_load;
225    
226    METHOD default;
227    NOTES 'purpose' SELF {
228    This method exists for the purpose ofOVERRIDING atom defaults in the local
229    MODEL. Hopefully this approach can replace the current practise of writing
230    'default_self' methods for most MODELs. It should be superiour, since using
231    'default' instead of 'default_self' will always result in ALL variables in a
232    model being reset to default values, rather than only those explicitly stated
233    by the modeller.
234    } END NOTES;
235        (* nothing here *)
236    END default;
237    
238  METHOD default_self;  METHOD default_self;
239  NOTES 'purpose' SELF {  NOTES 'purpose' SELF {
240  This method should set default values for any variables  This method should set default values for any variables
# Line 243  When a top-level simulation is built by Line 256  When a top-level simulation is built by
256  method will be run at the end of compilation by the  method will be run at the end of compilation by the
257  compiler.  compiler.
258  } END NOTES;  } END NOTES;
259        EXTERNAL asc_default_self(SELF);
260    STOP {Error! Standard method "default_self" called but not written in MODEL.};      RUN default;
261  END default_self;  END default_self;
262    
263  METHOD default_all;  METHOD default_all;
# Line 260  through the parameter list. After these Line 273  through the parameter list. After these
273  should then call default_self to take care of all locally  should then call default_self to take care of all locally
274  declared default needs.  declared default needs.
275  } END NOTES;  } END NOTES;
   
   STOP {Error! Standard method "default_all" called but not written in MODEL.};  
276      RUN default_self;      RUN default_self;
277  END default_all;  END default_all;
278    
# Line 328  you are modeling. Line 339  you are modeling.
339    
340  } END NOTES;  } END NOTES;
341    
342    STOP {Error! Standard method "specify" called but not written in MODEL.};    (* STOP {Error! Standard method "specify" called but not written in MODEL.}; *)
343    
344  END specify;  END specify;
345    
# Line 394  This method should not bound variables p Line 405  This method should not bound variables p
405  MODEL definition or parts passed into the definition.  MODEL definition or parts passed into the definition.
406  } END NOTES;  } END NOTES;
407    
408    STOP {Error! Standard method "bound_self" called but not written in MODEL.};    (* STOP {Error! Standard method "bound_self" called but not written in MODEL.}; *)
409  END bound_self;  END bound_self;
410    
411  METHOD bound_all;  METHOD bound_all;
# Line 404  passed in variables and calls bound_self Line 415  passed in variables and calls bound_self
415  It should then call bound_self.  It should then call bound_self.
416  } END NOTES;  } END NOTES;
417    
418    STOP {Error! Standard method "bound_all" called but not written in MODEL.};    (* STOP {Error! Standard method "bound_all" called but not written in MODEL.}; *)
419    RUN bound_self;    RUN bound_self;
420  END bound_all;  END bound_all;
421    
# Line 444  variables that are received through the Line 455  variables that are received through the
455  the MODEL.  the MODEL.
456  } END NOTES;  } END NOTES;
457    
458    STOP {Error! Standard method "scale_self" called but not written in MODEL.};    (* STOP {Error! Standard method "scale_self" called but not written in MODEL.}; *)
459  END scale_self;  END scale_self;
460    
461  METHOD scale_all;  METHOD scale_all;
# Line 455  parameter list. It should then call scal Line 466  parameter list. It should then call scal
466  the local variables and models.  the local variables and models.
467  } END NOTES;  } END NOTES;
468    
469    STOP {Error! Standard method "scale_all" called but not written in MODEL.};    (* STOP {Error! Standard method "scale_all" called but not written in MODEL.}; *)
470    RUN scale_self;    RUN scale_self;
471  END scale_all;  END scale_all;
472  END METHODS;  END METHODS;
# Line 493  METHOD values; Line 504  METHOD values;
504   * Do this so noone need reinvent that set the next time   * Do this so noone need reinvent that set the next time
505   * you use the MODEL or someone picks the MODEL up after you.   * you use the MODEL or someone picks the MODEL up after you.
506   *)   *)
507    STOP {Error! Standard method "values" called but not written in MODEL.};    (* STOP {Error! Standard method "values" called but not written in MODEL.}; *)
508  END values;  END values;
509    
510  METHOD specify;  METHOD specify;
511    STOP {Error! Standard method "specify" called but not written in test MODEL.};    (* STOP {Error! Standard method "specify" called but not written in test MODEL.}; *)
512  END specify;  END specify;
513  (*  (*
514  METHOD ClearAll;  METHOD ClearAll;

Legend:
Removed from v.1289  
changed lines
  Added in v.1290

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22