简体   繁体   English

代理的具体到达时间

[英]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:总结一下:

  1. There is a single Source that reads the 'Orders' table for all customers有一个单一来源可以读取所有客户的“订单”表
  2. Each record has a field with 'customer id' so when agent gets created it has a property of which customer it belongs to每条记录都有一个带有“客户 ID”的字段,因此在创建代理时,它具有属于哪个客户的属性
  3. Source object feeds all new Order agents into an Exit object来源object 将所有新订单代理送入出口object
  4. Each Customer agent has an id and an Enter object每个客户代理都有一个 id 和一个Enter object
  5. Source 's Exit object contains code which finds Customer agent based on 'customer id' property and then calls customer.enter.take(agent) to send the Order agent into the right Customer agent SourceExit object 包含基于“客户 ID”属性查找客户代理的代码,然后调用customer.enter.take(agent)订单代理发送到正确的客户代理

More information about here: Enter and Exit .有关此处的更多信息: 进入退出

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将代理限制到特定的 GIS 区域? - How to constrain agents to a specific GIS Region? 在给定的到达和离开时间矩阵的情况下,计算出给定时间队列中的人数? - Coming up with the number of people in a queue at a given time, given matrices of arrival and departure times? 试图找到一种方法让代理保持网络徽标中的特定补丁 - Trying to find a way to keep agents to specific patches in net logo 如何根据条形图中的特定参数值对代理进行计数和说明? - How to count and illustrate agents based on specific parmeter values in bar charts? 我如何向居住在一个特定 GIS 区域的个人代理发送命令? 考虑有几个 GIS 区域 - How I can send command to the person agents living in one specific GIS region? Consider there are several GIS regions 由固定值定义的到达 - AnyLogic - Arrival defined by a fixed value - AnyLogic Simmer Get_attribute | 没有到达运行错误 - Simmer Get_attribute | there is no arrival running error Anylogic - 基于代理到达时间表的延迟长度 - Anylogic - Length of delay based on agent arrival schedule NetLogo代理迁移问题 - Problems with NetLogo agents movimentation 如何编码变化率不同的到达发生器 - How to code a arrival generator with a varying intensity rate
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM