设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8770|回复: 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'% q* r. i& l! q
*/
" c- a4 F* n% C5 R9 His
, w$ u: \: y2 D" G, Z9 X        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, Y/ m% Z8 W7 o! w7 tdo
. o0 ]$ Z% J+ f' h# m  L. ]        Lan := rootfolder.Internal.Tools.AOLlanguage;
% v4 y& a! l1 ?7 W% |        if current = @.Destination -- else return
+ x* L4 {" _0 T7 \: B1 j' c        then0 P* \( Q7 F6 ^
                @.Destination := void;1 m' K% E  m9 i2 S) k& j3 c
                if @.occupied then3 H$ S: o& X$ @
                        part := @.cont;) E/ L3 p! c  u, p' e! h% R
                        @.transpOrder := void;+ ~- f' |0 f4 S) Y9 B( e- C- _' i" T
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) x5 E' A% c- `7 ]3 W
                                @,root.eventcontroller.simTime);: l8 C9 k/ ?9 V7 `; p* M" d
                        @.HasOrder := false;
! @7 C7 R9 E5 v# ]* t                        @.DrivingHome := true;5 d1 r5 F& ~; D
                        rgManager.tryToStartTransOrder;
: W, N7 S# k. j& I1 \& e! V                        if @.Destination = void
  j0 M) v! U2 p                        then -- no transport order for vehicle @
- C' P2 b7 m$ W; m% V2 ?  e                                @.Destination :=* E2 M6 L0 ^; p* |+ q. R
                                rgManager.nearestFreeStation(@,track.~);9 E5 P& m- _8 C, \3 g7 ^
                                newDirection(@);   
; r  D  d' ~% o/ E                                if @.Destination /= void then
1 H0 c0 T8 T, S, O2 w/ f  r: N- O                                        @.Destination.NumReservation :=6 c5 b+ s0 l* K
                                        @.Destination.NumReservation + 1;  J# @) P7 Q+ w" X2 j  M
                                end;
! g! _" A7 B8 ^3 U0 n                                @.CurrIcon := "drivingHome";9 s& r1 h7 g6 v, i, Y) s
                                @.DrivingHome := true;6 U) H0 i0 f+ P# w( `
                        end;) ^( Y# q$ W+ b# G/ Z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" F" C6 a$ }0 J7 j, G* p& g                        part := @.transpOrder;
! ]3 I3 p7 G, `                        part.move(@);-- load part
! q2 T5 u6 c4 @& W4 e7 x+ Q& p                        @.CurrIcon := "load";  v' [1 R" q; q1 J3 x# j* G: R/ F
                        GlobalDistObj := part.globDestination;
( i1 V( {. B% M* }: j2 B                        assignLObj := rgmanager.rgAssignL;  u; P7 Q: W  p. p. _5 }( I$ l
                        row := assignLObj.getRowNo(GlobalDistObj);1 b1 w# h! a0 r0 _2 m+ A9 V1 V
                        if Row = -1 then -- since 70
" l, @  p/ H2 A. |7 D! H2 \/ F( X                                if lan=1 then
6 L3 @& S+ k! a4 y" W$ p                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! |/ `3 @9 Q# w% U1 M5 ?. k
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 n* c( k3 I2 [
                                else
8 Z4 y+ Y0 F% e( E! |+ l: ?& K" y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( P; d! b; s. P$ r                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 o- |0 p8 b% c" W- g( H                                end;1 [- k+ ~2 O3 u+ l) z/ e7 W' P1 G
                        else
3 X1 R- W+ Z7 K                                @.Destination := assignLObj[1,row];! E7 i% b! Y7 f9 w
                        end;                        9 a( b8 l% t6 @3 T. x- A/ I. w
                        newDirection(@);. a/ d1 I3 l6 b3 y  }: C1 q
                        @.HasOrder := true;+ L3 N/ }) Q+ W1 Y" J
                end;
5 ^) i+ e& g* J: `7 U        end;2 z. n5 P2 I6 C
end;        -- of the method1 S+ C# K* |9 e. E# d6 y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - J) f5 ]9 V$ U5 ^( }

& _, @: k5 q7 G6 y% l% l6 O/ L这是AGV_putin中arrive的method。7 X0 t/ j/ ^+ l) d5 e( f

# c& R! x& {( d7 V当到达物料速度越高时,这个报警更多,6 e* r! I3 E2 K9 H1 m% _
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& r" ~$ @  Y' Q; W' i" m4 |
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
$ s3 D9 @3 ~8 d
/ [$ B: r- i5 W# ^: q另外一个小建议,就是move,所有的move都可以这样" D5 w; W4 D$ W( `5 @. E' G
if not move() then debug end9 n9 F3 E+ S9 |7 r9 `
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( F) r, `7 t& p8 ]5 x; }
plant simulation中的free libraries有AGV模板,. T5 G/ q( L! C% x3 e& t! M
里面也有案例。. ]. o" O& O8 f* U; r, T
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 k# N9 u  i1 y8 M

. n% E2 J$ Z3 N8 g我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 o+ S! s/ m7 N: f& S3 P9 u& ~

+ Y- t9 `" i0 ]2 g+ Q/ J& Z& U0 }) v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! P' \6 {3 ^3 E' X6 S
这是AGV_putin中arrive的method。3 f5 ^) l6 E8 q$ b3 t1 E
/ @  H0 o+ j- L' }
当到达物料速度越高时,这个报警更多,

* e, r) D5 F6 j6 H" b+ q5 v另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-25 13:47 , Processed in 0.017388 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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