I am building a model in AnyLogic where my Sprinter agent delivers incoming customer orders from the Depot agent to the Transshipment agent. The goal is to forward the customer order information to the transshipment so my vehicles can deliver these orders to the customers. To achieve this, I developed the following method in the “on arrival to target location” in the Sprinter:
void sendToTransshipment(Order orderFromSprinter, Transshipment transshipment) { transshipment.orderFromSprinter = order; send(order, transshipment); }
In my Sprinter agent, I have created a variable called order of type Order (agent) and a parameter called transshipment of type Transshipment (agent). Additionally, in the Transshipment agent, I have defined a public variable called orderFromSprinter.
Despite this setup, I am encountering numerous error messages. Could someone please help me understand why my code is not working and whether my approach is correct?
Thank you in advanced!
Sarah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.