+
+ if k == itermax:
+ print "nbre d'iteration trop grand"
+ print "init"
+ print init
+ sy.exit(1)
+
+ print "###############"
+ print k
+ print "###############"
+ m += [k]
+
+ print (min(m),max(m),float(sum(m))/nbexp,m),m
+
+
+
+def __une_seule_exp__(fichier_donees):
+ global u, v, la, w, theta , q, Ps, Rh, eta, x, valeurFonctionDuale
+ initialisation()
+
+
+ fichier = open(fichier_donees, "r")
+ instructions ={}
+ for line in fichier:
+ l = line.split("=")
+ instructions[l[0]] = eval(l[1])
+ u, v, la, w, q, Ps, Rh, eta, x, = instructions['u'], instructions['v'], instructions['la'], instructions['w'], instructions['q'], instructions['Ps'], instructions['Rh'], instructions['eta'], instructions['x']
+ nbexp = 1
+ res = {}
+ m = []
+ itermax = 100000
+
+ def __maj_theta(k):
+ om = omega/(mt.pow(k,0.75))
+ return om
+ for idxexp in range(nbexp):
+ mxg = 0
+ k = 1
+ arret = False
+ sm = 0
+ while k < itermax and not arret :
+ (u,v,la,w,theta,eta,q,Ps,Rh,x,valeurFonctionDuale,ar,mxg,smax)=maj(k,__maj_theta,mxg,idxexp)
+ errorq = (max(q.values()) - min(q.values()))/min(q.values())
+ arret = errorq < error
+ k+=1
+ variation = "+" if smax > sm else "-"