设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6585|回复: 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 c/ c! o$ h, U3 D0 z; A& a: g*/
4 M) e8 H( a, `0 S% w7 dis
. U( }8 V' [3 ~4 G. r- B. M+ V        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ f+ `' [3 e; r" l3 D! U* o6 ^
do( s5 |" ?* {2 Z: Y* A
        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 s* r) W( `6 k- u- _$ _+ ~0 \# g        if current = @.Destination -- else return" y7 y6 o& f7 \. {
        then4 G- J6 {1 B. @3 s
                @.Destination := void;. p5 v( u' f# O0 }$ D" ]
                if @.occupied then/ _3 t) M& n% S# r  o% k' u( D
                        part := @.cont;
+ Y2 S. O8 x  s5 ?" o                        @.transpOrder := void;
' m) ?! [! z; H6 s5 c/ d9 X" B                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 X/ c' t- G1 v                                @,root.eventcontroller.simTime);0 @/ D* b5 f  Q4 c$ @/ i
                        @.HasOrder := false;1 k" p8 K: Z. A; g
                        @.DrivingHome := true;
- d: \" q0 q% d6 y- J( c                        rgManager.tryToStartTransOrder;
* L0 q) J  A, C2 H% y                        if @.Destination = void
% j2 h) d$ E8 |/ P  C                        then -- no transport order for vehicle @# {5 k2 e* m9 M: r. H" a/ O
                                @.Destination :=
0 g' ^! c! _8 A( ?* R                                rgManager.nearestFreeStation(@,track.~);7 Q8 g% f. n& ~. T" S
                                newDirection(@);   
2 D/ S; {6 S7 e' l1 V2 ^2 Q* O                                if @.Destination /= void then0 ^) n5 {1 Q8 C' Z0 i/ f
                                        @.Destination.NumReservation :=* Y: |# N3 N- w: F
                                        @.Destination.NumReservation + 1;
8 B# J) k2 y; w                                end;1 o7 C; v) K, D
                                @.CurrIcon := "drivingHome";% J' d7 l3 G: ^% ?" u% r) O
                                @.DrivingHome := true;
5 _" L% [. U4 S2 F- P                        end;+ D( u0 T4 _( c9 g6 T) Y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ A- z2 w1 r6 ]$ c$ y                        part := @.transpOrder;
, s' L& c" G3 ]- J. {* {                        part.move(@);-- load part
3 @  b) U+ N  ~                        @.CurrIcon := "load";
& A; e7 l, F. S8 t! n                        GlobalDistObj := part.globDestination;& ?, ]) Q3 q; n# b; E3 ?
                        assignLObj := rgmanager.rgAssignL;% J: K) ~5 }0 \1 X; B
                        row := assignLObj.getRowNo(GlobalDistObj);
) @+ s+ J2 V- j( Z& {                        if Row = -1 then -- since 70
* U* t5 ^" x4 ^8 {                                if lan=1 then
. X$ d( t& z% J. b$ M                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 S* r5 @2 p: @
                                                to_str("in der Andockstation: \"",?.~.name,"\""));" Q' t9 E8 ]! i
                                else* N% s$ r. `' T$ S0 _+ n0 j
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! d3 M; k$ x: p  r                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ {: a0 i% J- K4 C- o# [# Y$ Y                                end;) x: t$ |. q7 i- h7 d6 M
                        else
8 Q! b4 T" P/ P, b1 e- l4 T                                @.Destination := assignLObj[1,row];
0 u; |0 Z7 x8 N' K: D9 T! H                        end;                       
9 y9 Q0 Z" X/ W1 `/ C1 k                        newDirection(@);
3 a1 A4 G$ a' |; X& s                        @.HasOrder := true;* R( o4 Y, g$ i3 _
                end;0 P; J# |& X. D' @, X
        end;$ Q9 q) V" V$ k8 Q- W
end;        -- of the method$ {% ~+ {; H0 v" g
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " X) D9 f8 \- c( Z8 q2 h1 I

; t! S& Q) t# g5 ~: A( g/ d这是AGV_putin中arrive的method。
; e) x7 r" `1 @2 f5 i6 z
0 q8 j7 K2 U1 ~' Q当到达物料速度越高时,这个报警更多,, n+ {$ E( k2 R7 p  g3 t! Q+ E
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  x6 D7 ?5 H, N+ G- O8 h- ^/ b, \6 w
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?4 v9 A, s- b, z9 {/ U
9 Z; G0 {9 B& K+ M- @2 ?+ w4 b6 c
另外一个小建议,就是move,所有的move都可以这样
5 C) A5 f3 X; d$ N& Fif not move() then debug end5 L- v& F) m1 w, _5 c+ ]
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. i5 [1 E( j7 ]) R+ q' F4 V/ Z3 i2 nplant simulation中的free libraries有AGV模板,
1 g; w( [. I/ y6 K里面也有案例。
) K8 e# e  }7 Z. m我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
* p2 Z. U' s0 |' M" w3 Z% _9 w
8 e7 _" C0 X' e9 T; ?我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . s1 ^+ I& _1 I2 G
8 C1 M: ]. V+ X
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 V& e) Q: e) I4 @8 y* W% D2 @: U; h这是AGV_putin中arrive的method。
% g2 i5 [8 m  m+ o2 a7 I/ r* T0 W/ Y* j- h
当到达物料速度越高时,这个报警更多,

# n4 _! p+ Q0 |6 n& x7 ^3 v另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-14 10:02 , Processed in 0.019595 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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