import networkx as nx import graphviz as gv import datetime # In[3]: # Funktionen werden hinzugeladen. from Parameter import Product, Resource, Capacity, Consumption, Revenue, Time, Prob, Against_Prob # In[4]: # Produkte products = Product(10) # Ressourcen resources = Resource(5) #Kapazität capacities = Capacity(resources) for h in resources[1:]: capacities[h] = 1 # Ressourcenverbrauch 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
import matplotlib.pyplot as plt import graphviz as gv import datetime # In[3]: # Funktionen werden hinzugeladen. from Parameter import Product, Resource, Capacity, Consumption, Revenue, Time, Prob, Against_Prob # In[4]: # Produkte products = Product(4) # Ressourcen resources = Resource(3) #Kapazität capacities = Capacity(resources) for h in resources[1:]: capacities[h] = 1 # Ressourcenverbrauch 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