设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8429|回复: 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'+ T- d! T- k, ?7 v/ x# A
*/4 C) c9 A  g7 A/ E2 ]
is5 G3 c: b* A: F: C! Z/ v
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( y9 |2 }8 H  ~* z( mdo$ R1 Y/ M  a; ~1 o) z4 G8 ~; @
        Lan := rootfolder.Internal.Tools.AOLlanguage;
) Y. K1 @$ R' i' n& }        if current = @.Destination -- else return4 M) [1 e( b5 s
        then# @, Z2 y5 f. u- H
                @.Destination := void;
+ M0 ~: \. U0 W3 |7 X: C                if @.occupied then! D  ?; N( N* f  h! Y! Q
                        part := @.cont;; G6 U6 p  [5 S9 A
                        @.transpOrder := void;2 H& Y) v8 \* |2 O
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) n, I: D) n$ ~+ t7 o. A
                                @,root.eventcontroller.simTime);
; t6 k* ?, X# }! `0 {0 l' O                        @.HasOrder := false;% I0 Z( U" l7 O
                        @.DrivingHome := true;
) H# U: a/ T  \: e                        rgManager.tryToStartTransOrder;4 E" `& m" p7 t
                        if @.Destination = void
7 C7 `* z* Q5 H' v- Q                        then -- no transport order for vehicle @
  a* N& n) L7 e                                @.Destination :=; A& a( X4 S' H9 i+ j+ \; V/ K
                                rgManager.nearestFreeStation(@,track.~);7 ?1 k  b1 i* D1 r. F( D+ z
                                newDirection(@);   2 }) s- d& L# [$ M# V. T) ^
                                if @.Destination /= void then
) y; d2 A2 ]$ g2 F                                        @.Destination.NumReservation :=) u* S% M, N' u3 {, s
                                        @.Destination.NumReservation + 1;1 v3 ^1 O5 ~+ {% L3 c' |
                                end;
' j; [7 G3 E8 t# Y' d: H                                @.CurrIcon := "drivingHome";$ ~- g6 F( V% s5 X% w6 Y7 }' T
                                @.DrivingHome := true;
" U* W( f7 Y. \                        end;
) E" V+ r- K9 V3 b+ f                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 w6 ?# Y$ {; I                        part := @.transpOrder;
6 G5 ]( k( b+ K- [4 P4 b3 R7 n                        part.move(@);-- load part
/ P/ |' C* S/ @9 m                        @.CurrIcon := "load";: S; O, n" [1 F6 _$ @
                        GlobalDistObj := part.globDestination;) a- H) [* c0 ?7 I- C$ W
                        assignLObj := rgmanager.rgAssignL;
+ I% M1 j$ [9 _2 h                        row := assignLObj.getRowNo(GlobalDistObj);
# d7 x: F" d6 j. g5 Q% S                        if Row = -1 then -- since 70
' @! F! t/ s9 f% y2 e. ]                                if lan=1 then  d% }6 Y* L4 l& ?- ^0 y* Y7 e- h( E
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- O$ O8 @( b9 o5 D% Z# P                                                to_str("in der Andockstation: \"",?.~.name,"\""));
% ~1 K' h4 ?$ g" M/ ?/ D, i                                else& J% ~$ E) x5 {' g0 S
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) x' u+ u! O0 }2 A$ P+ X4 g, _' `
                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 W& ?1 E+ \2 O5 G                                end;4 M# L; `8 }: f' w
                        else
5 \( T4 f. K  B: G7 \                                @.Destination := assignLObj[1,row];
0 E/ S% y+ }( O. _" j2 F( j6 p                        end;                       
7 m9 o' h! Z; N8 A                        newDirection(@);
, X! b$ `& K! S- e8 K) h1 j                        @.HasOrder := true;6 Q  N1 i* d/ C/ p' r; [/ N' ?
                end;0 E! |9 q" `3 t6 d
        end;
, q. q, q, K, d; |$ Eend;        -- of the method
4 d, V( N- U# M" G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 6 i9 j% I( ]8 k
5 |. ]0 E" A* l8 n6 P2 q8 H( X
这是AGV_putin中arrive的method。
9 ?* ?" ~" w2 c' ^6 z4 L" W8 Z5 Q
0 e3 ^( p( S" M; y; ~当到达物料速度越高时,这个报警更多,) |/ @- Q, M1 W* I1 V+ ]' Q
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
& Y) {' r: m+ @程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& v1 b4 e( g6 N

2 u, D6 ~5 j5 q另外一个小建议,就是move,所有的move都可以这样1 j7 P8 J0 l' l) ^' |$ ~
if not move() then debug end; }% r5 O8 X2 X9 a- R( x' m8 N
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 T( e; u! l3 t1 f) |plant simulation中的free libraries有AGV模板,
- q* g3 \" j5 F$ o( S里面也有案例。
' o2 n( Z( c4 Q% f( @; g6 P9 J; Z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* F& M* \6 G; R

  r9 T4 s: C8 @2 o, N. p我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 % E6 v& W7 P! w# h: }7 q* Z

% n$ D0 P7 b6 L2 c( q那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
, h$ E) T( Q: \5 b: n: n+ q/ v这是AGV_putin中arrive的method。
, f/ `$ f! T  V! ?5 k
- l# t, g2 ~4 e  q9 C  D& P当到达物料速度越高时,这个报警更多,
* ], L6 r/ o7 }2 ]! L1 k
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-3 09:24 , Processed in 0.014549 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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