nikhilgupta10 / GridLAB-D

Other
1 stars 0 forks source link

#872 Add options to tape and global variable to prevent inclusion of units in convert functions, #2598

Open nikhilgupta10 opened 8 years ago

nikhilgupta10 commented 8 years ago

Some applications (e.g., Matlab, Excel) have difficulty with units and other appended stuff on converted quantities. Suggest a global variable to control conversion process, a module variable in tape, and an extension to the [~] syntax in property variable of recorder and collector to disable inclusion of unit into (although conversion is still done).

The global variable could be named /unit_display\ a set with the following:

The recorder property syntax would be extended to allow [~unit] which means \convert to unit but don't show the unit.\ Simply putting [~] means \leave the unit as is but don't show it.\,

nikhilgupta10 commented 8 years ago

nikhilgupta10 imported these comments from Sourceforge: The user dchassin does not exist anymore. Therefore assigning this to afisher1. "dchassin":Recommend not trying this until 4.0. Approximate level of effort is 1 day of coding and documentation. Not certain about impact on validation, but if done correctly it should be benign because the default behavior does not change current overall system behavior or validation models. Same goes for existing models so it should 100% backward compatible with version 3. New validation models will be necessary to verify new functionality of both core and tape.,

"dchassin":Background, both Torsten and I have run into difficulties dealing with the output from simulations and do a lot of postprocessing of CSV files. This becomes a real performance problem when dealing with large data sets. The typical 1 year 1,000 home + feeder + market run is simply to slow to process in Matlab to make Monte Carlo runs practical. Anything that can be done to improve the speed of CSV loads in Matlab will be highly valuable in the long run.

Another thought regarding this is a global data formatting standard that would set all the necessary options for a particular application. Suggested applications right off the bat are Matlab and Excel, but others like S or R would be very useful too. Haven't thought much about how to do that, but it is a pretty good sounding idea.,

"jcfuller":Note: Recorder, collectors, etc. currently do not produce units in the data itself (by default), unless a flag is set to include it. Additionally, units can be included (or not) in the header of the CSV outputs.

See recorder documentation (note the \default\ setting in line_units will sometimes include units if you have done a conversion):

header_units

enumeration Used to control the appearance of units for the column headers. \ALL\ will force the units to be printed for every column, if present. /NONE\ will suppress the printing of units on the column header, even if conversions are being made. \DEFAULT\ will only print the units if they are defined in the GLM.

line_units

enumeration Used to control the appearance of units in the data rows. \ALL\ will force the units to be printed for every row entry, if present. /NONE\ will suppress the printing of units within the rows, even if conversions are being made. \DEFAULT\ will only print the units if they are defined in the GLM for that column. ,

"jcfuller":However, I think the idea is generally good, especially for server mode. We should make this a global that can be overridden at the object level, particularly for the 'tape' objects. That way, if someone wants the overall system to not have units, but one particular CSV to have units, then they can still accomplish that.

Either that, or we make a global that only applies to the connections/server/link implementations, and not to the tape module.,