Skip to content

Commit

Permalink
Fixed rawx roundtrip issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SanPen committed Oct 23, 2024
1 parent a034f50 commit 1ba2bdd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 deletions.
27 changes: 12 additions & 15 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 1 addition & 10 deletions src/GridCalEngine/IO/raw/raw_to_gridcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,16 @@
from GridCalEngine.basic_structures import Logger
import GridCalEngine.Devices as dev
from GridCalEngine.Devices.multi_circuit import MultiCircuit
from GridCalEngine.IO.raw.devices.area import RawArea
from GridCalEngine.IO.raw.devices.branch import RawBranch
from GridCalEngine.IO.raw.devices.bus import RawBus
from GridCalEngine.IO.raw.devices.facts import RawFACTS
from GridCalEngine.IO.raw.devices.generator import RawGenerator
from GridCalEngine.IO.raw.devices.induction_machine import RawInductionMachine
from GridCalEngine.IO.raw.devices.inter_area import RawInterArea
from GridCalEngine.IO.raw.devices.load import RawLoad
from GridCalEngine.IO.raw.devices.fixed_shunt import RawFixedShunt
from GridCalEngine.IO.raw.devices.switched_shunt import RawSwitchedShunt
from GridCalEngine.IO.raw.devices.transformer import RawTransformer
from GridCalEngine.IO.raw.devices.two_terminal_dc_line import RawTwoTerminalDCLine
from GridCalEngine.IO.raw.devices.vsc_dc_line import RawVscDCLine
from GridCalEngine.IO.raw.devices.zone import RawZone
from GridCalEngine.IO.raw.devices.owner import RawOwner
from GridCalEngine.IO.raw.devices.substation import RawSubstation
from GridCalEngine.IO.raw.devices.gne_device import RawGneDevice
from GridCalEngine.IO.raw.devices.system_switching_device import RawSystemSwitchingDevice
from GridCalEngine.IO.base.base_circuit import BaseCircuit
from GridCalEngine.IO.raw.devices.psse_circuit import PsseCircuit
from GridCalEngine.enumerations import TapChangerTypes

Expand Down Expand Up @@ -263,7 +254,7 @@ def get_gridcal_generator(psse_elm: RawGenerator, psse_bus_dict: Dict[int, dev.B
Pmax=psse_elm.PT,
Pmin=psse_elm.PB,
active=bool(psse_elm.STAT),
power_factor=psse_elm.WPF)
power_factor=psse_elm.WPF if psse_elm.WPF is not None else 0.8)

if psse_elm.IREG > 0:
if psse_elm.IREG != psse_elm.I:
Expand Down

0 comments on commit 1ba2bdd

Please sign in to comment.