设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7993|回复: 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 X& f. S) b2 f1 b# L$ J
*/
. ^6 Z4 P: V1 a+ k& f6 iis
/ W$ S; h- m2 X        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! m9 @4 B9 C6 f; w3 Y+ B( _do
) _0 h: E- s: B8 c        Lan := rootfolder.Internal.Tools.AOLlanguage;2 h  k) B, v, x* z+ C4 X7 Y
        if current = @.Destination -- else return& _9 U) Q5 x, J4 a) e. M
        then+ g  u* c9 H; I/ o: s
                @.Destination := void;
2 K, o% m# o, V, c1 ?                if @.occupied then& u0 E" Y" _& g4 @5 H
                        part := @.cont;
7 G7 I6 p$ H* K2 X                        @.transpOrder := void;) [  ]$ _' [9 a
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  n- U# U& o: A                                @,root.eventcontroller.simTime);
9 [& q6 M6 V! s$ P: c* A( G                        @.HasOrder := false;
: c6 M/ \+ D" |4 J                        @.DrivingHome := true;
& |0 d6 u, d1 F7 d5 R                        rgManager.tryToStartTransOrder;
$ H, p8 ]$ Y# m" w5 b- b                        if @.Destination = void; o$ P# O* ~% E4 x' c& w
                        then -- no transport order for vehicle @
2 U  }7 a* |% }6 P& F' x( s5 x% p8 B                                @.Destination :=
2 `6 X0 r( ?! u4 ~                                rgManager.nearestFreeStation(@,track.~);3 W# o, H3 U% e- H" [2 G
                                newDirection(@);   
  Q0 R- Z# Y; N$ C                                if @.Destination /= void then
$ X8 h( }; t9 b8 u                                        @.Destination.NumReservation :=# j7 I+ S' W1 L' q8 s4 j
                                        @.Destination.NumReservation + 1;2 w5 ^( V- e( z# a4 A8 A3 ]
                                end;2 V# r6 K$ q' b0 U
                                @.CurrIcon := "drivingHome";
7 X* O: W* w7 C                                @.DrivingHome := true;% I/ U: v& p+ A' H  T4 w0 X3 Z7 U+ W
                        end;$ F1 ?! z. g0 d& k
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ J& t2 e* t' A( u                        part := @.transpOrder;
; U' E5 ]7 y0 A, \                        part.move(@);-- load part3 M# A7 F9 T8 N" y
                        @.CurrIcon := "load";
0 Q9 z: s4 j/ O- P7 Z" l                        GlobalDistObj := part.globDestination;) T+ B% Q6 u. H) I/ ]7 q/ K% j. j
                        assignLObj := rgmanager.rgAssignL;+ A5 |7 Q+ B9 c) N
                        row := assignLObj.getRowNo(GlobalDistObj);# ?8 g" v" X1 G  k
                        if Row = -1 then -- since 70
) W) [4 a9 A% S3 V3 m: O                                if lan=1 then
: O# E. o/ U# ~- K" T                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! q% n9 ?2 S7 A5 e                                                to_str("in der Andockstation: \"",?.~.name,"\""));( q1 I, [2 _7 Y% C' R+ q
                                else" c8 V8 T; S4 ]4 e
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: L2 }+ q+ l4 t) V7 s                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 Z; W" G3 X: y' l* y                                end;: `4 b: W# X' c0 P9 d  ?+ B
                        else$ S$ o% h/ w3 A, B. p  Z- Q6 @3 q
                                @.Destination := assignLObj[1,row];- c* y; N) |8 c
                        end;                       
# b/ L2 v8 h; Q& }4 a' m& V                        newDirection(@);; Z% L9 S, Y9 @# a9 @# W
                        @.HasOrder := true;
- [: V9 r% F) y" P& r% a                end;
8 d- U/ |; H. ?        end;
1 R+ E& n8 O2 s2 y1 _end;        -- of the method) ~7 u5 C' \2 P3 J; x, ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . J; ]6 U# }( T, a0 n. W% S0 R7 P
( v0 N4 z' k8 k) E- G4 ~+ r
这是AGV_putin中arrive的method。
9 a6 ~, U, M* o6 t8 j# I& G. L: R/ f- D% x2 z/ s% z( P# ~0 s
当到达物料速度越高时,这个报警更多,
2 y2 ^5 q/ Z6 R0 i; E  R可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ x5 g) A- f7 v. t3 `程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& h! W( [7 k$ }3 H0 y: ]# o

8 i# ]* p( ]& O  `& f另外一个小建议,就是move,所有的move都可以这样
  A$ e) Y1 u/ `0 p9 h+ Zif not move() then debug end' [: O) e. I' @% X$ ^" R' `
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* }, R, ^* P* u- C  G9 b
plant simulation中的free libraries有AGV模板,5 U! R' C+ Q* G/ R- {3 X. R% A2 L
里面也有案例。
7 j8 \6 Z4 q& O我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 I) C' h2 {/ E7 D6 v6 f
& |/ g$ C% ~% k2 T% ^7 R4 {我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! V: p- |" b) N7 V, s( A
, o! ]0 z# g4 t( A1 A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ e' @0 D. l6 C5 i3 K* m. [) I2 d这是AGV_putin中arrive的method。
) ]2 k( N" V' g# v# T
( t, a6 Q2 M0 l; B当到达物料速度越高时,这个报警更多,
; i  x! Z8 U3 @8 L
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-9 21:26 , Processed in 0.017667 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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