[英]Specific arrival times for agents
I have am model which simulates a distribution network.我有模拟配电网络的 model。 I have a population of agents (customers), develop from a database (address -> Gis Location and the order time) Also I have a order agent, which has a parameter "customer" I have a source in the customer agent to generate orders and the code at source exit: agent.customer = this;
我有一群代理(客户),从数据库开发(地址-> Gis 位置和订单时间)我还有一个订单代理,它有一个参数“客户”我在客户代理中有一个源来生成订单和源出口处的代码: agent.customer = this;
In the source I've set Arrival deffined by: Arrival table in Database and refer to the customer -> order time.在源代码中,我将 Arrival 定义为:Database 中的 Arrival table 并参考客户 -> 订单时间。 My problem is, that I currently generating in every source of this population every order.我的问题是,我目前在这个人口的每个来源中生成每个订单。 How can I set up the source/model, that I generate at a specifc customer only the orders from this one?如何设置源/模型,在特定客户处仅生成来自该客户的订单?
Unfortunately, a Source object can only ingest the whole table and there is not function to filter records.不幸的是,一个Source object 只能摄取整个表,并且没有 function 来过滤记录。 One way to go about partitioning Order agents is by creating all of them in a single source somewhere in the model and then using Exit to send them to an Enter object within a specific Customer agent. go 关于分区订单代理的一种方法是在 model 某处的单个源中创建所有它们,然后使用Exit将它们发送到特定客户代理中的Enter object。 To summarise:总结一下:
customer.enter.take(agent)
to send the Order agent into the right Customer agent Source的Exit object 包含基于“客户 ID”属性查找客户代理的代码,然后调用customer.enter.take(agent)
将订单代理发送到正确的客户代理More information about here: Enter and Exit .有关此处的更多信息: 进入和退出。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.