Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@set_parameter
def set_max(self, name, value):
"""Internal method to set the maximum parameter values.
Notes
-----
The preferred method for parameter setting is through the model.
"""
if name in self.parameters.index:
self.parameters.loc[name, 'pmax'] = value
else:
print('Warning:', name, 'does not exist')
@set_parameter
def set_max(self, name, value):
"""Method to set the upper bound of the parameter value.
Examples
--------
>>> ts.set_max('parametername', 200)
"""
self.parameters.loc[name, 'pmax'] = value
@set_parameter
def set_pmax(self, name, value):
"""Internal method to set the upper bound of the parameter value.
Notes
-----
The preferred method for parameter setting is through the model.
"""
self.parameters.loc[name, 'pmax'] = value
@set_parameter
def set_vary(self, name, value):
"""Internal method to set if the parameter is varied during
optimization.
Notes
-----
The preferred method for parameter setting is through the model.
"""
self.parameters.loc[name, 'vary'] = value
@set_parameter
def set_pmin(self, name, value):
"""Internal method to set the lower bound of the parameter value.
Notes
-----
The preferred method for parameter setting is through the model.
"""
self.parameters.loc[name, 'pmin'] = value
@set_parameter
def set_initial(self, name, value):
"""Internal method to set the initial parameter value
Notes
-----
The preferred method for parameter setting is through the model.
"""
if name in self.parameters.index:
self.parameters.loc[name, 'initial'] = value
else:
print('Warning:', name, 'does not exist')
@set_parameter
def set_initial(self, name, value):
"""Method to set the initial parameter value.
Examples
--------
>>> ts.set_initial('parametername', 200)
"""
self.parameters.loc[name, 'initial'] = value
@set_parameter
def set_min(self, name, value):
"""Method to set the lower bound of the parameter value.
Examples
--------
>>> ts.set_min('parametername', 0)
"""
self.parameters.loc[name, 'pmin'] = value
@set_parameter
def set_vary(self, name, value):
"""Internal method to set if the parameter is varied during
optimization.
Notes
-----
The preferred method for parameter setting is through the model.
"""
self.parameters.loc[name, 'vary'] = bool(value)
@set_parameter
def set_vary(self, name, value):
"""Method to set if the parameter is varied during optimization.
Examples
--------
>>> ts.set_initial('parametername', 200)
"""
self.parameters.loc[name, 'vary'] = value