Ejemplo n.º 1
0
def launchSingleMarxanAnalysis(setupObject, numIter, numRun, blmValue, missingProp, initialProp, outputName, extraOutputsBool):
    marxanInputDict = cluz_functions2.marxanInputDict(setupObject, numIter, numRun, blmValue, missingProp, initialProp, outputName, extraOutputsBool)
    cluz_functions2.makeMarxanInputFile(setupObject, marxanInputDict)
    marxanBatFileName = cluz_functions2.makeMarxanBatFile(setupObject)
    subprocess.Popen([marxanBatFileName])
    cluz_functions2.waitingForMarxan(setupObject, outputName)
    bestOutputFile = setupObject.outputPath + os.sep + outputName + "_best.txt"
    summedOutputFile = setupObject.outputPath + os.sep + outputName + "_ssoln.txt"

    return bestOutputFile, summedOutputFile
Ejemplo n.º 2
0
def launchMultiMarxanAnalysis(setupObject, numIter, numRun, blmValue, missingProp, initialProp, outputName, extraOutputsBool, numParallelAnalyses):
    parallelAnalysesDetailsList = cluz_functions2.makeParallelAnalysesDetailsList(numParallelAnalyses, outputName, numRun)
    for (numRun, parallelOutputName) in parallelAnalysesDetailsList:
        marxanInputDict = cluz_functions2.marxanInputDict(setupObject, numIter, numRun, blmValue, missingProp, initialProp, parallelOutputName, extraOutputsBool)
        cluz_functions2.makeMarxanInputFile(setupObject, marxanInputDict)
        marxanBatFileName = cluz_functions2.makeMarxanBatFile(setupObject)
        subprocess.Popen([marxanBatFileName])
        time.sleep(2)

    cluz_functions2.waitingForParallelMarxan(setupObject, parallelAnalysesDetailsList)

    cluz_functions2.makeBestParralelFile(setupObject, outputName, parallelAnalysesDetailsList)
    bestOutputFile = setupObject.outputPath + os.sep + outputName + "_best.txt"

    cluz_functions2.makeSummedParralelFile(setupObject, outputName, parallelAnalysesDetailsList)
    summedOutputFile = setupObject.outputPath + os.sep + outputName + "_ssoln.txt"

    return bestOutputFile, summedOutputFile
Ejemplo n.º 3
0
def runCalibrateMarxan(setupObject, numAnalyses, numRunList, numIterList, blmValueList, outputNameBase, resultPathText):
    missingPropList = [1.0] * numAnalyses
    initialPropList = [0.2] * numAnalyses
    calibrateResultsDict = {}
    for analysisNumber in range(0, numAnalyses):
        numIter = numIterList[analysisNumber]
        numRun = numRunList[analysisNumber]
        blmValue = blmValueList[analysisNumber]
        missingProp = missingPropList[analysisNumber]
        initialProp = initialPropList[analysisNumber]
        outputName = outputNameBase + str(analysisNumber + 1)
        extraOutputsBool = True
        marxanInputDict = cluz_functions2.marxanInputDict(setupObject, numIter, numRun, blmValue, missingProp, initialProp, outputName, extraOutputsBool)
        cluz_functions2.makeMarxanInputFile(setupObject, marxanInputDict)
        marxanBatFileName = cluz_functions2.makeMarxanBatFile(setupObject)
        subprocess.Popen([marxanBatFileName])
        time.sleep(2)
        cluz_functions2.waitingForMarxan(setupObject, outputName)

        calibrateResultsDict[analysisNumber] = cluz_functions2.makeAnalysisResultsDict(setupObject, marxanInputDict)

    cluz_functions2.makeCalibrateOutputFile(resultPathText, calibrateResultsDict)