设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7181|回复: 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'3 {  A: H0 ^! h1 r/ y  {( N% s
*/
, Z; F, n3 _( p. I. {( ^' A! j) Mis
# a7 n$ s: J; u" g9 s        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; C  D" B! T- N% u1 n
do
- `, _; U# y" V) O        Lan := rootfolder.Internal.Tools.AOLlanguage;1 ?. U8 O6 |! E
        if current = @.Destination -- else return% S& r( F' d! I( x+ U
        then
& Y7 A9 y. Q+ I/ ?. ?                @.Destination := void;  a, d% g* ?4 N/ T. C7 h
                if @.occupied then8 `0 a! Q: A! h4 I; g  }/ ~
                        part := @.cont;
3 y  {" A( y6 E1 I( a0 v                        @.transpOrder := void;7 Q" T7 a6 [7 _9 ?4 X
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 x# k. m8 B9 E% y* ?: M7 `' _8 ^
                                @,root.eventcontroller.simTime);
. p: o+ v: L/ N4 F  B8 Q% D: o                        @.HasOrder := false;
: p% H) q: @+ F# Q/ P1 W+ q' J. H                        @.DrivingHome := true;
( K  O4 |9 u7 J+ @4 q! x- L                        rgManager.tryToStartTransOrder;, d3 t& c% T* m6 D0 T. r4 r
                        if @.Destination = void' p# l: p; e" T' Q4 G: s+ V
                        then -- no transport order for vehicle @  H, l: K7 N0 v7 Y. I) J8 b/ N
                                @.Destination :=
( Z/ o% H6 z* Y0 D                                rgManager.nearestFreeStation(@,track.~);
& F! f* {: {2 D                                newDirection(@);   
# Y8 ]; K/ h9 }0 V% G2 |) g                                if @.Destination /= void then3 J# e4 O) N9 ]0 e! b) p
                                        @.Destination.NumReservation :=4 U2 h1 h5 @  A) `; h
                                        @.Destination.NumReservation + 1;% \( ?# A+ N, g3 R( B, g- i
                                end;
) G5 I/ Z  y5 t( ~, T                                @.CurrIcon := "drivingHome";
8 i' N, S) k6 V; T8 ^. F                                @.DrivingHome := true;
( d6 D$ x8 m7 \2 k: w0 m: X$ @                        end;0 M4 X* w* a3 E
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ w6 i- o6 `/ d& r( p; [
                        part := @.transpOrder;5 n1 t! o& Q( f. Y4 |5 R: k' t
                        part.move(@);-- load part# Z; d' o+ {( Z6 @7 A! V
                        @.CurrIcon := "load";# u7 J7 p- F7 n
                        GlobalDistObj := part.globDestination;
( }4 P( S2 V7 k                        assignLObj := rgmanager.rgAssignL;
' {6 Y  |' o" Q: N' o9 v: `# N: Y$ Z                        row := assignLObj.getRowNo(GlobalDistObj);1 d) h# m7 r0 w$ e* b8 O
                        if Row = -1 then -- since 70  }0 p) F5 `0 W6 n, c+ E5 X7 g
                                if lan=1 then
1 V6 f0 r" p5 q, d# I+ |                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& N5 V& f1 ?% E* J( ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 u& B0 N9 u8 x2 ?
                                else) X4 B2 O6 ~, i2 s- U
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 }  K0 C% M. ~: W; N                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ k( O, m  x" ?+ f& h% {                                end;
* A! F8 Z# c7 B! f' `* A                        else
' {* m# D% s1 C: A                                @.Destination := assignLObj[1,row];
# G) ]5 Z# R) ~# h                        end;                       
, J) E3 ]9 \0 g" S+ ~7 ^8 \                        newDirection(@);7 S. o& P/ p4 Q) f- {1 I
                        @.HasOrder := true;2 C$ U( w6 T' L1 ?" H# z
                end;4 \% K, g+ c' H, J& b
        end;
, g4 j1 X0 z6 k( I0 G+ K: |: z& Nend;        -- of the method1 T0 Z3 q* Q4 R. M. p7 Y& K. ^6 I+ w) K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 y9 s9 E* X% C/ S
3 j* R, m- l$ [( D' x' o这是AGV_putin中arrive的method。$ b0 }, d! s4 f% _' W8 d- O3 \
9 _# w: @. x4 |1 Z- e4 q
当到达物料速度越高时,这个报警更多,
' p2 \. A: C$ t可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 y% J- k$ R' b: K" |程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  L! N5 T% D' e* I, H
; N3 P2 S% K; R. j
另外一个小建议,就是move,所有的move都可以这样+ X$ \: s9 v2 v1 }1 P# m% B4 @# a
if not move() then debug end
" s$ c. d9 v. ?& C) P这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- L& I6 H* I0 S: [$ r3 U* G8 Mplant simulation中的free libraries有AGV模板,
1 m- W* i. S% d+ R! _5 z" a里面也有案例。! U5 s* T: U4 K
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) N! N2 u$ M7 v9 Q% b; X, u; a
6 T& j6 P: ?) U3 G, H" P3 r我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 # g$ }, ]1 P6 K  I' |- x

( p  v; X9 Y! V$ ]那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
; ?6 V. K/ Y9 |0 @3 r这是AGV_putin中arrive的method。9 B. f* t0 }5 [1 @
+ W3 n: z: @3 [+ h- b+ i& j# h6 y
当到达物料速度越高时,这个报警更多,

" t$ w7 z  P7 M4 K% r5 J8 ~另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-25 06:09 , Processed in 0.022562 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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