设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8470|回复: 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'" Z. _/ \! K9 L2 v6 h
*/
+ ]7 O- N6 S# c$ \* cis
% z* R; o+ F% U        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 f! z# C& Q& V0 s! b
do9 @$ J3 N. W8 t
        Lan := rootfolder.Internal.Tools.AOLlanguage;
# E. }1 V5 `3 e7 k$ w2 u        if current = @.Destination -- else return
3 @4 L9 J( x8 a- P3 L        then$ `( S( |% o- B( h. C$ u2 G+ ?
                @.Destination := void;
& s, H' Y9 x& |4 v& W# u* M$ S                if @.occupied then
" K* G" ~3 T5 M) W                        part := @.cont;! i( t* ^( d+ j: ?2 i3 G
                        @.transpOrder := void;9 v% y$ _5 r( n, {
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: O5 h  N3 g, @8 o                                @,root.eventcontroller.simTime);
, ?8 U& t' K# L: v' a                        @.HasOrder := false;: t' a" ~$ G3 k; \
                        @.DrivingHome := true;
% h1 S. ]# _) k( \! h. Q                        rgManager.tryToStartTransOrder;
) l% R* E( q% v! T- w1 M                        if @.Destination = void
4 E& y7 B, w2 E' }" z% E3 t                        then -- no transport order for vehicle @
) @6 M9 d# m6 L2 M. g' |3 b( G                                @.Destination :=" l* J) X0 T) b7 v3 p& i, a6 o
                                rgManager.nearestFreeStation(@,track.~);8 _1 ~" o7 J6 h6 |
                                newDirection(@);   ; g$ D7 B  V& a" L6 j
                                if @.Destination /= void then
( j; z9 M( M! I                                        @.Destination.NumReservation :=
8 p. U5 K7 N% \                                        @.Destination.NumReservation + 1;
6 p8 V! M/ g( m- \9 o& R0 U5 |; x                                end;
, d) q3 }/ y2 v/ m  V$ S  V                                @.CurrIcon := "drivingHome";; y. [4 c1 j; }6 s5 n0 J" Q
                                @.DrivingHome := true;
2 l: g0 k# g8 |" V                        end;
9 J! ^' [: B0 ?3 V                else -- the vehicle @ is empty, both vehicle and part are in the same dock station: }, Y8 f- k  v  a5 h
                        part := @.transpOrder;: q% Z4 U: B; h4 {
                        part.move(@);-- load part7 G. x: E" \6 l0 C$ N0 y# {
                        @.CurrIcon := "load";
$ i$ A* O4 _6 r8 v6 z3 S( }/ e! c                        GlobalDistObj := part.globDestination;/ F, p3 }  O. z- F3 H9 i1 P& O
                        assignLObj := rgmanager.rgAssignL;$ q8 ]& _0 E% K% `" J: g7 o7 L
                        row := assignLObj.getRowNo(GlobalDistObj);
0 _8 n. _! d& C                        if Row = -1 then -- since 70
1 a. m* J$ [' j$ ^4 p; G; w                                if lan=1 then7 U/ C7 U. T4 p+ V: _
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 t9 B+ N+ X; z5 R, A. C5 [
                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ t5 Y& k  N, ?% Z' |5 k2 d" O
                                else8 g* n, V! B; ?# q9 p
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 I0 U2 M+ l% Z$ O/ M, m
                                                to_str("in docking station: \"",?.~.name,"\""));                                7 k; l+ h; |7 M) D7 x
                                end;
1 {/ e" h/ F  S8 z0 L) U' z' }" ~                        else0 t9 V! T  Q5 w. }% c+ ]; s
                                @.Destination := assignLObj[1,row];
" X5 E/ f8 \# N2 ?2 m                        end;                       
- y4 M% Q2 W0 t                        newDirection(@);
9 p- @) n$ m# H  O  |( S& r                        @.HasOrder := true;
; ]5 D+ |3 P9 S" G7 H5 M) y! c                end;
9 h) h5 b+ \9 g        end;5 }7 _0 e# Y9 H4 W0 k
end;        -- of the method9 f2 A. V# O6 q, ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 & ?0 n: h5 A! B" \" P- `

3 [$ p' o. z$ U' n这是AGV_putin中arrive的method。+ J) ^' R2 U8 V% t4 |3 B
0 n# N  }. \0 W) X
当到达物料速度越高时,这个报警更多,
5 j: _6 @% }3 g/ Z, }; @可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  h/ D; a6 @' |  R
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, t; C% M5 n+ c( n- g4 h
1 ^" q) q1 E8 d# l3 y; L另外一个小建议,就是move,所有的move都可以这样
9 N4 C; I5 S' s3 oif not move() then debug end  `& J6 T& J+ _8 u& \
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 y- C, a& e/ d7 z0 z4 J3 Hplant simulation中的free libraries有AGV模板,
0 F# @0 `) ]! t% n& }里面也有案例。
8 S2 p% Q' Z! q6 t/ g, f我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* m# S7 q& E0 F1 W
$ Z8 I7 _4 o" z
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ; Z- Q8 e8 g, u- q$ m/ O3 L# Y
/ o1 R( d7 N( a0 G8 H% b
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ f$ R0 m8 Q9 C% e0 y3 S( l9 X$ G这是AGV_putin中arrive的method。  D4 F- A! C0 s' n
. ~3 C) y5 D1 ^' z+ c
当到达物料速度越高时,这个报警更多,

+ z7 O; [0 u1 J2 U6 r. |, ~0 a* {另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-6 00:10 , Processed in 0.020934 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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