Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"-I${workspaceFolder}/external_libraries/python_control_to_cpp/python_control",
"-I${workspaceFolder}/external_libraries/python_numpy_to_cpp/python_numpy",
"-I${workspaceFolder}/external_libraries/python_numpy_to_cpp/base_matrix",
"-I${workspaceFolder}//external_libraries/python_math_to_cpp/base_math",
"-I${workspaceFolder}//external_libraries/python_math_to_cpp/python_math",
"-I${workspaceFolder}/external_libraries/python_math_to_cpp/base_math",
"-I${workspaceFolder}/external_libraries/python_math_to_cpp/python_math",
"-I${workspaceFolder}/external_libraries/base_utility_cpp/base_utility",
"${file}",
"-o",
Expand All @@ -46,8 +46,8 @@
"-I${workspaceFolder}/external_libraries/python_control_to_cpp/python_control",
"-I${workspaceFolder}/external_libraries/python_numpy_to_cpp/python_numpy",
"-I${workspaceFolder}/external_libraries/python_numpy_to_cpp/base_matrix",
"-I${workspaceFolder}//external_libraries/python_math_to_cpp/base_math",
"-I${workspaceFolder}//external_libraries/python_math_to_cpp/python_math",
"-I${workspaceFolder}/external_libraries/python_math_to_cpp/base_math",
"-I${workspaceFolder}/external_libraries/python_math_to_cpp/python_math",
"-I${workspaceFolder}/external_libraries/base_utility_cpp/base_utility",
"${file}",
"-o",
Expand Down
12 changes: 8 additions & 4 deletions test_sil/SIL_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ def generate_cmake_lists_txt(self):
code_text += f"project({SIL_lib_file_name})\n\n"

code_text += "set(CMAKE_CXX_STANDARD 11)\n"
code_text += "set(CMAKE_CXX_STANDARD_REQUIRED ON)\n\n"
code_text += "set(CMAKE_CXX_FLAGS_DEBUG \"-O0\")\n"
code_text += "set(CMAKE_CXX_STANDARD_REQUIRED ON)\n"
code_text += "set(CMAKE_CXX_FLAGS_RELEASE \"-O2\")\n"
code_text += "set(CMAKE_CXX_FLAGS_RELEASE \"${CMAKE_CXX_FLAGS_RELEASE} -flto=auto\")\n\n"

code_text += "find_package(pybind11 REQUIRED)\n\n"

Expand Down Expand Up @@ -93,8 +94,11 @@ def build_pybind11_code(self):
subprocess.run(f"rm -rf {build_folder}", shell=True)
subprocess.run(f"mkdir -p {build_folder}", shell=True)
subprocess.run(
f"cmake -S {self.SIL_folder} -B {build_folder}", shell=True)
subprocess.run(f"make -C {build_folder}", shell=True)
f"cmake -S {self.SIL_folder} -B {build_folder} -DCMAKE_BUILD_TYPE=Release",
shell=True
)
subprocess.run(
f"cmake --build {build_folder} --config Release", shell=True)

subprocess.run(
f"mv {build_folder}/{generated_file_name}.*so {self.SIL_folder}", shell=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def main():

X_initial = np.array([[0.0], [0.0], [0.0], [0.0], [0.0], [10.0]])

Np = 4
Np = 16
Nc = 1

Number_of_Delay = 0
Expand Down