设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9729|回复: 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'! R% f5 L4 {8 P  J+ Z. Z
*/5 f2 O3 m$ ^! q. l
is
# [) b1 Y' x8 q  ]$ y6 X1 n: D        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% J, y1 K! n2 r9 Y
do9 F, \& b( p5 g' `( o5 b
        Lan := rootfolder.Internal.Tools.AOLlanguage;$ C) ^( E2 y; ^+ X6 ?  T3 f
        if current = @.Destination -- else return; [/ R+ B9 r: Q" C/ a: [4 m
        then
  Y4 i8 s+ u$ H6 R* `+ w9 i                @.Destination := void;
. U- w' P- Y; n* y5 `4 J$ n) |                if @.occupied then# [. m: a7 [3 j4 w$ n0 r4 C
                        part := @.cont;
; I, R! x( A! V% \                        @.transpOrder := void;& _3 m: t' x1 Z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 M0 |4 y" S. U1 Y8 D, r; z8 r/ j
                                @,root.eventcontroller.simTime);
8 ?3 e* v; l/ I2 g9 l0 ^$ j$ H' I                        @.HasOrder := false;
  {/ {7 B% T+ R6 t) u& P% h& ]                        @.DrivingHome := true;9 u; {, g+ m/ A0 p/ Q
                        rgManager.tryToStartTransOrder;. `3 k& U+ o1 I! J- n
                        if @.Destination = void
" J) c& \" o8 i                        then -- no transport order for vehicle @2 y2 P. X1 z/ g  U+ x, k
                                @.Destination :=) e# @1 E- S) A; e$ E* A
                                rgManager.nearestFreeStation(@,track.~);  Z& K! v0 y$ ?; u/ ]
                                newDirection(@);   
3 \! R# U) ^3 N2 t# c                                if @.Destination /= void then
3 Y/ R3 \. w* l% C                                        @.Destination.NumReservation :=
6 y8 W4 h9 k  n( m8 o% a% N                                        @.Destination.NumReservation + 1;4 {$ y, k, v4 k7 J, E+ x  c% C
                                end;6 \: D) Z) _4 M7 a6 I, i
                                @.CurrIcon := "drivingHome";
  b8 k0 Z9 S8 \# V; u                                @.DrivingHome := true;2 v3 d: l; ?- H! [
                        end;9 N3 m" _) V, s/ o: c
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ ?% \: N# O1 u' B& b
                        part := @.transpOrder;  f: w& G2 g+ }0 {$ F
                        part.move(@);-- load part) [" N6 z( i- m' Y  k
                        @.CurrIcon := "load";
5 S) X5 S. ~5 s5 m7 u3 q' l5 _                        GlobalDistObj := part.globDestination;
1 s& _6 z( U% [                        assignLObj := rgmanager.rgAssignL;
8 g2 x& |2 C$ ^  q: P3 E                        row := assignLObj.getRowNo(GlobalDistObj);/ u- H2 `* V0 r) a
                        if Row = -1 then -- since 70
6 t6 V; ~$ n1 c5 \5 Z* A2 Q8 q                                if lan=1 then
$ R. \6 b' Z$ d* U; s8 v# x3 e                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, [1 q/ i% f% u. X' O' L
                                                to_str("in der Andockstation: \"",?.~.name,"\""));; R& B7 q- N' r0 T* @/ W
                                else4 K& c% Z( R1 B8 Y9 [/ A( z4 m
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 P% y% c( \! D! W' I  y) K                                                to_str("in docking station: \"",?.~.name,"\""));                                1 W5 w: S# e4 N4 u
                                end;4 t: @7 ^2 i/ G6 s* B" ^3 V# i
                        else
8 W/ L$ B# U! U                                @.Destination := assignLObj[1,row];
) L! O. L3 k- M% k* M1 a                        end;                       
  p, H8 `& o5 C: l5 k                        newDirection(@);
3 g& M6 J6 g2 C! `5 \                        @.HasOrder := true;- C/ k* |7 a) i, l1 e+ ^$ w# M8 }
                end;
3 h. s7 Q$ X# s7 O9 g( M* C! X        end;
- s2 S$ d) \# s2 y: n1 F5 mend;        -- of the method2 Q+ S$ {: F8 ]/ [6 F5 O
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
( j* _9 C( Z; j4 s! C& S
  n/ t; q2 L, f! J- }. ^8 e这是AGV_putin中arrive的method。* K9 R4 H6 {2 L- b7 A; n: O- ^

8 H* l( j) L: R0 C7 H& X1 n% P当到达物料速度越高时,这个报警更多,
% n9 E. s1 c6 Z4 [: x1 O5 @4 [. m可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% p) X8 a" F: g6 `
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% Z$ d, k0 m9 d8 s' v* n, P$ p

4 x# |) R& l' h4 D( u6 h3 a" [6 t: V另外一个小建议,就是move,所有的move都可以这样
8 U# e  _  O; g8 Qif not move() then debug end
$ \7 ^. `1 g* N. E这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 }! m, A' C9 J+ B2 w8 t0 ^5 P
plant simulation中的free libraries有AGV模板,) ?& ~5 v1 a* H8 d" J5 @" N& i% D$ l
里面也有案例。
$ I& q+ a7 }1 R- k5 Y我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
; w# W. C' v9 ]) o9 U1 D* c# M/ K% U8 G* b7 {1 h8 M
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( |8 e. @5 @6 E2 ^- a' q

3 t; M( x6 w0 N3 w  @1 l1 W% ?* X- T那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) [; u( U5 I& V这是AGV_putin中arrive的method。# a1 O+ G8 Z2 z. x& x7 j# I% G

" }/ \, L& H+ a当到达物料速度越高时,这个报警更多,

0 c; B  F% h5 T7 J$ `" g# i另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-21 00:19 , Processed in 0.019258 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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