This log summarizes development of G7 since the last update of the G7 Help files. Copyright: Inforum 2016 Web Site: www.Inforum.umd.edu 10/10/08 Modified CreateVamFile() to work properly when called from the command box. 7.3757 10/17/08 Fixed a bad problem with ctrl, where the group was not processed properly. 10/18/08 Increased size of GString arrays in csum and chain. Fixed some memory freeing problems. 7.3758 10/22/08 Fixed up matin5 routine. 10/23/08 Fixed up additional serious problems with ctrl routine. 12/22/08 Fixed a file-delete problem in flowctrl.cpp. 1/6/09 Made listnames command print available macro series when listing names for a vam bank with vammode=='a'. Previously, only the vector names were printed. Also, add "ln" as a shortcut for listnames. Added case-sensitive sort option 's'; reverse order of sort 'r'; vam file only 'v' or Gbank only 'g' when vammode is 'a': listnames [-srgv] [mask] Note that vector elements are not quite in order, since the sort is alphabetical (e.g. ...out19 out2 out20...). Can add additonal options later, like case-insensitive sort. 7.3759 2/21/09 Fix false error message when creating a new workspace series with "xl read." Rework GUI control of InterDyme models, including IdBuild, Fixer, MacFixer, IdRun, Tables, and Express Tables. 7.376. 3/4/09 Enable creation of new spreadsheet documents with XL command. The commands {(xl open wb), (xl create [wb])} will start XL, create a new workbook, and insert one blank worksheet. Enabled "xl save []". "xl create wb " will create a new spreadsheet of a given name. Added "xl create ws []" that inserts a new worksheet to the right of the active sheet. Added "xl name ws " to set the name of the current worksheet. Implemented passing of array to Excel for WriteNumberArray() function. Added "up" and "left" directions for "xl write" command. Fixed bug in ColumnMinusOne() function. 3/5/09 Fixed bug in "xl read" optional dates. Fixed bugs in ColumnMinusOne() and ColumnPlusOne() functions. Implemented receiving of array from Excel for ReadNumberArray() function. 3/10/09 Significantly revised Excel code to split G7 interface from Excel class. Added "xl column width ". 4/15/09 Made r command return an error when missing data are encountered. When an editor is not saved and the G7 window is closed and the editor prompts for saving and the user cancels, made G7 stay open. G7.377. Began improvements to bank open window. Closed some memory leaks. 4/20/09 Added ,)> function to if-else routine. 4/24/09 Modified pause: pause [], where is one word (possibly in quotes). Made "return OK" actually return. Made fadd skip to next on "continue". 5/13/09 Fixed up the Run Dyme config. Improved the Tables config. Fixed bug when 'look' is run from script. Fixed launch of console from menu for Vista systems. Fixed inelegant treatement of cancellation from "Execute" menu item and button. 5/14/09 Changed File | Directory and Change Folder button to load the current working directory when they open; previously, they loaded the location of G7.exe. Implemented Font Dialog (previosly existed, but did not work) for graphs. Allow title and subtitles to be italic, bold, underline, strikeout, but not other graph text. Add Bold and Size settings for G7 main window to greg.ini, and store graph and editor font settings (size settings have no effect in graphs). Improve G7 main menu titles. 5/15/09 Implemented Redo in Editor. Improved editor menu arrangement. Load editor font from greg.ini, and implement editor font settings in all editor windows. Fixed bug in Editor Close. Eliminated false "modified" when font settings are implemented or when text is loaded from file. In G7 button bar, reorder the buttons. Eliminate the "Execute" button, and respecify the Run button to check for a file name in the Execute box; if present, run it, otherwise prompt for a file name. 5/20/09 Fix up some numerical problems in log graph. Add dialog for running IdBuild. Redo Dyme Run dialog. Change process for running Dyme models. Now, there is a check box in the dialog for running IdBuild (this is no different than running IdBuild from the menu), and for configuring Fixer and MacFixer. If the fixer boxes are checked, then those dialogs will open and the contents used to construct cfg files, but the programs will not be run. Instead, Fixer and MacFixer now will be called from Run.Bat, which will be executed by G7 in order to run the model. Run.Bat either must be supplied by the user, or G7 can construct a batch file with a button click, using information supplied in the Run Dyme window. It still is possible to use the old IdBuild->MacFixer->Fixer->Run Dyme sequence, but it is not preferred. The new way follows the standard Inforum sequence of setting the model configuration, copying historical banks to model banks, running the fixers, running the model, and then saving the model files. Plus, the new way reduces the number of menu selections needed to run the model. 5/21/09 Fix up the dir command. Fixed bug in look. Switched scaling to false for many windows (Bank Open, (Mac)Fixer, Run Dyme, Tables). 6/17/09 Correction to indexing in XL (problem with excelIntToColumn: AA). 7/1/09 Minor adjustment to column indexing function excelColumnPlusN(), with corresponding adjustment to function calls. Fixed problems with reading "up" and "left." Improved "xl missing" to recognize negative number arguments. Add detection of Excel error codes (e.g. returned when trying to read a cell with a divide-by-zero error) in the "read" command; insert a missing value, print a warning, and continue. G7.379 7/10/09 Fixed a bug in the show command that would cause trouble when executing "show" from the command box. Probably related to Ono's bug report, addressed 8/8/08. 7/28/09 Fixed group routine in do loop to handle cases like (1-97 (1-1) ), where (1-1) was not skipped properly. Instead, the exclusion routine was setting 1-97 to zero, because processing of the first "1" was setting the first element to zero, and so the processing of the second "1" was done improperly. There are problems with the routine, and they need to be redone! 7/31/09 Built new fills routine for do loop. Needs more work to fully integrate new system, both in RunCmdFile and any other function that calls the function. Need to convert other fills routines to use similar technology. New method builds groups using doubly linked lists. Should avoid the bugs that still plague the old routine. Added excelColumnToInt routine. Worked to debug groups commands, and made do loop handle such groups. Previous code was intended to handle such groups, but was not implemented properly. Previously, the group was read as a number, but now the group is specified like ":Manufacturing" as with other implementations. Modified getlist function because it was not printing properly, but the problem might originate elsewhere. Note that code for groups is buggy and full of leaks and needs to be checked. 8/6/09 Debugged the groups commands. Fixed groups.bin file open problem. Fixed memory leaks. 8/14/09 Redirected RunCmdFile() and excelGetGroup() to use new fills() routine. Adjusted xl vecread and xl matread accordingly. Need to implement new fills() in GVamFile.cpp. 8/17/09 Reworked vmake routine, fixed bugs and implemented new fills() function. Updated p123 function to use new fills() routine. That should complete the transition of the old fills() routine to the new, so I removed the old fills() routine. Still need to switch the old fill() routines (fill() in rhs.cpp and GroupHome->fill()) to fills(). 8/18/09 Made the GroupHome::fills() routine use the new fills() routine. Modified all calls to use dynamic arrays in the new format. Needed to adjust various GroupHome routines to use the dynamic, compact arrays. Updated ctrl, gidmake, fillrowdef(), gmatdat, scale. Modified pscale(). 8/19/09 Resurected vam test routine from 2003, and it turned up bugs. Changed vupdate abrev. from vu back to vup. Fixed up vmake. Ran into trouble in RAS; did not have time to fix. 8/20/09 Debugged RAS command. 8/21/09 In Editor, introduced the opening of a filename that is selected in the text of the editor window. NOTE: RAS seems to work with packed matrices, but it always scales the rows and columns to sum to 1.0. Is this desirable? It is not documented. Full matrices are not scaled in this way. NOTE: ras does not operate on groups with packed matrices. Made graph return on error. 8/28/09 Added @stdev() function to compute the sample standard deviation. Fix bug in dates in @mean() function. 9/2/09 When running Build, check whether Model.bat exists; if not, create it with standard entries. Print macro model window parameters to GReg.ini. 9/4/09 Fix buffer overflow in Vam title command. G7.38 9/14/09 Made minor bug fix in Run Dyme window. Changed title of button. 9/28/09 Fixed error message in Function command. G7.3801 10/1/09 A serious problem was discovered with the new fills() routine, which parses all group specifications (in group, do, @csum, xl, and many other routines); specifically, the bug was in the matching function (e.g. for "1-5 (2 3)", 2 would not be excluded properly). This is puzzing because of extensive testing on the original, which seemed to work well. Fixed up the matching function. Wrote extensive test routine, which the revised version seems to handle properly. G7.3802 10/13/09 Fixed a problem in the date-reading routine for xl commands. If only one date was given, to specify a single period, the ending date could be corrupted - where the ending date should be equal to the starting date. Fixed a small bug in the show command. Improved display of row and column titles in the show command. Corrected a small problem in the examples for the xl matread routine in the Help files. G7.3803 10/14/09 Made some changes to the pmloadcmd command (and slight changes to functions it calls) while attempting to prevent buffer overflows and memory leaks. Impose a strict maximum length of 32 for file name and path in the pmfile command; previously, this was not enforced, but it probably allowed buffer overflows. 10/15/09 Fixed a bug in the printing of Build.cfg when clicking OK or Save in Model | Run IdBuild. Reworked the printing when clicking OK to allow interuption of the process if an error is discovered. 10/19/09 Improved the error messages in the ctrl command. Fixed problem with ctrl call to pscale routine. The problem was that we feedi a vector length to pscale, but the ctrl routine also operates on macro banks such that vector lengths are not defined. G7.3804 10/21/09 Added optional flag for the ls command, extending the work of 10/19/09: Format: ls [-] [direction] may be a: use x = a + b*y b = x{date}/ AVG(y) * sign( x{date}*AVG(y) ) a = x{date} - b * y{date} where AVG(y) is calculated from fdate1 to , if direction is 'b', or from to fdate2, if direction is 'f'. This is useful when y{date} is close to zero so that scaling parameter b is large, thus scaling x excessively. If AVG(y) is close to zero, then b = x{date} * sign( x{date}*AVG(y) ). 10/27/09 Improved parsing of lines in the Look window. 11/09/09 Identified a problem in pmfile, and possibly a source of memory leaks elsewhere. Added storecmd() to pmfile. This also fixes a problem where previously-loaded vector data could be lost. Changed punch5 to read from default vam file by default; previously, it looked to bank a. 11/10/09 Check matrix type in pmfile; return error if not "packed." When closing a vam bank after punch5-ing a packed matrix, G7 reported errors. See the comment on 2/22/08. There seems to be a problem with writing packed matrices in writearow(). Modified the for loop to stop when reaching end of array -- this seems to fix the problem. In formpmh(), initialize np to zero. 7.3805 11/16/09 In @csum(), when no arguments are given and no bank letter is specified, report a problem if DefaultVam has not been specified. Reading from a vam bank is necessary to determine the range of sectors, assuming that the user has not suppied them. 11/19/09 Fixed bug that failed to start a new line at end of period for punch5. 12/10/09 Fixed minor bug in vmatdata so that the default is set properly for []. Fixed a bug in setting the optional first-column position in the show command. 7.3806 01/06/10 Added "xl print missing [] to specify a missing value code for printing spreadsheet data. 01/07/10 Set up "xl write" to employ the decimal setting from the format command, thus controlling the number of decimals displayed in a spreadsheet. 01/20/10 Added "CMD.EXE" to the search path for the DOS window; this is needed for Win7. Corrected buggy code for DOS menu item. The code for the menu item and the "dos" command (without arguments) were synchronized. Reduced printing in lint command when addprint==n. Added checks in vamcreate to avoid overflows. 01/21/10 Increased buffer sizes in @csum routine. 01/22/10 Added +=, -=, *=, and /= to f and vf commands. Currently, the LHS series must exist to use these operators. Make interpolation for vectors and matrices work for both missing values and zeros. Interpolation of time series still works only on missing values. 01/27/10 Fixed up the "xl mkseries" command. Tried to fix the problem with F10 in the editor, where the editor mangled execution (with F10) of selected text following an error. 01/28/10 Began work on getsum. Rewrote the routines for to rely on Matrix and Pmatrix matrix classes. When groups are specified, assume that a partial sum for all rows/columns is desired. Add documentation for the ability to form partial sums by specifying a group: getsum r|c [] 01/29/10 Added ability to specify a bank letter for the source matrix in getsum. Target vector still must be in the default vam bank. 02/02/10 Added ability to specify additional arguments after the argument filename in fadd command: fadd