From GridLAB-D Wiki
Jump to: navigation, search

We have included questions we have previously received on running GridLAB-D. If your problem is not listed here, then you should feel free to get help from us or from the person listed in the error report. On most runs, you cannot obtain a model dump by including the --dumpall option on the command line.

Timestamp problems

Run fails with message "expected time value"

Sometime GridLAB-D doesn't run and report "expected time value"? What is wrong?
The timezone was given before the timezone was set or the timezone used in the timestamp was not the same as the timezone specified. Before using a timezone a clock block must be declared and the timezone must be specified, e.g.,
 clock {
   timezone PST+8PDT;
   timestamp '2000-01-01 00:00:00 PST';
 }

Timestamps appear to be in GMT

GridLAB-D is not running in my local timezone but in GMT instead. Why is that?
The timestamp was used without a timezone and no timezone was specified. The default timezone is GMT.

"Local TZ is empty"

When I run GridLAB-D, it gives me the warning that "Local TZ is empty". How do I fix this?
This warning message means that GridLAB-D was unable to locate the environment variable "TZ", which is used to define the default local timezone. To change this in Windows XP, open the start menu, right-click on "My Computer", select "Properties", go to the "Advanced" tab, click on "Environment Variables", then create a new variable that specifies the timezone. For example, the Western US timezone is "PST+8PDT". The first three character are the standard timezone abbreviation, then the number of hours for the UTC time offset. If daylight savings time is used, the DST abbreviation needs to follow the hour offset.

Recorder starts some hours off

When I run my file, the recorder starts some number of hours ahead or behind what I set the starttime to be. Why is this?
GridLAB-D initializes with a timezone based on the local settings, either from configuration files or from the operating system. When start and stop times are read, the system will determine what the time is in seconds from 0:00:00 (midnight) 1 Jan 1970 GMT to the specified time. Should the timezone be changed, the start and stop times will change as well. The solution is to set a timezone before the start and stop times are set, to ensure that the time system does not adjust the time values when the timezone is changed.


Tape Questions

Long file names

My project uses an explicit naming convention that can create some very long file names. How long of a name does GridLAB-D support?
GridLAB-D supports filenames up to about 1,020 characters long. This will often prove to be longer than the underlying file system. In practice, Windows file names cannot be longer than about 128 characters. Many current file systems support up to 255 byte file names, which will trim to 127 Unicode or UTF-16 characters.