original_docstring: 
          Helper function to create soft constraint
          :param variable: pyomo variable
          :type variable: pyomo.base.core.Var
          :param punish_variable: variable to take the punish
          :type punish_variable: pyomo.base.core.Var
          :param bounds: tuple with bounds (upper,lower)
          :type bounds: tuple
          :return: a function to generate the constraint
          :rtype: function
          
docstring: Helper function to create soft constraint
docstring_tokens: Helper function to create soft constraint
code: def _create_soft_constraint_fn(variable, punish_variable, bounds):
          """
          Helper function to create soft constraint
          :param variable: pyomo variable
          :type variable: pyomo.base.core.Var
          :param punish_variable: variable to take the punish
          :type punish_variable: pyomo.base.core.Var
          :param bounds: tuple with bounds (upper,lower)
          :type bounds: tuple
          :return: a function to generate the constraint
          :rtype: function
          """
          if bounds[0] is None:
              return lambda _mod, _index: variable[_index] - punish_variable[_index] <= bounds[1]
          elif bounds[1] is None:
              return lambda _mod, _index: bounds[0] <= variable[_index] - punish_variable[_index]
          else:
              def _soft_constr_rule(_mod, _index):
                  return bounds[0] <= (variable[_index] - punish_variable[_index]) <= bounds[1]
  
              return _soft_constr_rule
code_tokens: def _create_soft_constraint_fn ( variable , punish_variable , bounds ) : if bounds [ 0 ] is None : return lambda _mod , _index : variable [ _index ] - punish_variable [ _index ] <= bounds [ 1 ] elif bounds [ 1 ] is None : return lambda _mod , _index : bounds [ 0 ] <= variable [ _index ] - punish_variable [ _index ] else : def _soft_constr_rule ( _mod , _index ) : return bounds [ 0 ] <= ( variable [ _index ] - punish_variable [ _index ] ) <= bounds [ 1 ] return _soft_constr_rule
short_docstring: Helper function to create soft constraint
short_docstring_tokens: Helper function to create soft constraint
comment: """
          Helper function to create soft constraint
          :param variable: pyomo variable
          :type variable: pyomo.base.core.Var
          :param punish_variable: variable to take the punish
          :type punish_variable: pyomo.base.core.Var
          :param bounds: tuple with bounds (upper,lower)
          :type bounds: tuple
          :return: a function to generate the constraint
          :rtype: function
          """