Skip to content

Commit

Permalink
Move modelica methods from GMT to modelica-builder (#591)
Browse files Browse the repository at this point in the history
* move modelica methods to gmt

* update dependendencies

* point to latest builder release
  • Loading branch information
nllong authored Oct 5, 2023
1 parent 423b966 commit d98c386
Show file tree
Hide file tree
Showing 53 changed files with 475 additions and 65,451 deletions.
5 changes: 5 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
"cvrmsd",
"dassl",
"dymola",
"energyplus",
"GDHC",
"HVAC",
"IBPSA",
"Jing",
"levelname",
"libfortran",
"linecount",
"maxdepth",
"mfrt",
"microgrid",
"Modelica",
Expand All @@ -29,6 +33,7 @@
"Templatized",
"timeseries",
"timestep",
"timesteps",
"urbanopt",
"vtnate"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pathlib import Path

from jinja2 import Environment, FileSystemLoader, StrictUndefined
from modelica_builder.package_parser import PackageParser

from geojson_modelica_translator.jinja_filters import ALL_CUSTOM_FILTERS
from geojson_modelica_translator.model_connectors.couplings.diagram import (
Expand All @@ -12,7 +13,6 @@
from geojson_modelica_translator.model_connectors.load_connectors.load_base import (
LoadBase
)
from geojson_modelica_translator.modelica.package_parser import PackageParser
from geojson_modelica_translator.scaffold import Scaffold


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

import os

from modelica_builder.package_parser import PackageParser

from geojson_modelica_translator.model_connectors.energy_transfer_systems.energy_transfer_base import (
EnergyTransferBase
)
from geojson_modelica_translator.modelica.package_parser import PackageParser
from geojson_modelica_translator.utils import simple_uuid


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

import os

from modelica_builder.package_parser import PackageParser

from geojson_modelica_translator.model_connectors.energy_transfer_systems.energy_transfer_base import (
EnergyTransferBase
)
from geojson_modelica_translator.modelica.package_parser import PackageParser
from geojson_modelica_translator.utils import simple_uuid


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
import os
import shutil

from modelica_builder.package_parser import PackageParser

from geojson_modelica_translator.model_connectors.load_connectors.load_base import (
LoadBase
)
from geojson_modelica_translator.modelica.package_parser import PackageParser
from geojson_modelica_translator.utils import (
ModelicaPath,
convert_c_to_k,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

import numpy as np
from modelica_builder.model import Model
from modelica_builder.package_parser import PackageParser
from teaser.project import Project

from geojson_modelica_translator.model_connectors.load_connectors.load_base import (
LoadBase
)
from geojson_modelica_translator.modelica.package_parser import PackageParser
from geojson_modelica_translator.utils import (
ModelicaPath,
convert_c_to_k,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
import os
import shutil

from modelica_builder.package_parser import PackageParser

from geojson_modelica_translator.model_connectors.load_connectors.load_base import (
LoadBase
)
from geojson_modelica_translator.modelica.package_parser import PackageParser
from geojson_modelica_translator.utils import (
ModelicaPath,
convert_c_to_k,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
import shutil
from pathlib import Path

from modelica_builder.package_parser import PackageParser

from geojson_modelica_translator.model_connectors.load_connectors.load_base import (
LoadBase
)
from geojson_modelica_translator.modelica.package_parser import PackageParser
from geojson_modelica_translator.utils import ModelicaPath, simple_uuid


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

import pandas as pd
import scipy.io as sio
from modelica_builder.package_parser import PackageParser

from geojson_modelica_translator.model_connectors.plants.plant_base import (
PlantBase
)
from geojson_modelica_translator.modelica.package_parser import PackageParser
from geojson_modelica_translator.utils import ModelicaPath, simple_uuid

logger = logging.getLogger(__name__)
Expand Down
3 changes: 2 additions & 1 deletion geojson_modelica_translator/model_connectors/plants/chp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

from pathlib import Path

from modelica_builder.package_parser import PackageParser

from geojson_modelica_translator.model_connectors.plants.plant_base import (
PlantBase
)
from geojson_modelica_translator.modelica.package_parser import PackageParser
from geojson_modelica_translator.utils import convert_c_to_k, simple_uuid


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
import shutil
from pathlib import Path

from modelica_builder.package_parser import PackageParser

from geojson_modelica_translator.model_connectors.plants.plant_base import (
PlantBase
)
from geojson_modelica_translator.modelica.package_parser import PackageParser
from geojson_modelica_translator.utils import simple_uuid


Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import shutil
from pathlib import Path

from geojson_modelica_translator.modelica.modelica_mos_file import ModelicaMOS
from geojson_modelica_translator.modelica.package_parser import PackageParser
from modelica_builder.modelica_mos_file import ModelicaMOS
from modelica_builder.package_parser import PackageParser

from geojson_modelica_translator.modelica.simple_gmt_base import SimpleGMTBase
from geojson_modelica_translator.scaffold import Scaffold

Expand Down
1 change: 1 addition & 0 deletions geojson_modelica_translator/modelica/input_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from typing import Any, List, Tuple, Union


# TODO: This needs to be removed. It is not used anywhere in the codebase.
class InputParser(object):
"""Class to read in Modelica files (.mo) and provide basic operations.
Expand Down
99 changes: 0 additions & 99 deletions geojson_modelica_translator/modelica/modelica_mos_file.py

This file was deleted.

Loading

0 comments on commit d98c386

Please sign in to comment.