def order_derived_parameters(component):
    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:
            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