
| Current Path : /home/cgabriel/20_dev/12_procpy/dataninja/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //home/cgabriel/20_dev/12_procpy/dataninja/LEAN.py |
def wertstrom (obj):
V = vars(obj)
G = obj.APP.g
if not 'BLOCK' in V or obj.BLOCK == None:
return()
B = obj.BLOCK
try: float(G["WAIT_"+B])
except: G["WAIT_"+B] = V["BESTAND"] * V["BEARB"]
try: float(V["WARTEZEIT"])
except: V["WARTEZEIT"] = 0.0
try: float(V["BEARBZEIT"])
except: V["BEARBZEIT"] = 0.0
V["WAIT_"+B] = G["WAIT_"+B]
V["WARTEZEIT"] += V["WAIT_"+B]
V["BEARBZEIT"] += V["BEARB"]
V["DURCHLAUFZEIT"] = V["WARTEZEIT"] + V["BEARBZEIT"]
V["FLUSSGRAD"] = float( "%4.2f" % (V["DURCHLAUFZEIT"] / V["BEARBZEIT"]) )
V["EFFIZIENZ"] = float( "%4.3f" % (V["BEARBZEIT"] / V["DURCHLAUFZEIT"]) )
V["BESTAND_"+B] = float( "%2.1f" % ( V["WAIT_"+B] / V["BEARB"] ) )
G["WAIT_"+B] = G["WAIT_"+B] + max(0.0,V["BEARB"] - V["TAKTZEIT"])
del B,V,G
#***************************************************************************
def supermarkt (obj,ganzzahlig=True):
V = vars(obj)
G = obj.APP.g
if not 'BLOCK' in V or obj.BLOCK == None:
return()
B = obj.BLOCK
try: float(G["BESTAND_"+B])
except: G["BESTAND_"+B] = V["BESTAND"]
try: float(G["SUPERMARKT_"+B])
except: G["SUPERMARKT_"+B] = V["SUPERMARKT"]
try: float(V["WARTEZEIT"])
except: V["WARTEZEIT"] = 0.0
try: float(V["BEARBZEIT"])
except: V["BEARBZEIT"] = 0.0
try: float(V["MINSUP"])
except: V["MINSUP"] = 0.0
try: float(V["MAXSUP"])
except: V["MAXSUP"] = 0.0
V["BESTAND_"+B] = float( "%3.2f" % G["BESTAND_"+B] )
V["SUPERMARKT_"+B] = float( "%3.2f" % G["SUPERMARKT_"+B] )
V["WAIT_"+B] = V["BEARB"] * max(0.0,V["BESTAND_"+B] - V["SUPERMARKT_"+B])
V["WARTEZEIT"] += V["WAIT_"+B]
V["BEARBZEIT"] += V["BEARB"]
V["DURCHLAUFZEIT"] = V["WARTEZEIT"] + V["BEARBZEIT"]
V["FLUSSGRAD"] = float( "%4.2f" % (V["DURCHLAUFZEIT"] / V["BEARBZEIT"]) )
V["EFFIZIENZ"] = float( "%4.3f" % (V["BEARBZEIT"] / V["DURCHLAUFZEIT"]) )
supermarktentnahme = max(0.0,G["SUPERMARKT_"+B]-V["MINSUP"])
if ganzzahlig:
supermarktentnahme = int(supermarktentnahme)
produktion = V["TAKTZEIT"] / V["BEARB"]
gesamt = supermarktentnahme + produktion - 1.0
if gesamt > 0.0:
G["SUPERMARKT_"+B] = min(G["SUPERMARKT_"+B]+gesamt,V["MAXSUP"])
else:
G["BESTAND_"+B] -= gesamt
del V["MINSUP"], V["MAXSUP"]
del B,V,G