Commit 5bdd286b authored by Greenwood, Scott's avatar Greenwood, Scott
Browse files

Merge branch 'Issue_1_structure_improvement' into 'main'

[fix][feature] removed the need for specifying SourceName in input...

See merge request !2
parents e8ddc283 876726d0
Loading
Loading
Loading
Loading
+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:
@@ -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()
+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):
+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
+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')




+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