コード例 #1
0
def testNode(node, outputPath, simulationPath, iter):
  numIterations = 4
  files = []
  for i in range(numIterations):
    newSeed(node, simulationPath)
    savePath = outputPath + "/" + str(iter) + "-" + str(i)
    command = environ["PREFIX_CC3D"] + "/compucell3d.bat --exitWhenDone -i " + simulationPath + "/simulation.cc3d -o " + savePath
    #print(command)
    invokeCommand(command)
    files.append(max(getFiles(savePath), key=os.path.getmtime))
  return (setComplexity.setComplexity(files, path), files[0])
コード例 #2
0
def testNode(node, path, first, second):
  numIterations = 4
  files = []
  for i in range(numIterations):
    newSeed(node)
    outputPath = path + "/" + str(first) + "-" + str(second) + "_" + str(i)
    command = "C:/CompuCell3D/compucell3d.bat --exitWhenDone -i C:/Dev/CS6600/Project/Test/Test.cc3d -o " + outputPath
    subprocess.call(command)
    print(command)
    files.append(max(getFiles(), key=os.path.getmtime))
  return setComplexity.setComplexity(files, path)
コード例 #3
0
  best2 = 0
  best3 = 0
  best4 = 0
  best5 = 0
  testoutput = open(path + "/complexityTest.txt", "w")

  iteration = 0
  files = glob.glob(path + "/" + str(iteration) + "-*/*.png")
  while len(files) > 0:
    files.sort(key=os.path.getmtime)
    print(files)
    #complexity1 = setComplexity.setComplexityPng(files, path)
    #complexity2 = setComplexity.setComplexityBz2(files, path)
    #complexity3 = setComplexity.setComplexityJpeg(files, path)
    #complexity4 = setComplexity.setComplexitySimple(files, path)
    complexity5 = setComplexity.setComplexity(files, path)
    #if (complexity1 > best1):
    #  best1 = complexity1
    #  shutil.copyfile(files[0], path + "/BestPngTest.png")
    #if (complexity2 > best2):
    #  best2 = complexity2
    #  shutil.copyfile(files[0], path + "/BestBz2Test.png")
    #if (complexity3 > best3):
    #  best3 = complexity3
    #  shutil.copyfile(files[0], path + "/BestJpegTest.png")
    #if (complexity4 > best4):
    #  best4 = complexity4
    #  shutil.copyfile(files[0], path + "/BestSimpleTest.png")
    if (complexity5 > best5):
      best5 = complexity5
      shutil.copyfile(files[0], path + "/BestGrayTest.png")