Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

normamps defined on lines instead of linecode #131

Closed
sanderclaeys opened this issue May 1, 2019 · 2 comments
Closed

normamps defined on lines instead of linecode #131

sanderclaeys opened this issue May 1, 2019 · 2 comments
Assignees
Labels
Category: Data Parsers parser issues Type: Bug Something isn't working

Comments

@sanderclaeys
Copy link
Contributor

It seems like defining normamps on lines directly has no effect on the rate_a property of the corresponding TPPM branch (idem for emergamps and rate_b)

@frederikgeth frederikgeth added Category: Data Parsers parser issues Type: Bug Something isn't working labels May 1, 2019
@pseudocubic
Copy link
Collaborator

It turns out that in OpenDSS, where the linecode is defined matters significantly in the properties of the line, e.g.

new line.ohline bus1=sourcebus bus2=primary phases=3 normamps=10 linecode=556mcm

is different than

new line.ohline bus1=sourcebus bus2=primary phases=3 linecode=556mcm normamps=10.

In the first case, normamps=10 will be overwritten by whatever is defined on the linecode, in the second case the linecode's normamps will be superseded by the one defined on the line.

Note that even in the case where no normamps is explicitly given on a linecode, in the first case the default normamps=400 will overwrite the normamps=10 explicitly defined on the line.

Because we don't track the order that properties are defined, this functionality would be difficult to replicated.

What I can do easily is throw a warning if overlapping properties are defined on both the line and linecode, and let the user know that one will overwrite the other. Currently we overwrite the line properties with the linecode properties, is this how we would prefer it, or would we prefer the other way?

@pseudocubic pseudocubic added this to the Release v0.6.0 milestone Sep 4, 2019
@pseudocubic pseudocubic self-assigned this Sep 4, 2019
@sanderclaeys
Copy link
Contributor Author

sanderclaeys commented Sep 5, 2019

I think the other way around makes more sense.

The whole point of linecodes is to avoid duplication of properties. Referring to a linecode and overwriting certain properties at the line level, is a useful feature. Else you would have to introduce more linecodes. I do not see a use case for the other way around; if you do not want the property at the line level to be applied, simply don't specify it.

I suspect this is a quirk introduced by how OpenDSS parses properties in general. Some properties have a partial overlap with other properties, and if all of these are specified (which should not be allowed in the first place tbh), OpenDSS seems to apply them in the order they are specified.

pseudocubic added a commit that referenced this issue Sep 5, 2019
In OpenDSS, properties are applied to their respective objects in the order they are written, which means `linecode=x, r0=1` is different than `r0=1 linecode=x`, but until now PowerModelsDistribution applied properties in a fixed order of, `like` then `linecode`, overwriting properties that shouldn't have been overwritten.

Adds additional parsing functions to make this possible. In `parse_dss`, the order properties are entered is now retained in `"prop_order"`, which is used during the conversion to the internal data format.

In OpenDSS, `like` should be applied at the beginning of a line, but its application doesn't seem consistent with the manual, so if it is not
one of the first properties given, a warning is thrown by PowerModelsDistribution that PMD will treat the `like` property as having appeared before all other keywords.

Updates changelog and adds unit test.

Closes #131
pseudocubic added a commit that referenced this issue Sep 6, 2019
In OpenDSS, properties are applied to their respective objects in the order they are written, which means `linecode=x, r0=1` is different than `r0=1 linecode=x`, but until now PowerModelsDistribution applied properties in a fixed order of, `like` then `linecode`, overwriting properties that shouldn't have been overwritten.

Adds additional parsing functions to make this possible. In `parse_dss`, the order properties are entered is now retained in `"prop_order"`, which is used during the conversion to the internal data format.

In OpenDSS, `like` should be applied at the beginning of a line, but its application doesn't seem consistent with the manual, so if it is not
one of the first properties given, a warning is thrown by PowerModelsDistribution that PMD will treat the `like` property as having appeared before all other keywords.

Updates changelog and adds unit test.

Closes #131
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Data Parsers parser issues Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants