简体   繁体   English

如何不占用不需要的资源单元?

[英]How to don’t seize resource units that are not needed?

I'm simulating an unloading process of a ship.我正在模拟一艘船的卸货过程。 The complete unloading of the ship can be perfectly done with only two resources making round trips (load, move to destination, unload, go back to loading) and the ship would never be idle waiting for trucks to load.只需两个资源往返(装载、移动到目的地、卸载、go 返回装载)即可完美地完成船舶的完全卸载,并且船舶永远不会闲置等待卡车装载。

I need to demonstrate that if I increase the number of resource units (trucks) to 3, the third one will never be seized because it's not needed, the problem is that the seize block seizes all units evenly, so at the end, all units end up with a utilization percentage greater than 0.我需要证明,如果我将资源单元(卡车)的数量增加到 3,第三个将永远不会被占用,因为它不需要,问题是占用块平均占用所有单元,所以最后,所有单元最终利用率百分比大于 0。

How can I configure the seize block to only use the needed resources and leave the “excess” units with utilization of zero?如何将占用块配置为仅使用所需的资源而使“多余”单元的利用率为零?

(The real model by default will have many resources available, and ships could need more than two trucks. What I want with this is to determine the best amount of resources needed). (默认情况下,真正的 model 将有许多可用资源,并且船舶可能需要两辆以上的卡车。我想要的是确定所需的最佳资源量)。

Thank you.谢谢你。

In the ResourcePool there is an options Customize request choice which when set to True will allow Request choice condition function to be created.ResourcePool中有一个Customize request choice ,当设置为 True 时,将允许创建Request choice condition function。 There it is possible to make sure that the resources taken first are the ones with utilisation > 0. If your assumption is correct then the 3rd truck will never be taken.可以确保首先占用的资源是利用率> 0的资源。如果您的假设是正确的,那么将永远不会占用第三辆卡车。

you just need to run two experiments.你只需要运行两个实验。 One with 2 trucks and another with three.一个有 2 辆卡车,另一个有 3 辆。 Then compare them in terms of ship waiting time and truck pool utilization.然后在船舶等待时间和卡车池利用率方面进行比较。

I solved the question in a very easy way:我以一种非常简单的方式解决了这个问题:

In the Seize block use the option "Customize Resource Choice" with "Resource selection" equal to "Units with top rating" and "Unit rating" = unit.getUtilization().在 Seize 块中,使用选项“自定义资源选择”,“资源选择”等于“具有最高评级的单位”和“单位评级”= unit.getUtilization()。

In the way, Anylogic sorts the idle resources by utilization rating and chooses the most utilized resource, this means that unneeded resources will never be seized.顺便说一句,Anylogic按照利用率等级对空闲资源进行排序,选择利用率最高的资源,这意味着永远不会占用不需要的资源。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM