设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5892|回复: 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'* l: v) h" F$ ^; E% m; v
*/2 f- P: G, G" ]: n
is
! \6 B9 X7 j1 T        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; w4 D% s9 j" V: w" cdo. e  X% x+ _) Y( q
        Lan := rootfolder.Internal.Tools.AOLlanguage;9 H# s; h" h: E# D
        if current = @.Destination -- else return
5 q* A; s2 x! d4 O        then" }& k( t- U+ }, q) I, q3 Q
                @.Destination := void;( B# B- y; ], B3 U+ Z: z
                if @.occupied then
: L. O* N8 \" I+ f                        part := @.cont;, I1 v3 [" Q+ I. `& F9 I) E
                        @.transpOrder := void;# P( W! n% U4 A5 y5 a" X
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# n& W  M; q, H                                @,root.eventcontroller.simTime);
6 g  T5 s! x7 r/ S                        @.HasOrder := false;
. L0 U; I& ~3 k: J$ i" U                        @.DrivingHome := true;
5 _& E+ _( l  P' K! p3 a                        rgManager.tryToStartTransOrder;/ D- m* c1 u6 ?# `+ a* w
                        if @.Destination = void' G% ]% o, B: Y7 k
                        then -- no transport order for vehicle @/ d8 \) P  i  I' X5 t/ ?1 V& {; J
                                @.Destination :=
* i1 t4 `& J; S) J; z+ w* T  v                                rgManager.nearestFreeStation(@,track.~);
3 y  y7 E0 Q7 o% G" i, r- z# s, A                                newDirection(@);   0 c' b! Y  j/ e# _: u
                                if @.Destination /= void then% J6 O- W) O% M7 Y' b) |
                                        @.Destination.NumReservation :=
/ e7 ]/ N) k/ c. c1 I) {# V                                        @.Destination.NumReservation + 1;
4 r7 q0 U* |: @9 p  j5 j$ y' j5 o  ~                                end;
  L7 N$ a, \0 H* L# b# @                                @.CurrIcon := "drivingHome";$ H$ z) `  c+ B. q$ o  u# V
                                @.DrivingHome := true;: N1 y8 Z! t5 c  l! L! O! s; t
                        end;
7 D( n( K4 v7 M' o( U/ S                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% e4 }0 x/ Y0 t! @: B                        part := @.transpOrder;" s4 f, q- ^% n* M* L
                        part.move(@);-- load part
# C. e2 a+ V* e" d" E" r                        @.CurrIcon := "load";' s0 V. l. h  g, n* |
                        GlobalDistObj := part.globDestination;. l; y9 V+ m/ |: W! s# p0 ~2 F1 `
                        assignLObj := rgmanager.rgAssignL;
0 h1 O2 |) Q* I) ~# v                        row := assignLObj.getRowNo(GlobalDistObj);
$ h9 {% @$ G5 L+ x                        if Row = -1 then -- since 70
3 M' C, W" ^  l( }, P                                if lan=1 then
4 H! ]6 c1 C5 f- b                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 E! B5 E# p. f* K5 ]
                                                to_str("in der Andockstation: \"",?.~.name,"\""));- g: [( y9 H4 B. L4 E  D) ]
                                else; _3 ?  N3 R3 u) v; y4 z1 D" D
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 i: B; _/ V4 q- Y
                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 X9 S6 U* I5 [- D( l                                end;' I+ _9 a9 S$ E! G1 X' w
                        else
" t  B& }0 {( C                                @.Destination := assignLObj[1,row];* U$ q+ ]5 P% J  g- {4 r
                        end;                       
9 ~2 J& M" H7 }5 v                        newDirection(@);+ E" F$ ?# F# T; T
                        @.HasOrder := true;
9 A3 O3 K% v0 V* y                end;
' i0 `) t( K$ x! Y        end;, c; E; }! r4 `! l3 E  {2 {
end;        -- of the method
  A  e1 }2 B4 F6 U* D
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 [4 a3 P% Y+ h7 I
0 t% P; \* ]5 C7 i6 J这是AGV_putin中arrive的method。% e: u' Z. h5 ~
$ q$ x# A4 q" ?8 A3 [; A
当到达物料速度越高时,这个报警更多,  u7 q" y; F9 A( D$ i. W
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ {( W+ e: Y' h8 C2 s9 f程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, t6 B$ ^# p4 P2 @  x' A- R+ B
& K4 H4 d* |% Q, h8 M9 j" x" r  z另外一个小建议,就是move,所有的move都可以这样
- |) N6 F* T" A. k/ W3 J! O8 G% }if not move() then debug end* F& u* ~5 n5 U: R
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  y$ H: a$ M( `# o9 L. d2 s
plant simulation中的free libraries有AGV模板,1 K/ G# }7 X/ H# g/ P4 X) j5 V
里面也有案例。, Y. g; j0 t0 O, t/ [
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& t1 b% D2 i* V3 S2 p% S  N5 S/ V( p
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! Q- k) ^% I2 ]

" A1 F5 C# I" p1 p3 c那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08   G/ b" _- ?7 s3 ?5 s
这是AGV_putin中arrive的method。
% |1 t$ Q$ K9 Q5 }& Q4 x. w9 }1 O2 v
当到达物料速度越高时,这个报警更多,

$ g; {' \% N( L另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-30 14:40 , Processed in 0.018165 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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