nikhilgupta10 / GridLAB-D

Other
1 stars 0 forks source link

#882 Example outputs bad characters, #2608

Closed nikhilgupta10 closed 7 years ago

nikhilgupta10 commented 7 years ago

The command \gridlabd --example residential:house\ generates a bad string for the value of \shape:

object house:0 {

    // header properties
    rank 0;
    clock (invalid);
    flags (invalid);
    // residential_enduse properties
    shape ??;
    load \power_factor: 0.970000; power.r: 0.000000; power.i: nan\;
    energy +0+0i kVAh;
        ...
~~~~~,
nikhilgupta10 commented 7 years ago

nikhilgupta10 imported these comments from Sourceforge: The user dchassin does not exist anymore. Therefore assigning this to afisher1. "jcfuller":This looks to be a problem in loadshape.c, convert_from_loadshape.

Simple solution is to add:

case MT_UNKNOWN:
    return sprintf(string,  ype: %s\,/UNKNOWN\);
default:
    return 0; //@TODO: NEED AN ERROR MESSAGE

at the end of the case structure.

It does open up future questions about why the house (and appliance) models ALWAYS load a shape (via residential_enduse) even when a shape is not needed. May need to address this in the future to improve performance.,

"dchassin":- status: new --> closed