/[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 1371 by johnpye, Mon Feb 26 07:33:49 2007 UTC revision 1372 by jpye, Fri Mar 30 11:01:20 2007 UTC
# Line 238  method will be run at the end of compila Line 238  method will be run at the end of compila
238  compiler. See notes in on_load method for new behaviour in  compiler. See notes in on_load method for new behaviour in
239  the PyGTK GUI.  the PyGTK GUI.
240  } END NOTES;  } END NOTES;
241      EXTERNAL asc_default_self(SELF);      EXTERNAL defaultself_visit_childatoms(SELF);
242      RUN default;      EXTERNAL defaultself_visit_submodels(SELF); (* overwrite ATOM defaults explicit nested code if needed *)
243        RUN default; (* local overrides *)
244  END default_self;  END default_self;
245    
246  METHOD default_all;  METHOD default_all;
# Line 254  through the parameter list. After these Line 255  through the parameter list. After these
255  should then call default_self to take care of all locally  should then call default_self to take care of all locally
256  declared default needs.  declared default needs.
257  } END NOTES;  } END NOTES;
258      EXTERNAL asc_default_all(SELF);      (* INITIALISATION OF PARAMETERS IS NOT IMPLEMENTED YET *)
259      RUN default_self;      RUN default_self;
260  END default_all;  END default_all;
261    
# Line 478  MODEL testcmumodel(); Line 479  MODEL testcmumodel();
479   * rooted here or be a final refinement of a reusable MODEL.   * rooted here or be a final refinement of a reusable MODEL.
480   *)   *)
481  METHODS  METHODS
482  METHOD values;      METHOD values;
483  (*      (*
484   * In a final application MODEL, you should record at least one set of       * In a final application MODEL, you should record at least one set of
485   * input values (values of the fixed variables and guesses of key       * input values (values of the fixed variables and guesses of key
486   * solved-for variables) that leads to a good solution.       * solved-for variables) that leads to a good solution.
487   * Do this so noone need reinvent that set the next time       * Do this so noone need reinvent that set the next time
488   * you use the MODEL or someone picks the MODEL up after you.       * you use the MODEL or someone picks the MODEL up after you.
489   *)       *)
490    (* STOP {Error! Standard method "values" called but not written in MODEL.}; *)        (* STOP {Error! Standard method "values" called but not written in MODEL.}; *)
491  END values;      END values;
492    
493  METHOD specify;      METHOD specify;
494    (* STOP {Error! Standard method "specify" called but not written in test MODEL.}; *)        (* STOP {Error! Standard method "specify" called but not written in test MODEL.}; *)
495  END specify;      END specify;
496  (*  
497  METHOD ClearAll;      METHOD ClearAll;
498    EXTERNAL asc_free_all_variables(SELF);        EXTERNAL asc_free_all_variables(SELF);
499  END ClearAll;      END ClearAll;
500    
501  METHOD reset;      METHOD reset;
502  (* This method gets the MODEL to some standard starting state,      (* This method gets the MODEL to some standard starting state,
503   * though not necessarily the most useful starting state for       * though not necessarily the most useful starting state for
504   * a particular application. In Chem. Eng. terms, this method       * a particular application. In Chem. Eng. terms, this method
505   * establishes a base case.       * establishes a base case.
506   * There is no 'one perfect "reset"' for all purposes. This       * There is no 'one perfect "reset"' for all purposes. This
507   * routine should merely define a reasonably useful base configuration       * routine should merely define a reasonably useful base configuration
508   * of the MODEL.       * of the MODEL.
509   * Other reset_whatElseYouWant methods can (should) also be       * Other reset_whatElseYouWant methods can (should) also be
510   * written.       * written.
511   *       *
512   * Normally you do not need to write this method: your models       * Normally you do not need to write this method: your models
513   * will inherit this one unless you override it (redefine it)       * will inherit this one unless you override it (redefine it)
514   * in your MODEL.       * in your MODEL.
515   *)       *)
516      RUN ClearAll;          RUN ClearAll;
517      RUN specify;          RUN specify;
518  END reset;      END reset;
 *)  
519  END testcmumodel;  END testcmumodel;
520    
521  MODEL your_site_models();  MODEL your_site_models();

Legend:
Removed from v.1371  
changed lines
  Added in v.1372

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