Commit 73675cfc authored by Louis Beauloye's avatar Louis Beauloye
Browse files

WIP load outside module

parent 5a5ff5c1
......@@ -52,7 +52,6 @@ from .._mbs_function_handler import __assign_user_to_undefined__
from .._mbs_function_handler import __assign_symb_to_undefined__
# importing wrapping function
from .._mbsysc_loader.callback import user_Derivative_wrap
from .._mbsysc_loader.callback import user_DrivenJoints_wrap
......@@ -410,8 +409,9 @@ class MbsData(object):
# self.user_JointForces = None
# self.user_LinkForces = None
# self.user_Link3DForces = None
assign_user_fct_to_None(self)
__assign_user_to_undefined__(self)
assign_user_fct_to_None(self, None)
if self.opt_load_c < 2:
__assign_user_to_undefined__(self, None)
# User function also related to dirdyn, equil...
# self.user_dirdyn_init = None
# self.user_dirdyn_loop = None
......@@ -428,8 +428,9 @@ class MbsData(object):
# self.mbs_link = None
# self.mbs_link3D = None
# self.mbs_sensor = None
assign_symb_fct_to_None(self)
__assign_symb_to_undefined__(self)
assign_symb_fct_to_None(self, None)
if self.opt_load_c < 1:
__assign_symb_to_undefined__(self, None)
# pointers dict to avoid garbage collecting
self.ptrs_to_user_fcts = dict()
......@@ -582,71 +583,71 @@ class MbsData(object):
print('The current root folder is: "' + os.getcwd() + '"')
self.user_path = user_path
# derivative
user_file = "user_Derivative.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
path = os.path.abspath(os.path.join(template_path, user_file))
module = imp.load_source(user_file[:-3], path)
self.user_derivative = module.user_derivatives
# drivenJoints
user_file = "user_DrivenJoints.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
path = os.path.abspath(os.path.join(template_path, user_file))
module = imp.load_source(user_file[:-3], path)
self.user_DrivenJoints = module.user_DrivenJoints
# ext_forces
user_file = "user_ExtForces.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
path = os.path.abspath(os.path.join(template_path, user_file))
module = imp.load_source(user_file[:-3], path)
self.user_ExtForces = module.user_ExtForces
# joint_forces
user_file = "user_JointForces.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
path = os.path.abspath(os.path.join(template_path, user_file))
module = imp.load_source(user_file[:-3], path)
self.user_JointForces = module.user_JointForces
# link_forces
user_file = "user_LinkForces.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
path = os.path.abspath(os.path.join(template_path, user_file))
module = imp.load_source(user_file[:-3], path)
self.user_LinkForces = module.user_LinkForces
# link3D_forces
user_file = "user_Link3DForces.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
path = os.path.abspath(os.path.join(template_path, user_file))
module = imp.load_source(user_file[:-3], path)
self.user_Link3DForces = module.user_Link3DForces
# # derivative
# user_file = "user_Derivative.py"
# path = os.path.abspath(os.path.join(user_path, user_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
# path = os.path.abspath(os.path.join(template_path, user_file))
# module = imp.load_source(user_file[:-3], path)
# self.user_derivative = module.user_derivatives
# # drivenJoints
# user_file = "user_DrivenJoints.py"
# path = os.path.abspath(os.path.join(user_path, user_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
# path = os.path.abspath(os.path.join(template_path, user_file))
# module = imp.load_source(user_file[:-3], path)
# self.user_DrivenJoints = module.user_DrivenJoints
# # ext_forces
# user_file = "user_ExtForces.py"
# path = os.path.abspath(os.path.join(user_path, user_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
# path = os.path.abspath(os.path.join(template_path, user_file))
# module = imp.load_source(user_file[:-3], path)
# self.user_ExtForces = module.user_ExtForces
# # joint_forces
# user_file = "user_JointForces.py"
# path = os.path.abspath(os.path.join(user_path, user_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
# path = os.path.abspath(os.path.join(template_path, user_file))
# module = imp.load_source(user_file[:-3], path)
# self.user_JointForces = module.user_JointForces
# # link_forces
# user_file = "user_LinkForces.py"
# path = os.path.abspath(os.path.join(user_path, user_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
# path = os.path.abspath(os.path.join(template_path, user_file))
# module = imp.load_source(user_file[:-3], path)
# self.user_LinkForces = module.user_LinkForces
# # link3D_forces
# user_file = "user_Link3DForces.py"
# path = os.path.abspath(os.path.join(user_path, user_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
# path = os.path.abspath(os.path.join(template_path, user_file))
# module = imp.load_source(user_file[:-3], path)
# self.user_Link3DForces = module.user_Link3DForces
return
......@@ -692,77 +693,77 @@ class MbsData(object):
print('The current root folder is: "' + os.getcwd() + '"')
self.symbolic_path = symb_path
# mbs_accelred
symb_file = "mbs_accelred_" + mbs_name + ".py"
path = os.path.abspath(os.path.join(symb_path, symb_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
symb_file = "mbs_accelred_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file))
module = imp.load_source(symb_file[:-3], path)
self.mbs_accelred = module.mbs_accelred
# mbs_extforces
symb_file = "mbs_extforces_" + mbs_name + ".py"
path = os.path.abspath(os.path.join(symb_path, symb_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
symb_file = "mbs_extforces_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file))
module = imp.load_source(symb_file[:-3], path)
self.mbs_extforces = module.extforces
# mbs_gensensor
symb_file = "mbs_gensensor_" + mbs_name + ".py"
path = os.path.abspath(os.path.join(symb_path, symb_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
symb_file = "mbs_gensensor_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file))
module = imp.load_source(symb_file[:-3], path)
self.mbs_gensensor = module.sensor
# mbs_link
symb_file = "mbs_link_" + mbs_name + ".py"
path = os.path.abspath(os.path.join(symb_path, symb_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
symb_file = "mbs_link_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file))
module = imp.load_source(symb_file[:-3], path)
self.mbs_link = module.link
# mbs_link3D
symb_file = "mbs_link3D_" + mbs_name + ".py"
path = os.path.abspath(os.path.join(symb_path, symb_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
symb_file = "mbs_link3D_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file))
module = imp.load_source(symb_file[:-3], path)
self.mbs_link3D = module.link3D
# mbs_sensor
symb_file = "mbs_sensor_" + mbs_name + ".py"
path = os.path.abspath(os.path.join(symb_path, symb_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
symb_file = "mbs_sensor_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file))
module = imp.load_source(symb_file[:-3], path)
self.mbs_sensor = module.sensor
# # mbs_accelred
# symb_file = "mbs_accelred_" + mbs_name + ".py"
# path = os.path.abspath(os.path.join(symb_path, symb_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
# symb_file = "mbs_accelred_PRJ.py"
# path = os.path.abspath(os.path.join(template_path, symb_file))
# module = imp.load_source(symb_file[:-3], path)
# self.mbs_accelred = module.mbs_accelred
# # mbs_extforces
# symb_file = "mbs_extforces_" + mbs_name + ".py"
# path = os.path.abspath(os.path.join(symb_path, symb_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
# symb_file = "mbs_extforces_PRJ.py"
# path = os.path.abspath(os.path.join(template_path, symb_file))
# module = imp.load_source(symb_file[:-3], path)
# self.mbs_extforces = module.extforces
# # mbs_gensensor
# symb_file = "mbs_gensensor_" + mbs_name + ".py"
# path = os.path.abspath(os.path.join(symb_path, symb_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
# symb_file = "mbs_gensensor_PRJ.py"
# path = os.path.abspath(os.path.join(template_path, symb_file))
# module = imp.load_source(symb_file[:-3], path)
# self.mbs_gensensor = module.sensor
# # mbs_link
# symb_file = "mbs_link_" + mbs_name + ".py"
# path = os.path.abspath(os.path.join(symb_path, symb_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
# symb_file = "mbs_link_PRJ.py"
# path = os.path.abspath(os.path.join(template_path, symb_file))
# module = imp.load_source(symb_file[:-3], path)
# self.mbs_link = module.link
# # mbs_link3D
# symb_file = "mbs_link3D_" + mbs_name + ".py"
# path = os.path.abspath(os.path.join(symb_path, symb_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
# symb_file = "mbs_link3D_PRJ.py"
# path = os.path.abspath(os.path.join(template_path, symb_file))
# module = imp.load_source(symb_file[:-3], path)
# self.mbs_link3D = module.link3D
# # mbs_sensor
# symb_file = "mbs_sensor_" + mbs_name + ".py"
# path = os.path.abspath(os.path.join(symb_path, symb_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
# symb_file = "mbs_sensor_PRJ.py"
# path = os.path.abspath(os.path.join(template_path, symb_file))
# module = imp.load_source(symb_file[:-3], path)
# self.mbs_sensor = module.sensor
def __assign_user_fct__(self):
"""
......
......@@ -38,6 +38,8 @@ from .._mbs_function_handler import __unassign_user_fct_2__
from .._mbs_function_handler import __unassign_symb_fct_2__
from .._mbs_function_handler import __assign_user_to_undefined__
from .._mbs_function_handler import __assign_symb_to_undefined__
from .._mbs_function_handler import __load_symbolic_fct_2__
from .._mbs_function_handler import __load_user_fct_2__
# importing wrapping function
from .._mbsysc_loader.callback import user_cons_hJ_wrap
......@@ -146,7 +148,7 @@ class MbsDirdyn(object):
symbolic_path = os.path.join(project_path, symbolic_path)
# Error handeling
if not os.path.isdir(symbolic_path):
print('Thesymbolic function directory for direct dynamic module does not exist: "' + symbolic_path + '"')
print('The symbolic function directory for direct dynamic module does not exist: "' + symbolic_path + '"')
print('The current root folder is: "' + os.getcwd() + '"')
print('The following directory is used instead: "' + self.symbolic_path + '".')
else:
......@@ -157,12 +159,16 @@ class MbsDirdyn(object):
self.ptrs_to_symb_fcts = dict()
# Storing project function pointer
self.user_fun_list = ['cons_hJ', 'cons_jdqd', 'dirdyn_init', 'dirdyn_loop', 'dirdyn_finish']
self.symb_fun_list = ['cons_hJ', 'cons_jdqd', 'invdyna', 'dirdyna']
self.user_fun_list = ['cons_hJ', 'cons_jdqd', 'derivative', 'DrivenJoints', 'ExtForces', 'JointForces',
'LinkForces', 'Link3DForces', 'dirdyn_init', 'dirdyn_loop', 'dirdyn_finish']
self.symb_fun_list = ['accelred', 'cons_hJ', 'cons_jdqd', 'invdyna', 'dirdyna', 'extforces', 'gensensor',
'link', 'link3D', 'sensor']
assign_user_fct_to_None(self, self.user_fun_list)
__assign_user_to_undefined__(self.mbs, self.user_fun_list)
if self.mbs.opt_load_c < 2:
__assign_user_to_undefined__(self.mbs, self.user_fun_list)
assign_symb_fct_to_None(self, self.symb_fun_list)
__assign_symb_to_undefined__(self.mbs, self.symb_fun_list)
if self.mbs.opt_load_c < 1:
__assign_symb_to_undefined__(self.mbs, self.symb_fun_list)
# self.user_cons_hJ = None
# self.user_cons_jdqd = None
# self.user_dirdyn_init = None
......@@ -238,44 +244,45 @@ class MbsDirdyn(object):
user_path: str
The path to the folder containing the user functions.
"""
template_path = os.path.join(__MODULE_DIR__, '../templates/user')
# cons_hJ
user_file = "user_cons_hJ.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
path = os.path.abspath(os.path.join(template_path, user_file))
module = imp.load_source(user_file[:-3], path)
self.user_cons_hJ = module.user_cons_hJ
# cons_jdqd
user_file = "user_cons_jdqd.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
path = os.path.abspath(os.path.join(template_path, user_file))
module = imp.load_source(user_file[:-3], path)
self.user_cons_jdqd = module.user_cons_jdqd
# user_dirdyn
user_file = "user_dirdyn.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
print("file '" + user_file + "' not found in folder '" + os.path.dirname(path))
path = os.path.abspath(os.path.join(template_path, user_file))
else:
if __DEBUG__:
print("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path))
module = imp.load_source(user_file[:-3], path)
self.user_dirdyn_init = module.user_dirdyn_init
self.user_dirdyn_loop = module.user_dirdyn_loop
self.user_dirdyn_finish = module.user_dirdyn_finish
__load_user_fct_2__(self.mbs, __MODULE_DIR__, self.user_fun_list, user_path)
# template_path = os.path.join(__MODULE_DIR__, '../templates/user')
# # cons_hJ
# user_file = "user_cons_hJ.py"
# path = os.path.abspath(os.path.join(user_path, user_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
# path = os.path.abspath(os.path.join(template_path, user_file))
# module = imp.load_source(user_file[:-3], path)
# self.user_cons_hJ = module.user_cons_hJ
# # cons_jdqd
# user_file = "user_cons_jdqd.py"
# path = os.path.abspath(os.path.join(user_path, user_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path))
# path = os.path.abspath(os.path.join(template_path, user_file))
# module = imp.load_source(user_file[:-3], path)
# self.user_cons_jdqd = module.user_cons_jdqd
# # user_dirdyn
# user_file = "user_dirdyn.py"
# path = os.path.abspath(os.path.join(user_path, user_file))
# if not os.path.isfile(path):
# print("file '" + user_file + "' not found in folder '" + os.path.dirname(path))
# path = os.path.abspath(os.path.join(template_path, user_file))
# else:
# if __DEBUG__:
# print("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path))
# module = imp.load_source(user_file[:-3], path)
# self.user_dirdyn_init = module.user_dirdyn_init
# self.user_dirdyn_loop = module.user_dirdyn_loop
# self.user_dirdyn_finish = module.user_dirdyn_finish
return
def __load_symbolic_fct__(self, symbolic_path):
......@@ -298,43 +305,45 @@ class MbsDirdyn(object):
symbolic_path: str
The path to the folder containing the symbolic functions.
"""
mbs_name = self.mbs.mbs_name
template_path = os.path.join(__MODULE_DIR__, '../templates/symbolic')
# mbs_cons_hJ
symb_file = "mbs_cons_hJ_" + mbs_name + ".py"
path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
symb_file = "mbs_cons_hJ_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file))
module = imp.load_source(symb_file[:-3], path)
self.mbs_cons_hJ = module.cons_hJ
# mbs_cons_jdqd
symb_file = "mbs_cons_jdqd_" + mbs_name + ".py"
path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
symb_file = "mbs_cons_jdqd_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file))
module = imp.load_source(symb_file[:-3], path)
self.mbs_cons_jdqd = module.cons_jdqd
# dirdyna
symb_file = "mbs_dirdyna_" + mbs_name + ".py"
path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path):
if __DEBUG__:
print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
symb_file = "mbs_dirdyna_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file))
module = imp.load_source(symb_file[:-3], path)
self.mbs_dirdyna = module.dirdyna
__load_symbolic_fct_2__(self.mbs, __MODULE_DIR__, self.symb_fun_list, symbolic_path)
# mbs_name = self.mbs.mbs_name
# template_path = os.path.join(__MODULE_DIR__, '../templates/symbolic')
# # mbs_cons_hJ
# symb_file = "mbs_cons_hJ_" + mbs_name + ".py"
# path = os.path.abspath(os.path.join(symbolic_path, symb_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
# symb_file = "mbs_cons_hJ_PRJ.py"
# path = os.path.abspath(os.path.join(template_path, symb_file))
# module = imp.load_source(symb_file[:-3], path)
# self.mbs_cons_hJ = module.cons_hJ
# # mbs_cons_jdqd
# symb_file = "mbs_cons_jdqd_" + mbs_name + ".py"
# path = os.path.abspath(os.path.join(symbolic_path, symb_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
# symb_file = "mbs_cons_jdqd_PRJ.py"
# path = os.path.abspath(os.path.join(template_path, symb_file))
# module = imp.load_source(symb_file[:-3], path)
# self.mbs_cons_jdqd = module.cons_jdqd
# # dirdyna
# symb_file = "mbs_dirdyna_" + mbs_name + ".py"
# path = os.path.abspath(os.path.join(symbolic_path, symb_file))
# if not os.path.isfile(path):
# if __DEBUG__:
# print("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path))
# symb_file = "mbs_dirdyna_PRJ.py"
# path = os.path.abspath(os.path.join(template_path, symb_file))
# module = imp.load_source(symb_file[:-3], path)
# self.mbs_dirdyna = module.dirdyna
return
......@@ -366,6 +375,7 @@ class MbsDirdyn(object):
self.mbs.mbs_data_ptr.contents.user_dirdyn_loop = self.ptrs_to_user_fcts["user_dirdyn_loop"]
self.mbs.user_dirdyn_finish = self.user_dirdyn_finish
self.mbs.mbs_data_ptr.contents.user_dirdyn_finish = self.ptrs_to_user_fcts["user_dirdyn_finish"]
return
def __assign_symbolic_fct__(self):
......
......@@ -22,6 +22,14 @@ from .._mbsysc_loader.loadlibs import libmodules
# importing utilities function
from ..mbs_utilities import callback_undefined
# importing function handler
from .._mbs_function_handler import assign_user_fct_to_None
from .._mbs_function_handler import assign_symb_fct_to_None
from .._mbs_function_handler import __unassign_user_fct_2__
from .._mbs_function_handler import __unassign_symb_fct_2__
from .._mbs_function_handler import __assign_user_to_undefined__
from .._mbs_function_handler import __assign_symb_to_undefined__
# importing wrapping function
from .._mbsysc_loader.callback import user_cons_hJ_wrap
......@@ -133,8 +141,14 @@ class MbsPart(object):
self.ptrs_to_symb_fcts = dict()
# Storing project function pointer
self.user_cons_hJ = None
self.mbs_cons_hJ = None
# self.user_cons_hJ = None
# self.mbs_cons_hJ = None
self.user_fun_list = ['cons_hJ']
self.symb_fun_list = ['cons_hJ']
assign_user_fct_to_None(self, self.user_fun_list)
__assign_user_to_undefined__(self.mbs, self.user_fun_list)
assign_symb_fct_to_None(self, self.symb_fun_list)
__assign_symb_to_undefined__(self.mbs, self.symb_fun_list)
# Exposing some memory
if __DEBUG__:
......@@ -297,22 +311,22 @@ class MbsPart(object):
# Assing required user functions
if self.mbs.opt_load_c < 2:
self.__assign_user_fct__()
self.mbs.__assign_user_fct__()
# self.mbs.__assign_user_fct__()
# Assing required symbolic functions
if self.mbs.opt_load_c < 1:
self.__assign_symbolic_fct__()
self.mbs.__assign_symb_fct__()
# self.mbs.__assign_symb_fct__()
libmodules.mbs_run_part(self.mbs_part_ptr, self.mbs.mbs_data_ptr)
# Unassign functions
if self.mbs.opt_load_c < 2:
self.__unassign_user_fct__()
self.mbs.__unassign_user_fct__()
# self.mbs.__unassign_user_fct__()
# Unassign required symbolic functions
if self.mbs.opt_load_c < 1:
self.__unassign_symbolic_fct__()
self.mbs.__unassign_symb_fct__()
# self.mbs.__unassign_symb_fct__()
def set_options(self, **kwargs):
"""
......