INNER CODE UNIT · Python
Control
ikatsov/tensor-house · supply-chain/world_of_supply/world_of_supply_environment.py:68
class Control:
pass
def __init__(self, source, economy):
self.source = source
self.destination = None
self.path = None
self.location_pointer = 0
self.step = 0
self.payload = 0 # units
self.economy = economy
def schedule(self, world, destination, product_id, quantity):
self.destination = destination
self.product_id = product_id
self.requested_quantity = quantity
self.path = world.find_path(self.source.x, self.source.y, self.destination.x, self.destination.y)
if self.path == None: