aayushGaur / stac

Steady-State AC Network Visualization in the Browser - Developed at DATA61/Faculty of IT, Monash University - as a part of the summer research project.
http://immersive.erc.monash.edu.au/stac/
MIT License
16 stars 13 forks source link

Comment Lines in Data Files #20

Closed ccoffrin closed 8 years ago

ccoffrin commented 8 years ago

If a line begins with "%" in the date file, it should be ignored by the parser. Even if the comment line appears inside of a matrix definition.

aayushGaur commented 8 years ago

Updated the parser to not consider a line if it begins with '%' (in the data matrix for the various network objects).

Cases which the current changes in the parser will not be able to handle when the information regarding a bus is commented :

  1. The bus is being used in some branch definition.
  2. The generator information regarding the bus is still present in the file.
  3. The bus location regarding the bus is still present.

All the above cases create an anomaly in the file. Support for the above will be added if such cases are encountered.

Closing for review.

ccoffrin commented 8 years ago

I tested the file which inspired this bug and it still does not parse. I will send it to you for testing.

aayushGaur commented 8 years ago

The following updates have been made in the parser:

  1. The parser will not consider any line whose first character is '%' (after the data in the line has been trimmed for white spaces).
  2. As the name of attributes/properties for the elements are now being read from the rules, the parser will ignore any extra content/value for an element which exceeds the property count i.e. any content after the ';' will be ignored.