Created
February 11, 2020 15:57
-
-
Save ikatsov/3656ebceafe715ff7f6282621fe35e43 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SupplyChainEnvironment(object): | |
| def __init__(self): | |
| self.T = 26 # Episode duration | |
| self.warehouse_num = 3 | |
| self.d_max = 5 # Maximum demand, units | |
| self.d_var = 2 # Maximum random demand variation, units | |
| self.unit_price = 100 # Unit price in dollars | |
| self.unit_cost = 40 # Unit cost in dollars | |
| self.storage_capacities = np.fromfunction(lambda j: 10*(j+1), | |
| (self.warehouse_num + 1,)) | |
| # Storage costs at the factory and each warehouse, dollars per unit | |
| self.storage_costs = np.fromfunction(lambda j: 2*(j+1), (self.warehouse_num + 1,)) | |
| # Transportation costs for each warehouse, dollars per unit | |
| self.transporation_costs = np.fromfunction(lambda j: 5*(j+1), (self.warehouse_num,)) | |
| self.penalty_unit_cost = self.unit_price |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment