コード例 #1
0
def variableCostSum(components, t):
    # Name, q, e for each component. If c==0: calc cost from learning curve
    var_comp = [(name, q, e) for name, q, c, e, _ in components if c == 0]
    # Collections of components modelled usin ELC
    lcurveComps = lcurveConf()
    costs = []
    for name, q, e in var_comp:
        colname = lcurveComps[name]
        cost_t = collectionCurve(colname, t)
        costs.append((cost_t, q))
    return sum([c * q for c, q in costs])
コード例 #2
0
ファイル: costmodel.py プロジェクト: audunfo/LICAT
def variableCostSum(components,t):
        # Name, q, e for each component. If c==0: calc cost from learning curve
    var_comp = [ (name,q,e) for name, q, c,e,_ in components if c == 0]
        # Collections of components modelled usin ELC
    lcurveComps = lcurveConf()
    costs = []
    for name,q,e in var_comp:
        colname = lcurveComps[name]
        cost_t = collectionCurve(colname, t)
        costs.append((cost_t,q))
    return sum([c*q for c,q in costs])
コード例 #3
0
def variableCostList(components, t):
    var_comp = [(name, q, e, l) for name, q, c, e, l in components if c == 0]
    # Collections of components modelled usin ELC
    lcurveComps = lcurveConf()
    costs = {}
    for name, q, e, l in var_comp:
        costs[name] = []
        colname = lcurveComps[name]
        for n in range(t):
            cost_n = collectionCurve(colname, n)
            costs[name].append((n, cost_n, q, l))
    return costs
コード例 #4
0
ファイル: costmodel.py プロジェクト: audunfo/LICAT
def variableCostList(components,t):
    var_comp = [ (name,q,e,l) for name, q, c,e,l in components if c == 0]
          # Collections of components modelled usin ELC
    lcurveComps = lcurveConf()
    costs = {}
    for name,q,e,l in var_comp:
        costs[name] =[]
        colname = lcurveComps[name]
        for n in range(t):
            cost_n = collectionCurve(colname, n)
            costs[name].append((n,cost_n,q,l))
    return costs
コード例 #5
0
def maintenenceCost(components, hrs):
    m_data = [(name, q, c, l) for name, q, c, e, l in components]
    lcurveComps = lcurveConf()
    result = []

    for name, q, c, l in m_data:
        ltmp = l
        h = 0
        print "-- > " + name + "< --"
        print "component length: " + str(len(components))
        for h in range(hrs):
            if h >= l:
                if c == 0:
                    colname = lcurveComps[name]
                    c = collectionCurve(colname, hoursInYears(h))
                y = hoursInYears(h)
                print y
                result.append((name, y, h, q, c))
                l += ltmp
    return result
コード例 #6
0
ファイル: costmodel.py プロジェクト: audunfo/LICAT
def maintenenceCost(components,hrs):
    m_data     = [(name,q,c,l) for name,q,c,e,l in components]
    lcurveComps = lcurveConf()
    result     = []
    
    for name,q,c,l in m_data:
        ltmp = l
        h=0
        print "-- > "+name+"< --"
        print "component length: " + str(len(components))
        for h in range(hrs):       
            if h>=l:
                if c==0:
                    colname = lcurveComps[name]
                    c = collectionCurve(colname,hoursInYears(h))
                y = hoursInYears(h)
                print y
                result.append((name,y,h,q,c))
                l += ltmp
    return result