Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, name, value=None):
GK_Operators.__init__(self,name, value=None)
def __init__(self, name='', value=None, lb=None, ub=None, integer=False):
if name == '':
name = 'v' + GKVariable.counter
GKVariable.counter += 1
if integer == True:
name = 'int_'+name
# prevents the __setattr__ function from sending options to the server
# until the __init__ function has completed since they should only be
# sent if changed from their defaults
self.__dict__['_initialized'] = False
GK_Operators.__init__(self, name, value=value)
#self.VALUE = value #initialized value is done in GK_Operators
if not hasattr(self,'type'): #don't overwrite SV and CV
self.type = None
if lb is not None:
self.LOWER = lb
else:
self.LOWER = None
if ub is not None:
self.UPPER = ub
else:
self.UPPER = None
#register fixed values through connections to ensure consistency in the
#csv file, otherwise the requested fixed value will be overridden by
def __init__(self, name='', value=None, integer=False):
if name == '':
name = 'p' + GKParameter.counter
GKParameter.counter += 1
if integer == True:
name = 'int_' + name
# prevents the __setattr__ function from sending options to the server
# until the __init__ function has completed since they should only be
# sent if changed from their defaults
self.__dict__['_initialized'] = False
GK_Operators.__init__(self, name, value=value)
#self.VALUE = value #initialized value SET IN GK_Operators
if not hasattr(self,'type'): #don't overwrite FV and MV
self.type = None
# now allow options to be sent to the server
self._initialized = True