Example #1
0
        #llfSmart
        llfSmartRate = llfSmart.simulateLLF( simulationInterval )
        individualRates.append( llfSmartRate )
        llfSmartACRate = llfSmartAC.simulateLLF( simulationInterval )
        individualRates.append( llfSmartACRate )

        #llfSimple
        llfSimpleRate = llfSimple.simulateLLFSimple( simulationInterval )
        individualRates.append( llfSimpleRate )
        llfSimpleACRate = llfSimpleAC.simulateLLFSimpleAC( simulationInterval )
        individualRates.append( llfSimpleACRate )

        #dsac
        dsacRate = dsac.simulateDSAC( simulationInterval )
        individualRates.append( dsacRate )

        for index, rate in enumerate(individualRates):
            averageRates[index] += rate

    for n in range( len(averageRates) ):
        averageRates[n] /= ( numRunsPerIteration * 1.0 )

    simulationData.append( [arrivalRate] + averageRates)
    arrivalRate += (maxArrivalRate / numIterations)

    if i % 10 == 0:
        print "iteration: " , i, " arrival rate: ", arrivalRate
        print averageRates

csvGen.exportSimulationDataToCSV( simulationData )
Example #2
0
    
    for n in range( len( averageRates ) ):
        averageRates[ n ] /= ( numRunsPerIteration * 1.0 )

    for n in range( len( averageRatesWithDeclined ) ):
        averageRatesWithDeclined[ n ] /= ( numRunsPerIteration * 1.0 )

    for n in range( len( averageProfits ) ):
        averageProfits[ n ] /= ( numRunsPerIteration * 1.0 )

    for n in range( len( averageElapsedTimes ) ):
        averageElapsedTimes[ n ] /= ( numRunsPerIteration * 1.0 )

    simulationSuccessData.append( [ arrivalRate ] + averageRates )
    simulationSuccessDataWithDeclined.append( [ arrivalRate ] + averageRatesWithDeclined )
    simulationProfitData.append( [ arrivalRate ] + averageProfits )
    simulationElapsedTimeData.append( [ arrivalRate ] + averageElapsedTimes )

    arrivalRate += arrivalStep

    if i % 10 == 0:
        print "iteration: " , i, " arrival rate: ", arrivalRate
        print "averageRates: ", averageRates
        print "averageRatesWithDeclined", averageRatesWithDeclined
        print "averageProfits: ", averageProfits

csvGen.exportSimulationDataToCSV( simulationSuccessData , "Success" )
csvGen.exportSimulationDataToCSV( simulationSuccessDataWithDeclined , "Success With Declines" )
csvGen.exportSimulationDataToCSV( simulationProfitData , "Profits" )
csvGen.exportSimulationDataToCSV( simulationElapsedTimeData , "Elapsed Time" )
Example #3
0
        averageRates[n] /= (numRunsPerIteration * 1.0)

    for n in range(len(averageRatesWithDeclined)):
        averageRatesWithDeclined[n] /= (numRunsPerIteration * 1.0)

    for n in range(len(averageProfits)):
        averageProfits[n] /= (numRunsPerIteration * 1.0)

    for n in range(len(averageElapsedTimes)):
        averageElapsedTimes[n] /= (numRunsPerIteration * 1.0)

    simulationSuccessData.append([arrivalRate] + averageRates)
    simulationSuccessDataWithDeclined.append([arrivalRate] +
                                             averageRatesWithDeclined)
    simulationProfitData.append([arrivalRate] + averageProfits)
    simulationElapsedTimeData.append([arrivalRate] + averageElapsedTimes)

    arrivalRate += arrivalStep

    if i % 10 == 0:
        print "iteration: ", i, " arrival rate: ", arrivalRate
        print "averageRates: ", averageRates
        print "averageRatesWithDeclined", averageRatesWithDeclined
        print "averageProfits: ", averageProfits

csvGen.exportSimulationDataToCSV(simulationSuccessData, "Success")
csvGen.exportSimulationDataToCSV(simulationSuccessDataWithDeclined,
                                 "Success With Declines")
csvGen.exportSimulationDataToCSV(simulationProfitData, "Profits")
csvGen.exportSimulationDataToCSV(simulationElapsedTimeData, "Elapsed Time")
Example #4
0
        #llfSmart
        llfSmartRate = llfSmart.simulateLLF(simulationInterval)
        individualRates.append(llfSmartRate)
        llfSmartACRate = llfSmartAC.simulateLLF(simulationInterval)
        individualRates.append(llfSmartACRate)

        #llfSimple
        llfSimpleRate = llfSimple.simulateLLFSimple(simulationInterval)
        individualRates.append(llfSimpleRate)
        llfSimpleACRate = llfSimpleAC.simulateLLFSimpleAC(simulationInterval)
        individualRates.append(llfSimpleACRate)

        #dsac
        dsacRate = dsac.simulateDSAC(simulationInterval)
        individualRates.append(dsacRate)

        for index, rate in enumerate(individualRates):
            averageRates[index] += rate

    for n in range(len(averageRates)):
        averageRates[n] /= (numRunsPerIteration * 1.0)

    simulationData.append([arrivalRate] + averageRates)
    arrivalRate += (maxArrivalRate / numIterations)

    if i % 10 == 0:
        print "iteration: ", i, " arrival rate: ", arrivalRate
        print averageRates

csvGen.exportSimulationDataToCSV(simulationData)