设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7601|回复: 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'2 U4 H$ Y! @( {! y7 r1 O0 d
*/
. F' G: L+ ^6 z/ o2 ]; j  {5 Qis
0 [5 G% o8 i, Q2 _        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ I7 c8 _: \9 v  v
do, F6 Z, H2 I1 |
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ ~! T6 b  X4 z- w4 F        if current = @.Destination -- else return
+ H/ w) _$ y7 x9 |" `        then3 A0 J( }- n' A' S& y$ o
                @.Destination := void;
9 W( o, Y! F5 T. d" i                if @.occupied then
+ C; D2 P8 Q( q                        part := @.cont;! f+ ^5 ?/ B5 y
                        @.transpOrder := void;
7 w# C2 @, _2 R- [# U                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 B% u% w6 p4 Y, J0 y( J- ]
                                @,root.eventcontroller.simTime);) r. e1 L' I! {' [$ W/ L/ G3 f3 P% R' ~
                        @.HasOrder := false;- [# }6 y. I/ h0 l+ x+ U
                        @.DrivingHome := true;" {* o0 [2 a0 E+ Z8 D
                        rgManager.tryToStartTransOrder;
  B/ t4 M) s: E" [1 o6 S                        if @.Destination = void6 k- J' _, D0 O  J$ I, D8 E1 ?) z* P
                        then -- no transport order for vehicle @. c0 ]8 {9 t( @2 V# S+ R) n
                                @.Destination :=7 j3 G2 y' M0 n
                                rgManager.nearestFreeStation(@,track.~);
) A( o! Z6 C) J% r5 P                                newDirection(@);   
$ u, |8 X: c5 ~, V8 f1 T2 |                                if @.Destination /= void then3 n1 R7 t, f, c7 l" ^
                                        @.Destination.NumReservation :=  a' ]& t/ z5 _; D# G1 p
                                        @.Destination.NumReservation + 1;8 b2 ?6 j+ N) Q; h. Y4 O0 b. J7 Q
                                end;
4 [1 X8 a  T" ]8 ~                                @.CurrIcon := "drivingHome";" Z8 p4 {6 ^8 c0 L/ r, e# L
                                @.DrivingHome := true;( J. ~2 j& R! ]1 m& o$ U
                        end;
+ ~! u0 v7 L. _2 m% [& \                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ X: @. T+ b, [1 R7 S1 X                        part := @.transpOrder;
9 l' D  F/ O1 P: y# I' E+ U                        part.move(@);-- load part1 g: K( M/ ~7 ~, F. A
                        @.CurrIcon := "load";& I9 c4 }4 i7 ^4 _+ ^+ k
                        GlobalDistObj := part.globDestination;
3 F+ b! j8 D. e                        assignLObj := rgmanager.rgAssignL;; R- Z" A" S! L& x
                        row := assignLObj.getRowNo(GlobalDistObj);
" U7 W) L" f! i, b6 y                        if Row = -1 then -- since 70
/ ^1 H4 m2 i0 s2 ?- m8 ?# ~; K" c" W* o* ~                                if lan=1 then
% [) U0 c: n8 i9 \1 @% \# M0 p1 m                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 D4 Z$ [- n# S4 ]8 Z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 O9 L6 m" y& ?& R  l  \, _' u                                else1 G' m( e: i5 E$ F% E
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' x' S/ S. X; @* W3 Z" Y
                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 z/ Z  G0 L; U3 V: L4 V! a                                end;
1 M! x. N1 @! j( b                        else. i! ~' K  v4 |. U  H
                                @.Destination := assignLObj[1,row];
1 X6 t: _7 i' J' i/ J- g                        end;                       
  Y( ~# Y$ V' n9 }3 t  x% K+ V                        newDirection(@);  ~% U7 L! N1 V  }
                        @.HasOrder := true;1 z  d! k  T- c0 W; Q" ~
                end;7 X8 C' p$ `- m0 [' s7 ]' _
        end;
2 @4 s9 w' C% g- K  A7 s& p9 Aend;        -- of the method
- k7 x. \7 ~6 ?2 G, H+ j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; i/ P* W2 P. z- Y

6 ~/ D8 N, w- f; _8 v9 Y1 q  ?% t  w这是AGV_putin中arrive的method。
  f4 j& f. @4 ~
: H( C* m! j& o  P% i% ?当到达物料速度越高时,这个报警更多,
6 J8 `: d1 c4 D* b8 P可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  y9 r/ C% r# Z; t6 j$ d
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: C: {# i% e, [4 x: H* r$ g
- X; Q" I. O0 u. N$ J$ F
另外一个小建议,就是move,所有的move都可以这样
/ N! j1 t& V8 B+ L) N9 y7 eif not move() then debug end
+ i$ P8 v1 ~; C8 f" y* V这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- e! G; m: v; Y3 Z2 B: x, d3 o/ W5 Bplant simulation中的free libraries有AGV模板,
5 z0 x( W; x6 B0 J1 A里面也有案例。( O( x9 c+ ^6 a  W
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- t( s# W/ V. p! S4 F& `* R7 C0 M& ^* W0 I8 _
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# L  Q1 q# e9 R7 T. ~4 p( p1 m! N" ~# X( W
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; c$ `+ C3 X! v* [1 a+ P
这是AGV_putin中arrive的method。
  e2 P  U6 S* K  |( j; \4 Q6 E4 E5 O0 x# _4 _  w
当到达物料速度越高时,这个报警更多,
3 N6 p3 q% ^1 |# d9 e- N4 j
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-19 15:12 , Processed in 0.019416 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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