dss-extensions / dss-extensions/AltDSS-Schema

Support for OpenDSS default values in altdss-schema

Open
#7 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

We are currently using the opendssdirect.py's Circuit.ToJSON() method to serialize the distribution model. We then use altdss_models to deserialize the model. We use this representation to convert the model into another format (also Pydantic models). The Issue we face is that in the serialized model, many of the fields are None.

Example:

```python
Vsource_MVAsc3MVAsc1x1r1x0r0(
Name='source', Like=None,
Bus1=BusConnection(root='sourcebus'),
BasekV=115.0, pu=1.0001, Angle=30.0, Frequency=None, Phases=3, ScanType=None, Sequence=None, Bus2=None, Yearly=None, Daily=None, Duty=None, Model=None, puZIdeal=None, Spectrum=None, BaseFreq=None, Enabled=None,
MVASC3=20000.0, MVASC1=21000.0,
X1R1=None, X0R0=None)
```
In the example above, X1R1 and X0R0 are None, as they are not defined in the master.dss file. Model conversion requires knowledge of these variables to allow us to convert to a different schema.

Observed Issue:
```python
>>> odd.Text.Command("new circuit.test")
>>> odd.Vsource.First()
>>> odd.Vsources.First()
1
>>> odd.Text.Command("? vsource.source.r1")
>>> odd.Text.Result()
'1.60376682055275'
```
JSON Output:
```python
"Vsource" : [
{
"Name" : "source",
"MVASC3" : 2.0000000000000000E+003,
"MVASC1" : 2.1000000000000000E+003,
"BasekV" : 1.1500000000000000E+002,
"Bus1" : "sourcebus"
}
```

Desired Outcome:

The values in the JSON object are whatever OpenDSS would use to solve the circuit (even if is uses default values)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.