Loading AutoCSM/auto_csm.py +7 −5 Original line number Diff line number Diff line # -*- coding: utf-8 -*- """ Created on Fri Sep 20 11:54:58 2024 @author: Scott Greenwood @author: fig Copyright (c) 2024 UT-Battelle Licensed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their discretion. """ import pathlib from languages.modelica.modelica_methods import ModelicaMethods from languages.julia.julia_methods import JuliaMethods from languages.modelica.methods import ModelicaMethods from languages.julia.methods import JuliaMethods from helper_functions import Loader class AutoCSM: Loading Loading @@ -123,7 +125,7 @@ class AutoCSM: @project_path.setter def project_path(self, path: str) -> None: """Sets the project path, ensuring it's not 'package.mo'.""" temp = pathlib.Path(path) temp = pathlib.Path(path).resolve() if temp.name == "package.mo": temp = temp.parent self._project_path = temp.as_posix() Loading AutoCSM/helper_functions.py +5 −2 Original line number Diff line number Diff line # -*- coding: utf-8 -*- """ Created on Thu May 30 17:26:47 2024 @author: Scott Greenwood @author: fig Copyright (c) 2024 UT-Battelle Licensed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their discretion. """ import json def read_json(file_path): Loading AutoCSM/languages/julia/create_architecture.py 0 → 100644 +15 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- """ @author: Scott Greenwood Copyright (c) 2024 UT-Battelle Licensed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their discretion. TODO: Could add additional layer details to recreate the nested model structure of the generic approach - This would add to the Structure and ControlBus the appropirate information TODO: Could autopopulate model instance in structure with parallel logic (if instanceNames provided) """ def main(json_file_path, output_path, template_folder, architecture='nested'): raise ValueError('FMU creation not yet implmented') No newline at end of file AutoCSM/languages/julia/create_fmu_fmijl.py 0 → 100644 +17 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- """ @author: Scott Greenwood Copyright (c) 2024 UT-Battelle Licensed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their discretion. """ def main(): raise ValueError('FMU creation not yet implmented') AutoCSM/languages/julia/create_model_nested.py 0 → 100644 +11 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- """ @author: Scott Greenwood Copyright (c) 2024 UT-Battelle Licensed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their discretion. """ def main(): raise ValueError('FMU creation not yet implmented') No newline at end of file Loading
AutoCSM/auto_csm.py +7 −5 Original line number Diff line number Diff line # -*- coding: utf-8 -*- """ Created on Fri Sep 20 11:54:58 2024 @author: Scott Greenwood @author: fig Copyright (c) 2024 UT-Battelle Licensed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their discretion. """ import pathlib from languages.modelica.modelica_methods import ModelicaMethods from languages.julia.julia_methods import JuliaMethods from languages.modelica.methods import ModelicaMethods from languages.julia.methods import JuliaMethods from helper_functions import Loader class AutoCSM: Loading Loading @@ -123,7 +125,7 @@ class AutoCSM: @project_path.setter def project_path(self, path: str) -> None: """Sets the project path, ensuring it's not 'package.mo'.""" temp = pathlib.Path(path) temp = pathlib.Path(path).resolve() if temp.name == "package.mo": temp = temp.parent self._project_path = temp.as_posix() Loading
AutoCSM/helper_functions.py +5 −2 Original line number Diff line number Diff line # -*- coding: utf-8 -*- """ Created on Thu May 30 17:26:47 2024 @author: Scott Greenwood @author: fig Copyright (c) 2024 UT-Battelle Licensed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their discretion. """ import json def read_json(file_path): Loading
AutoCSM/languages/julia/create_architecture.py 0 → 100644 +15 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- """ @author: Scott Greenwood Copyright (c) 2024 UT-Battelle Licensed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their discretion. TODO: Could add additional layer details to recreate the nested model structure of the generic approach - This would add to the Structure and ControlBus the appropirate information TODO: Could autopopulate model instance in structure with parallel logic (if instanceNames provided) """ def main(json_file_path, output_path, template_folder, architecture='nested'): raise ValueError('FMU creation not yet implmented') No newline at end of file
AutoCSM/languages/julia/create_fmu_fmijl.py 0 → 100644 +17 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- """ @author: Scott Greenwood Copyright (c) 2024 UT-Battelle Licensed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their discretion. """ def main(): raise ValueError('FMU creation not yet implmented')
AutoCSM/languages/julia/create_model_nested.py 0 → 100644 +11 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- """ @author: Scott Greenwood Copyright (c) 2024 UT-Battelle Licensed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their discretion. """ def main(): raise ValueError('FMU creation not yet implmented') No newline at end of file