Exemple #1
0
consumtions = Consumption(products, resources)
index = 0
for j in range(1, len(products), 2):
    consumtions[j][1 + index] = 1
    consumtions[j + 1][1 + index] = 1
    index = index + 1
del index

# Erträge
revenues = Revenue(products)
for j in range(1, len(products), 2):
    revenues[j] = 100
    revenues[j + 1] = 1000

# Buchungsperioden
times = Time(100)

# Normalverteilung
from scipy.stats import norm

# Wahrscheinlichkeiten
probs = Prob(products, times)
probs[1][81:101] = np.linspace(0.3, 0, 20)
probs[2][81:101] = np.linspace(0.3, 0, 20)
probs[3][61:101] = np.linspace(0.3, 0, 40)
probs[4][61:101] = np.linspace(0.3, 0, 40)
probs[5][41:61] = np.linspace(0.3, 0, 20)
probs[6][41:61] = np.linspace(0.3, 0, 20)
probs[7][21:81] = np.linspace(0.3, 0, 60)
probs[8][21:81] = np.linspace(0.3, 0, 60)
probs[9][1:41] = np.linspace(0.3, 0, 40)
Exemple #2
0
consumtions = Consumption(products, resources)
index = 0
for j in range(1, len(products), 2):
    consumtions[j][1 + index] = 1
    consumtions[j + 1][1 + index] = 1
    index = index + 1
del index

# Erträge
revenues = Revenue(products)
for j in range(1, len(products), 2):
    revenues[j] = 100
    revenues[j + 1] = 1000

# Buchungsperioden
times = Time(30)

# Normalverteilung
from scipy.stats import norm

# Wahrscheinlichkeiten
probs = Prob(products, times)
probs[1][1:16] = 0.2
probs[2][1:16] = 0.2
probs[3][1:] = 0.2
probs[4][1:] = 0.2

# Gegenwahrscheinlichkeiten
against_probs = Against_Prob(probs)
probs[0] = against_probs