INNER CODE UNIT · Python
step_balance_sheet
ikatsov/tensor-house · supply-chain/world_of_supply/world_of_supply_environment.py:64
def step_balance_sheet(self, transport):
return BalanceSheet(0, -transport.payload * self.unit_transport_cost * abs(transport.step))
@dataclass
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