Index: openacs-4/packages/accounts-finance/tcl/modeling-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/accounts-finance/tcl/modeling-procs.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/accounts-finance/tcl/modeling-procs.tcl 13 Aug 2010 06:41:13 -0000 1.22 +++ openacs-4/packages/accounts-finance/tcl/modeling-procs.tcl 6 Sep 2010 11:01:41 -0000 1.23 @@ -7,6 +7,12 @@ namespace eval acc_fin {} +ad_proc -private acc_fin::qaf_id_new { +} { + returns a unique id from qaf_id_sequence +} { + return db_nextval qaf_id_seq +} ad_proc -private acc_fin::template_model { template_number @@ -296,6 +302,9 @@ Returns a list of lists. First list element denotes how many errors there were. If number_of_iterations is greater than 0, Returns a list of lists, where each list element consists of a variable name and the values that it returns after each iteration, including the initial conditions. The report calculations return the variable name and the value returned from the function evaluation. + +NOTE: this list_of_lists format is diffrent than the standard list_of_lists table format where the first element of the list_of_lists contains ordered variable names, followed by ordered columns of one row of data. Reason: many of the model data may have variable number of values, such as 1 or interactions_count. Using the standard method is would be a bulky way of storing many models. + If there are errors during compile, then subsequent list elements are the results of the model compile, useful for debugging purposes. Loop through model N (number) iterations, 0 iterations means pre-compile only (and check model for immediate errors).