mardi 26 juin 2018

Want to get maximum values from output and apply them to equation

Input code is:

# Input data:
S = pd.S = 2000 # Saturation flow
L = pd.L = 5 # Lost time
eb = pd.eb = 1000 
wb = pd.wb = 600
sb = pd.sb = 400
nb = pd.nb = 500

# a) C_min = Minimum cycle length calculation
Y_eb = pd.Y_eb = eb / S
Y_wb = pd.Y_wb = wb / S
Y_sb = pd.Y_sb = sb / S
Y_nb = pd.Y_nb = nb / S
Y_eb_wb_sb_nb = [Y_eb,Y_wb,Y_sb,Y_nb]
Y_eb_wb_sb_nb

Output:

[0.5, 0.3, 0.2, 0.25]

Then

if Y_eb > Y_wb:
print(C_min = L / 1 - (Y_eb + Y_wb))

I want to:

Get maximum values from (Y_eb;Y_wb) and (Y_sb;Y_nb) and apply these values to formula:

C_min = L / (1- [max of (Y_eb;Y_wb)] + [max of (Y_sb;Y_nb)])

Aucun commentaire:

Enregistrer un commentaire