docs: def order_derived_parameters(component):
      """
      Finds ordering of derived_parameters.
  
      @param component: Component containing derived parameters.
      @type component: lems.model.component.Component
  
      @return: Returns ordered list of derived parameters.
      @rtype: list(string)
  
      @raise SimBuildError: Raised when a proper ordering of derived
      parameters could not be found.
      """
  
      if len(component.derived_parameters) == 0:
          return []
      
      ordering = []
      dps = []
      
      for dp in component.derived_parameters:
          dps.append(dp.name)
              
      maxcount = 5
  
      count = maxcount
  
      while count > 0 and dps != []:
          count = count - 1
  
          for dp1 in dps:
              #exp_tree = regime.derived_variables[dv1].expression_tree
              value = component.derived_parameters[dp1].value
              found = False
              for dp2 in dps:
                  if dp1 != dp2 and dp2 in value:
                      found = True
              if not found:
                  ordering.append(dp1)
                  del dps[dps.index(dp1)]
                  count = maxcount
                  break
  
      if count == 0:
          raise SimBuildError(("Unable to find ordering for derived "
                               "parameter in component '{0}'").format(component))
  
      #return ordering + dvsnoexp
      return ordering