Would like to suggest improved readability of names by replacing special characters and spaces with an underscore.
For example the name, 'pseudo effective Heat Transfer Coefficient (W/m2-K)' instead of current value of 'pseudoeffectiveheattransfercoefficeintwm2k' can become 'pseudo_effective_heat_transfer_coefficient_w_m2k'
with name = re.sub('[^0-9a-zA-Z]+', '_',t).lower()
Looks like APM doesn't like upper case and the fix was accomplished with
def MV(self, value=None, lb=None, ub=None, integer=False, fixed_initial=True, name=None):
"""Change these variables optimally to meet objectives"""
if name is not None:
name = re.sub(r'\W+', '', name).lower()
else:
name = 'p' + str(len(self.parameters) + 1)
if integer == True:
name = 'int'+name
Would like to suggest improved readability of names by replacing special characters and spaces with an underscore.
For example the name, 'pseudo effective Heat Transfer Coefficient (W/m2-K)' instead of current value of 'pseudoeffectiveheattransfercoefficeintwm2k' can become 'pseudo_effective_heat_transfer_coefficient_w_m2k' with name = re.sub('[^0-9a-zA-Z]+', '_',t).lower()
Looks like APM doesn't like upper case and the fix was accomplished with def MV(self, value=None, lb=None, ub=None, integer=False, fixed_initial=True, name=None): """Change these variables optimally to meet objectives""" if name is not None: name = re.sub(r'\W+', '', name).lower() else: name = 'p' + str(len(self.parameters) + 1) if integer == True: name = 'int'+name