设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6510|回复: 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'8 P$ {7 j7 g  s2 i1 @0 J$ G+ Y
*/
% U/ e* w1 d7 Eis
4 a) K  Q& {9 h# w' q! A        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 x8 m  |1 c; \0 m# U8 e( Vdo
" W) d& Z9 h, c( W: s) h, T7 h        Lan := rootfolder.Internal.Tools.AOLlanguage;# g# h4 t2 B) P9 I/ P8 i
        if current = @.Destination -- else return
' h* h' w$ ]* `! k- }2 j        then0 ^2 ~/ |7 ~( {! c3 j9 e
                @.Destination := void;
2 c. a9 W- x2 \: _8 A" B                if @.occupied then: C% H8 w. U3 Z) i2 v  [& z
                        part := @.cont;1 U* r# v' `' \1 Z0 i7 B
                        @.transpOrder := void;% R% p9 h. b; f
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  p( l. l& y7 H                                @,root.eventcontroller.simTime);
8 P: l( Z9 L7 I4 G8 N! Z# R                        @.HasOrder := false;
% w, P' v! Z9 d5 y7 e: Y8 h                        @.DrivingHome := true;
7 y9 }" h4 A: K' q                        rgManager.tryToStartTransOrder;
7 D3 T" N% R! S- V- u8 c                        if @.Destination = void' A% ^- _+ S6 z. k
                        then -- no transport order for vehicle @' T# v% K- h4 i" `# M7 i
                                @.Destination :=
: Q+ v( n9 W  C% y. H3 _- D' b1 _                                rgManager.nearestFreeStation(@,track.~);5 u, N/ G0 S7 q3 N6 _3 ~
                                newDirection(@);   
2 @7 z" \. j, q( n9 l                                if @.Destination /= void then: C3 f1 D  G( ]6 [+ q9 ^2 B
                                        @.Destination.NumReservation :=
( n" }/ ?8 ?9 S2 F                                        @.Destination.NumReservation + 1;) @4 B/ n! [8 U$ W3 p
                                end;
7 }+ q& M$ A6 j7 }                                @.CurrIcon := "drivingHome";, j3 }. Q2 N9 w" t6 |5 `
                                @.DrivingHome := true;
0 [$ l* [% g& U) \                        end;$ L: |* b% q& M
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 t* y# ]- a+ b8 a+ ~                        part := @.transpOrder;; q2 v% e0 w( w) x7 A3 L3 k( s
                        part.move(@);-- load part$ z: E+ m1 A' d' }
                        @.CurrIcon := "load";
" s3 W0 [' V. X7 Y                        GlobalDistObj := part.globDestination;
+ r) y8 W% ^* y2 k/ f                        assignLObj := rgmanager.rgAssignL;
, t) G( t: M4 \  x                        row := assignLObj.getRowNo(GlobalDistObj);6 _9 M+ _1 H( G( x
                        if Row = -1 then -- since 70
" Y- `, P; [, l                                if lan=1 then
8 g0 J- K* Z# \* i3 s& X+ E, L                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 ]# ^! J" S8 ~* E; o: Q                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; V4 C, o8 V2 ^. r9 Z' ~                                else
4 d) T6 o% W# w2 z2 f! F* Z1 d# Z; [                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" s; _, _5 e" o' O4 j. a                                                to_str("in docking station: \"",?.~.name,"\""));                               
4 u; T) u  F+ O$ J# x                                end;% p; u4 p, G5 r# \! _7 i
                        else# _& L- ]8 Q+ }8 |! o7 M
                                @.Destination := assignLObj[1,row];
/ s3 t- `1 Z0 f1 V: L# {                        end;                       
" O# k0 T& o: b3 f, F; n" o                        newDirection(@);# m4 K% n+ N" s7 ]$ t8 k# e
                        @.HasOrder := true;! D$ C4 \2 Y6 E/ Y( b8 L
                end;
: k3 h! R, R' k& u        end;! N/ i1 H; F8 _* v
end;        -- of the method
  O( [; b6 e- l( R
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; j4 `( `( i& c( U4 F5 V' O" Y/ \& Z$ r* m% G8 R: h
这是AGV_putin中arrive的method。
2 C, [6 |4 U  n5 l- T! G5 G  S" h9 s( c% I6 y& y) X  {% i; X
当到达物料速度越高时,这个报警更多,  ?' ^4 z2 |1 F' X: t: u
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) Z6 s) Y  G. L0 U6 B+ N" B
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; C5 p- u/ `% ]
! d5 b7 V; S, b% V  S4 G
另外一个小建议,就是move,所有的move都可以这样9 m+ n2 Q8 N6 f( `+ E' F+ I
if not move() then debug end- r/ V, r- w; z# G- ~8 {
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% O, b7 A/ a# H  [( h  j6 \plant simulation中的free libraries有AGV模板,
, R9 v8 R; w3 E0 C9 j( ?4 H: U5 [里面也有案例。$ y' M4 q. E1 E! r
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 ?) _, ^7 f' O

  f! Y: t! o# w: m我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! R2 J) U4 _6 L/ v9 Q

* |/ Y& S4 F3 N. ]/ k, k那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! c& M  T0 E% q  i# @* g: h
这是AGV_putin中arrive的method。
4 G0 v# k# O1 G* F- H' w1 P1 o
9 }5 A: h- ~- X' y当到达物料速度越高时,这个报警更多,

6 b, K9 k0 H% }另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-10 04:52 , Processed in 0.017754 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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