设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8810|回复: 9

[求助] 用AGV模板发生了以下错误,请解!

  [复制链接]
发表于 2011-11-5 16:38:28 | 显示全部楼层 |阅读模式
问题在哪里?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2011-11-14 10:37:54 | 显示全部楼层
没有解决,再顶一下。
 楼主| 发表于 2011-11-17 11:03:27 | 显示全部楼层
/* called by:        entrance ctrl of the object 'track') q/ o, M  \, B$ U5 ]. P
*/* c% `/ i$ d+ j+ [) A
is
! e. Z$ }( `' M( J0 B$ v        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: x+ ]% d8 @- h; H5 j$ mdo
: M# @% k( d$ E7 O. V        Lan := rootfolder.Internal.Tools.AOLlanguage;
" n5 i+ g0 L5 ?        if current = @.Destination -- else return7 p9 J) V% O2 j2 ~6 m3 d  ]8 f
        then9 q' \) R- U; g( k" f- r) d
                @.Destination := void;! Q1 A5 E4 F" o% \4 I/ T
                if @.occupied then
" I% l/ c" H2 H5 V  B                        part := @.cont;$ {# c3 [1 ^" M. i3 j% s0 b
                        @.transpOrder := void;
* W4 Z( u8 }% x8 c                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# {/ I7 T1 X$ ^9 W
                                @,root.eventcontroller.simTime);
4 j; i* z! l; }: v* l" s9 y                        @.HasOrder := false;$ ~2 t9 V# G) `/ Q5 I7 Y/ [
                        @.DrivingHome := true;4 v& ~, g# y8 _' Q; D: [$ M
                        rgManager.tryToStartTransOrder;
5 I9 C6 ~, G# G2 u                        if @.Destination = void6 s* H, t3 s. d8 c/ q
                        then -- no transport order for vehicle @
9 K4 \" k5 d2 ?1 t- l4 X                                @.Destination :=7 p( F( S7 b3 C  O* ~: G5 R
                                rgManager.nearestFreeStation(@,track.~);
. }/ v2 W4 t  `, M4 n9 H                                newDirection(@);   
( a& W4 _8 k5 T/ ^8 `                                if @.Destination /= void then; h& A1 q, \) q4 F; D+ F/ Z; \7 @8 Z
                                        @.Destination.NumReservation :=
+ q) z$ R, u' t0 N% j                                        @.Destination.NumReservation + 1;
) s" G6 i6 y- H( @                                end;% l7 T0 Y* C$ P# `* `$ R( }! T
                                @.CurrIcon := "drivingHome";
# n; O# b0 H) |( e: i6 k                                @.DrivingHome := true;
  {; `- s. C3 w: n! {' C$ z5 R- G                        end;
7 {! r2 [1 f) f$ f, Z0 o+ y, X                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 }8 u4 n( y; n                        part := @.transpOrder;
  F' v+ ^! U2 J$ [9 R, |  e                        part.move(@);-- load part# |! J( [. z" _+ f. l
                        @.CurrIcon := "load";# I' h4 @. z0 ~1 }( _9 v! |
                        GlobalDistObj := part.globDestination;
  s$ _/ t: ]) Y: }- E: P% V                        assignLObj := rgmanager.rgAssignL;
. @( @: @& U- w. o7 v4 [" S; {                        row := assignLObj.getRowNo(GlobalDistObj);
# W& U8 [* \- ^5 h* ?0 e                        if Row = -1 then -- since 70
) r0 n4 R) V, j                                if lan=1 then8 Q' x( a! {" E! t
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ Z) x$ y; o; j                                                to_str("in der Andockstation: \"",?.~.name,"\""));
/ y% L6 s. t; Z( k! a- a& @                                else# \7 l4 W9 F* _" X# |; q* z
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 e6 b% n& M. f' j' p3 ?
                                                to_str("in docking station: \"",?.~.name,"\""));                               
: \/ M1 O1 M3 F2 \4 V                                end;( P7 B. B; z+ N
                        else6 ^* a1 S+ A: i: X. k% }
                                @.Destination := assignLObj[1,row];
4 t( V- ?, g2 W& n& ?# L7 @- W                        end;                        : R# j% @) K0 g& M" T
                        newDirection(@);
) h# a6 Q3 A$ N' q, i                        @.HasOrder := true;
. P) E( a- L) c( ]' z5 @) o                end;9 b5 L* D2 y5 C3 y7 \9 q
        end;& D" g! F& ?7 L9 C+ a
end;        -- of the method5 o$ x3 M1 S5 e% B; W8 I: a. ^7 V
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 L7 w" k5 |) M( @! B
* x7 }( C' H- I% h) h- x这是AGV_putin中arrive的method。& H; a" v, y: Q$ S1 O3 r( |

2 F6 N# Z5 v% F( a6 Y+ C! K当到达物料速度越高时,这个报警更多,
# ^0 n' l  M! x9 d) h- g可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
& l: \0 z' n+ U程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% K) b6 ?6 S) C$ V
" s+ E* ^$ C: F% \另外一个小建议,就是move,所有的move都可以这样# g2 V" A) s7 ]8 P. O: \0 ]
if not move() then debug end
' ~- W% ?$ K1 {6 N4 y4 r( A这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
+ b9 T; v5 x* r( W. u! ?" Y2 J! bplant simulation中的free libraries有AGV模板,
$ _! b0 t4 e0 n! N, v. y里面也有案例。
3 e* j+ q" r1 H7 o/ ^) M8 w我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ e/ u8 T/ X: h  A- [% a0 U9 u' }9 M, O8 u- E: `' A& O6 |: A; M* j/ j) h
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& e/ e. Y' h/ k9 i; E5 S
9 O% V7 I% ^1 v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" P: `( A5 R3 o! z这是AGV_putin中arrive的method。/ M1 W. `, z! Q
" J, J5 E, c5 p! g% a7 }( y
当到达物料速度越高时,这个报警更多,

5 O" u; I' Z8 V7 n另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-27 17:08 , Processed in 0.017090 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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