Exemplo n.º 1
0
def BestHR(fcastRev, totCycles):
    '''Returns the Best Case HR Decisions.'''
    # CFO ?
    cfoCt = 1 if fcastRev > 1500000 else 0
    # Head of Marketing ?
    headMktgCt = 1 if fcastRev > 1500000 else 0
    # Sales Representatives
    if fcastRev >= 3000000:
        salesRepCt = X_utilities.roundup(fcastRev / 3000000.0)
    else:
        salesRepCt = 0
    # Customer Service ?
    custServCt = 1 if fcastRev > 4500000 else 0
    # Drivers
    if totCycles > 0:
        driverCt = X_utilities.roundup((totCycles * 100000) / 1800000.0)
    else:
        driverCt = 0
    # Quality Control Specialist ?
    qualityCtrlCt = 1 if totCycles > 20 else 0
    # Brewers
    if totCycles > 20:
        brewerCt = X_utilities.roundup(totCycles / 20.0)
    else:
        brewerCt = 0
    # Packager ?
    packagerCt = 1 if totCycles > 1 else 0
    # Cleaners
    if totCycles / 30.0 > 1:
        cleanerCt = int(totCycles / 30.0)
    else:
        cleanerCt = 0
    
    workerCt = brewerCt + packagerCt + driverCt + cleanerCt
    # Managers 
    if workerCt > 0 and workerCt <= 5:
        managerCt = 1
    elif workerCt > 5:
        managerCt = 1 + int(workerCt / 5.0)
    else:
        managerCt = 0
    # Assistant Managers
    if workerCt > 10:
        asstManagerCt = X_utilities.roundup(workerCt / 10.0)
    else:
        asstManagerCt = 0
    
    return [1, cfoCt, managerCt, asstManagerCt, headMktgCt,
              salesRepCt, custServCt, qualityCtrlCt, brewerCt,
              packagerCt, driverCt, cleanerCt]
Exemplo n.º 2
0
    def RawMatRent(self, maxCapacity, year):
        """Gets the sq. ft. needed for raw materials, 
        the price per sq. ft., and the annual rent."""
        sqFeetNeeded = int(X_utilities.roundup(maxCapacity / 12.0 / 2.0) * 100000.0 / 16.0)
        if sqFeetNeeded < 5000:
            sqFeetNeeded = 5000
        pricePerFoot = self.PriceFoot(year)
        annualRent = int(sqFeetNeeded * pricePerFoot)

        self.feetRM_st.SetLabel(format(sqFeetNeeded, ",d"))
        self.perFootRM_st.SetLabel("$ %.2f" % (pricePerFoot,))
        self.rentRM_st.SetLabel("$ " + format(annualRent, ",d"))