设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5489|回复: 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'
, }7 U+ h& b( R" x*/: i! G: q7 B2 f- r/ H) e3 `
is3 U9 q/ @6 _. `0 i- h* s8 D8 @/ t
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ Y) K0 t1 }, Ddo' H  K4 G: Q9 t* Z; z1 [
        Lan := rootfolder.Internal.Tools.AOLlanguage;/ t6 @* u- D9 Q% T
        if current = @.Destination -- else return
1 A& {" V. m/ w4 n: a. i6 e        then
- o& W: p4 p( e- `# G2 r) ]- d9 F                @.Destination := void;2 l4 {8 Z& Y( P( w
                if @.occupied then# W- n8 \, d2 K
                        part := @.cont;
# D# D3 h. m" S+ q- B6 c: z0 q! ~                        @.transpOrder := void;
9 V/ Q5 b  w& Y6 Y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( e% @5 @! Q# e* _# N( k                                @,root.eventcontroller.simTime);
1 A3 M2 I: w- t1 g' A                        @.HasOrder := false;0 @& N; J+ P" K0 L! z9 f
                        @.DrivingHome := true;
5 `+ R, m4 D2 ^; i+ Y3 o% E                        rgManager.tryToStartTransOrder;' ~, Q; {3 I" e9 m' L1 @  P% N
                        if @.Destination = void
4 I" _9 e' t0 r6 V+ L' N9 w                        then -- no transport order for vehicle @9 F' E0 ^5 @# M0 C) g  d4 G3 o+ ?
                                @.Destination :=
  g+ z& O, B8 ~) c1 \& ?" k                                rgManager.nearestFreeStation(@,track.~);+ W! Z' H  x; b" _0 D
                                newDirection(@);   . A, n% [. t/ B/ o8 }
                                if @.Destination /= void then
% x0 Q6 q6 ~- K/ r, Q) H2 `                                        @.Destination.NumReservation :=
1 [# j- d2 o* d' W* T% z: W3 Z8 @% G                                        @.Destination.NumReservation + 1;
. E: I& q8 W* ^% [                                end;
  n4 z* P5 w; ^8 p: R                                @.CurrIcon := "drivingHome";  @) X( @; |) l6 s0 f
                                @.DrivingHome := true;
/ X9 n' R  O. ]$ q9 n                        end;
' _* V8 R8 R4 p$ j- @5 V2 ]5 K8 Y. w                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& k3 c: i! A# s% d$ V9 p
                        part := @.transpOrder;
) A6 I" n/ n9 l& ?                        part.move(@);-- load part- ]* z! t7 H) a' _4 y# W! O
                        @.CurrIcon := "load";  }: [; }  `$ f2 b+ \
                        GlobalDistObj := part.globDestination;6 h; R  U! E8 h, C; O
                        assignLObj := rgmanager.rgAssignL;8 ]0 A& g! h' d; s* D7 X
                        row := assignLObj.getRowNo(GlobalDistObj);# ]5 h& Z. N  ^9 ~/ ~
                        if Row = -1 then -- since 70) d+ x/ r$ z% K: q0 y1 R# \/ u/ k# l
                                if lan=1 then
6 F* N' J; W5 w5 K                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" g3 C+ P) `) E, L                                                to_str("in der Andockstation: \"",?.~.name,"\""));0 D" K9 k9 V# |% s  A, S
                                else
' A) v3 U5 y! p# h2 l, i                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; M) f# I& m$ T. e! K# m
                                                to_str("in docking station: \"",?.~.name,"\""));                               
$ t" z4 l; ]9 V# J8 j/ z                                end;
) N6 \$ Y8 _6 X  l                        else1 j" ^. \$ R2 g6 }  u4 u8 w& d- Z
                                @.Destination := assignLObj[1,row];) H0 x$ z- l2 e
                        end;                       
2 f, a8 a. X: z& @" I* C* H$ }8 b; {                        newDirection(@);6 D6 ^: _4 I) R" H+ m% u, n/ H
                        @.HasOrder := true;
& g; o% R2 Z2 \$ m8 v8 ~+ v0 l                end;0 T2 @, p; z) |" a
        end;- D4 b. z1 b: P, s
end;        -- of the method0 \& n, Y8 h: W- H8 Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : p, G) l3 c' o2 M
  s4 w1 o! g7 c
这是AGV_putin中arrive的method。) M  H, u0 Z5 I( D4 z# c3 Q+ K
  S  q7 R3 P6 w. V8 n' s
当到达物料速度越高时,这个报警更多,
: f: ~. J. y& p: |5 n可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- Q5 w3 R% L- u' S8 E
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' Z- D+ ^+ P7 a8 x6 Z; v
* y6 s- l( ]; A另外一个小建议,就是move,所有的move都可以这样
+ A0 d& e, h& q1 Cif not move() then debug end
& b2 Y0 z# v  ?3 k这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( A: }7 f2 c5 \9 wplant simulation中的free libraries有AGV模板,2 O7 w# w9 h. D
里面也有案例。% x$ h4 E; u9 H% t/ h8 _
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% e; ]7 ]9 `8 b3 V2 Z
% E6 e; t1 H& z  ~6 X
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & P! H- `* q# T+ O+ m8 C
. v, q/ J! s7 z" |% ]; f/ d/ o; D4 p- _
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) ^1 N$ @8 ~0 F
这是AGV_putin中arrive的method。. k6 @1 o) e- P' Q2 b

, s, [* x! O9 b' S$ i/ `当到达物料速度越高时,这个报警更多,
+ n6 M7 {: X% }& D$ G, S
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-27 08:50 , Processed in 0.020325 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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