设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8332|回复: 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'* f5 g8 g6 S# P3 @+ m: o
*/
- D% C$ H5 K, }% tis
: Z4 \$ e% ^! j: t5 M        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 B7 b& @" y2 P) ndo2 `; [+ d( r1 H! f$ z, l- s
        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 ~) U# Y3 C! g$ u3 N        if current = @.Destination -- else return
1 B; _# g* e* k5 `+ k' _& n        then
  F6 \, n+ e& a- E, E- b; Y: U                @.Destination := void;
4 X; S* H; k5 N, X                if @.occupied then( H0 K. g2 l  ]! X& E/ z  @- ~
                        part := @.cont;
# c/ S! l8 Y. ~3 e8 U2 ]3 y                        @.transpOrder := void;& L: o* y- X5 t
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# q5 {; y  V# [# v  {
                                @,root.eventcontroller.simTime);3 \* w! E/ A) F' v
                        @.HasOrder := false;% n8 c8 H1 c) V4 s3 ^
                        @.DrivingHome := true;
' M4 n2 F! h" }/ l% ]                        rgManager.tryToStartTransOrder;
) x' ~% p7 s( B$ g# c' ~; g# [                        if @.Destination = void
! H0 i5 a) r6 V4 r) g. t                        then -- no transport order for vehicle @
. H- ]; Q; m" a/ `                                @.Destination :=- u( C. m# u; i
                                rgManager.nearestFreeStation(@,track.~);( G# Q- K: n6 t6 v3 `: Y" L4 L
                                newDirection(@);   8 c+ e$ ~' [) u- D$ u
                                if @.Destination /= void then4 D3 [/ o# a; G4 [. J5 c
                                        @.Destination.NumReservation :=
9 e3 o1 r/ z/ e) X/ i& I                                        @.Destination.NumReservation + 1;
7 w2 N2 `- C# E8 _* ?$ I                                end;4 h# q* H4 u; _. l* n2 \5 Y. }
                                @.CurrIcon := "drivingHome";# {8 Y) [" p4 C* g" y3 g1 V
                                @.DrivingHome := true;
: @, \( d" N2 I) a                        end;
  a& p6 s! x6 h                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% B) x+ H6 |/ }! A( C
                        part := @.transpOrder;8 w, X3 E* [" B: u5 c+ m
                        part.move(@);-- load part
! R* j7 k  r& r9 h5 J* W1 G9 B                        @.CurrIcon := "load";# u1 ^9 `9 ]# n+ K3 ~+ h) Q
                        GlobalDistObj := part.globDestination;
/ J  e) o0 b; f4 q2 W% t" H                        assignLObj := rgmanager.rgAssignL;
2 O5 W3 }' \' m                        row := assignLObj.getRowNo(GlobalDistObj);' e5 ?; X, ^; D; I  V5 ^2 W
                        if Row = -1 then -- since 70& B1 _5 }3 E+ A3 T: R  p
                                if lan=1 then
* d" k/ ^' n* z, `: E7 K- K                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ A9 x- S5 J9 M2 c2 r                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! K, @0 R8 v. h8 H" t6 a, r                                else
* M4 ]+ o& j3 o- Q4 `" r5 a                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: d3 W7 I6 S+ y( w- v  r7 n- `                                                to_str("in docking station: \"",?.~.name,"\""));                                4 [0 Y" o+ L7 t6 G+ A4 y) J( O
                                end;# a( \" d7 C* p( D4 B6 S6 i# m" ~+ _
                        else8 A" W: Q3 |8 z$ c+ Q6 o9 s/ Z5 f
                                @.Destination := assignLObj[1,row];
" g3 H7 W9 x) T" \# n7 v' S                        end;                       
: q. n3 ^1 p0 ?) h$ k                        newDirection(@);  b5 ^1 j, E% _4 n0 _
                        @.HasOrder := true;3 h# Q2 b: N/ J, Y4 V
                end;* C0 Q1 ?* |7 u7 M$ z8 c2 C
        end;
0 e- q5 ?! Y+ ~1 ]; [end;        -- of the method% B& m5 Z7 X( q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + V% Q9 v3 v9 P9 R1 w
8 H- Y- m0 L/ X# o1 A9 d+ M
这是AGV_putin中arrive的method。
! Z9 L2 A0 {* T4 p9 K
1 }( s( Y/ ~) H& j当到达物料速度越高时,这个报警更多,1 s; W7 e+ s# U8 g
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。: T$ ^( U( {7 p% |
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 g4 t8 P3 {; m, M
! [3 J9 K+ ]. X& z& `$ N- r另外一个小建议,就是move,所有的move都可以这样
. ~% }% ^. [8 c. G- L5 e9 L! oif not move() then debug end. `# I% U" H4 N) M% N
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ ~% r1 I- |9 l4 W* Z
plant simulation中的free libraries有AGV模板,3 I3 a2 ^/ u+ l0 P$ @, ?" i2 f
里面也有案例。
  H1 [4 [% ?' ]% _$ z6 v我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( u" Q: N7 I" x' p; C: `

; v& w) P  k$ Q6 C我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 [4 A7 x# G! B+ G1 Z# _3 ^

3 s/ H: c0 Y5 U# T: m+ y那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 D  C7 Z) j: F! Q1 k  t" h
这是AGV_putin中arrive的method。& s: n& v/ C$ C- r; Y5 \

" c+ x8 |  W( t当到达物料速度越高时,这个报警更多,
0 D4 g) y, a' u+ a) M
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-28 09:53 , Processed in 0.019173 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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