Convert to Microgrid from old-style NonModularMicrogrid. Parameters ---------- nonmodular : pymgrid.NonModularMicrogrid Non-modular (old-style) microgrid to be converted. Returns ------- converted : pymgrid.Microgrid
(cls, nonmodular)
| 968 | |
| 969 | @classmethod |
| 970 | def from_nonmodular(cls, nonmodular): |
| 971 | """ |
| 972 | Convert to Microgrid from old-style NonModularMicrogrid. |
| 973 | |
| 974 | Parameters |
| 975 | ---------- |
| 976 | nonmodular : pymgrid.NonModularMicrogrid |
| 977 | Non-modular (old-style) microgrid to be converted. |
| 978 | |
| 979 | Returns |
| 980 | ------- |
| 981 | converted : pymgrid.Microgrid |
| 982 | New-style modular microgrid. |
| 983 | |
| 984 | See Also |
| 985 | -------- |
| 986 | pymgrid.Microgrid.to_nonmodular : Converter from new-style to old-style. |
| 987 | |
| 988 | .. warning:: |
| 989 | |
| 990 | Any logs that have accumulated will be lost in conversion. |
| 991 | |
| 992 | """ |
| 993 | from pymgrid.convert.convert import to_modular |
| 994 | return to_modular(nonmodular) |
| 995 | |
| 996 | def to_nonmodular(self): |
| 997 | """ |
nothing calls this directly
no test coverage detected