设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3495|回复: 1

急需解决的问题

[复制链接]
发表于 2008-6-15 20:18:21 | 显示全部楼层 |阅读模式
5仿真币
问题:有两个暂存区a和b(分别只存放一种类型的临时实体),后面一个处理器,如何实现暂存区a中的临时实体优先进入处理器?请大伙儿帮忙解决一下

最佳答案

查看完整内容

如果只有两个暂存区的话,连接处理器第一个入口就是优先端口。如果是多个暂存区的话,可在处理器的Flow属性栏里,点击“Pull“选择钮,选择或自定义Pull方式。如果是某类FlowItem优先的话,可参照下列程序自定义。 treenode current = ownerobject(c); /**getitemtype*/ /** \nPull from the port with the longest queue.*/ treenode tempinobject; int curindex = 0; for(int index = 1; index ...
发表于 2008-6-15 20:18:22 | 显示全部楼层
如果只有两个暂存区的话,连接处理器第一个入口就是优先端口。如果是多个暂存区的话,可在处理器的Flow属性栏里,点击“Pull“选择钮,选择或自定义Pull方式。如果是某类FlowItem优先的话,可参照下列程序自定义。
treenode current = ownerobject(c);
/**getitemtype*/
/** \nPull from the port with the longest queue.*/
treenode tempinobject;
int curindex = 0;
for(int index = 1; index <= nrip(current); index++)
{
    tempinobject = inobject(current, index);
    if(getitemtype(rank(tempinobject,1))==2)
    {
       curindex = index;
    }
    else
    {
       curindex = 1;
     }   
}
return curindex;

Flexsim中国代理:北京创时能科技发展有限公司
电话:010-51288549
[url]www.csn-bj.com[/url]
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2024-3-29 05:49 , Processed in 0.012719 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表