设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9329|回复: 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'3 Z% \* V" S+ V! v
*/
8 N6 v6 Q8 Q  r6 V7 Bis
7 V7 ~' m0 Q8 |0 i" r; N        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 v& J6 }( @. j' Z  S
do
8 P# T1 ?' s0 w! ^% ^        Lan := rootfolder.Internal.Tools.AOLlanguage;
' p  `5 D5 B) f; T; V        if current = @.Destination -- else return
8 J2 k; Z  o  I, V: |2 }        then+ m9 O. M! d  o' q: l
                @.Destination := void;
- R- h. H1 l/ k' R                if @.occupied then
9 |. L2 Z- ]; z& Y8 g3 T                        part := @.cont;" i( y4 ]4 y; |* G8 u
                        @.transpOrder := void;2 N1 W7 ]1 ?$ ^' ]+ l9 o
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* z" b' x0 G* @  k2 o) J! C                                @,root.eventcontroller.simTime);6 f" u" e9 Q6 R3 `
                        @.HasOrder := false;' K. |1 E3 _6 \
                        @.DrivingHome := true;
0 ^% t1 g. l# ?- E! B                        rgManager.tryToStartTransOrder;
0 L( L0 r; Q8 S% a8 v& x                        if @.Destination = void$ q  S% [8 d# c+ h+ e
                        then -- no transport order for vehicle @
) u" b" q; l/ w+ x2 X& C                                @.Destination :=# `3 |! @! W/ O" M+ d
                                rgManager.nearestFreeStation(@,track.~);
" R7 }$ }9 w' H, }" i                                newDirection(@);   - W" \3 h$ u; ~/ W' \6 }
                                if @.Destination /= void then
% r6 e9 o3 c: ?2 w7 }                                        @.Destination.NumReservation :=
% h- _( i& t1 W- k$ E  h+ D' G4 }+ z* P                                        @.Destination.NumReservation + 1;! @7 H6 i7 R" J5 g. g
                                end;
4 j0 [: g/ R1 L; Q+ y4 Q                                @.CurrIcon := "drivingHome";' g  f. ^5 A( B8 @) T
                                @.DrivingHome := true;' S' Z/ a* Z& H6 v) V
                        end;
  N! {8 h. Z/ q* W8 L$ {. w- S                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' k4 `$ m: I- z. U                        part := @.transpOrder;& t6 W+ L# T" ?
                        part.move(@);-- load part
, R- D) @9 ?" n+ u                        @.CurrIcon := "load";4 M1 B" p+ u" x! i' o$ Y
                        GlobalDistObj := part.globDestination;, X4 F; g2 u# z$ g: R9 V
                        assignLObj := rgmanager.rgAssignL;
5 h  U/ q8 Z0 A3 y; m  \                        row := assignLObj.getRowNo(GlobalDistObj);
# ~5 L2 a+ V7 A. A% f6 k; U# C8 |                        if Row = -1 then -- since 70; ^" q+ D, v7 R7 i" E  x  t4 ~
                                if lan=1 then
& ?& m  _6 _9 V* L. x8 I7 m, s% ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' y4 F: m: C# `+ S( B( y" R
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 U% y: R4 r7 |7 Z& M  k8 R                                else
& p5 Y7 ^( ~; S* ^8 m                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 n4 s6 d+ D$ t9 ~+ c7 b& e4 G4 y                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 S2 |! H' c1 @7 z/ Y4 c                                end;0 a% h3 D! \- c  j% V9 O; t0 Y
                        else1 a8 V! I( G' |5 D
                                @.Destination := assignLObj[1,row];
$ }2 w1 c1 P0 d. W. J2 l                        end;                        ' R) h' I" t  T. m, o$ o
                        newDirection(@);
5 d+ I. \; ~: _: p+ ]9 C+ [8 f, x                        @.HasOrder := true;9 {  v8 e* h; r& X( J
                end;
/ w# Y4 n. o; y: |        end;
' M* z( _! U2 ^end;        -- of the method
; l/ m5 ^8 c0 \8 B7 W
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
, v. W2 Y9 O& V+ z8 T
" _* B' \, G3 g. p这是AGV_putin中arrive的method。
* X( x7 |& F0 X* |  g: y
; G. W9 L4 O# x3 x. s* N当到达物料速度越高时,这个报警更多,
6 [. X- H: O- i6 _可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。: V2 j, C6 k  l
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; h+ C- w+ _4 f- Q' A  Z3 s% z* j' T# u6 N6 T2 t
另外一个小建议,就是move,所有的move都可以这样
/ E8 `1 j. }. j  B6 x" |if not move() then debug end( _, z7 E8 W6 U' U9 P
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ [0 Y' i1 ^, c* f7 ]* z! u+ nplant simulation中的free libraries有AGV模板,
4 B* u( w% @: F2 k& {$ g$ Y2 N$ D里面也有案例。% R9 A! s3 ]9 p, B% T& `
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
: g6 R. `+ H1 H% X3 F3 g$ O, B9 a" r/ p2 g
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : f! C5 M- {" }% `$ }3 J+ [2 A! D" M

6 ^$ ?* h4 l, Z! Z  o# O2 o那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 K& r; Z% K' {
这是AGV_putin中arrive的method。
8 k( {$ y1 Y( D  E" s- Y2 w
7 P+ G* i% U  L1 \0 E$ I当到达物料速度越高时,这个报警更多,
! X, n$ M' b* ^3 i
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-25 19:58 , Processed in 0.016917 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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