sa = otlhs.SimulatedAnnealingLHS(lhsDesign, geomProfile, c2) tic = time.time() result = sa.generate() toc = time.time() dt1 = toc - tic print ("time=%f" % dt1) print ("dimension=%d, size=%d,sa=%s" % (dimension, size, sa)) print str(result.getOptimalValue()) + " c2=" + str(result.getC2()) + " phiP=" + str( result.getPhiP() ) + " minDist=" + str(result.getMinDist()) # plot design fig = PyPlotDesign(result.getOptimalDesign(), bounds, 10, 10, plot_kwargs={"color": "blue", "marker": "o", "ms": 6}) plt.suptitle("LHS design of size=%d - Optimization of %s criterion using geometric SA" % (size, c2.getName())) fig.savefig("lhs_sa_geom_%d.png" % size) plt.close(fig) crit = result.drawHistoryCriterion() proba = result.drawHistoryProbability() temp = result.drawHistoryTemperature() pp = PdfPages("small_OTLHS.pdf") # Criterion fig = View(crit, plot_kwargs={"color": "blue"}).getFigure() fig.savefig("crit_sa_geom.png") pp.savefig(fig) plt.close(fig) # Proba fig = View(proba, plot_kwargs={"marker": "o", "ms": 0.6}, axes_kwargs={"ylim": [-0.05, 1.05]}).getFigure() fig.savefig("lhs_c2_proba.png")