设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7545|回复: 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'
1 ?( Z. C8 \( [+ o*/
+ Q* O  |" m1 n$ vis- L7 g( H2 d* }* i% d
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. j3 h7 Q9 G5 U+ J7 ^3 F+ K
do% L9 ^6 x% m- c+ m, E  j  w
        Lan := rootfolder.Internal.Tools.AOLlanguage;9 J5 d; q5 e: `# A3 r+ o
        if current = @.Destination -- else return
& ^, E0 n$ S  a" [" S        then3 P9 X# \, s+ @/ D9 Q
                @.Destination := void;
( N  \( D% S  \5 a2 B% O( n  `                if @.occupied then0 S8 p4 @, b8 F) ^# Z# x
                        part := @.cont;% h& F1 k! i8 c8 Y2 Y0 f9 u
                        @.transpOrder := void;; y4 O' @) T( f' a- h8 o- G
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 J& k% \3 a3 Y* K% S& p7 ?% N* F* t2 C                                @,root.eventcontroller.simTime);; J0 e" I. n1 h/ h5 p0 l3 s
                        @.HasOrder := false;" p' v/ W/ b9 l& a: H- E3 Z) I( }
                        @.DrivingHome := true;8 Y8 v' ~* ^, M, D* b9 s# t' o) O
                        rgManager.tryToStartTransOrder;
  D  q8 r, a. F' A& p                        if @.Destination = void6 U# [' L. h" K: ~6 X& K
                        then -- no transport order for vehicle @$ Z% e/ W5 Y5 \  l$ Z) Y- ^
                                @.Destination :=& F* E0 e5 Y4 G* s& k" ~6 C
                                rgManager.nearestFreeStation(@,track.~);# y8 x: i' |, E
                                newDirection(@);   
2 E2 ~" W$ u6 R                                if @.Destination /= void then" Z0 z6 J9 Y) s9 P2 ]0 Y4 ?5 k
                                        @.Destination.NumReservation :=
1 j: v: o) u# ^* L+ f5 C                                        @.Destination.NumReservation + 1;
* S- x- [, }) `. p$ `, S                                end;
  B. U5 u  T- ]! a                                @.CurrIcon := "drivingHome";$ F; s  U: s8 K. C. [0 Q0 O* e
                                @.DrivingHome := true;
- Z/ ?+ U0 l$ B( [                        end;: [, o! ]+ Y3 J5 e" r0 Y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 |. P9 X+ C7 y& Z' z  y( ?                        part := @.transpOrder;
3 ^. F6 J0 M* k7 Z$ ~6 |                        part.move(@);-- load part( |9 y0 H& E3 K. j- a2 J
                        @.CurrIcon := "load";* j: B$ G: f" a* b) r: d
                        GlobalDistObj := part.globDestination;8 }; g, s1 Y' K) a, D- A+ |
                        assignLObj := rgmanager.rgAssignL;
4 h- _9 ^& f2 V, Y2 }5 @9 u9 ^% k                        row := assignLObj.getRowNo(GlobalDistObj);' K) |3 G9 ?- `5 n; r
                        if Row = -1 then -- since 70
, G5 Z9 ~+ y% ?' t. G9 C$ _                                if lan=1 then
" X# U  s6 t8 b* R0 i. Y1 U/ L                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ [5 l) ?# O3 q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));) `( L7 }5 B! z% P
                                else" u  H9 [4 A8 B
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ ]) p: ~5 Z/ t. |, H+ l                                                to_str("in docking station: \"",?.~.name,"\""));                                  V- ]1 u* X% _4 L
                                end;
) p/ O. d* }& K- n4 [                        else
6 u5 G, ?/ o, H- b                                @.Destination := assignLObj[1,row];
. m* \; H2 j4 D  a' A6 |& l* E" G                        end;                       
# Y3 ~. F6 K* Q7 m0 E1 M3 J: W9 @% ~                        newDirection(@);& L  P' [/ ]8 n+ \
                        @.HasOrder := true;
0 P6 M% U8 ]- Y; e7 P9 v" X8 S                end;- p3 y9 i2 P0 b1 Y
        end;
4 J+ }) i5 f2 a3 ~end;        -- of the method
7 z- s# B( i4 G, b7 L1 ^* J1 N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   c& V8 M6 _! M" G0 \$ t9 S0 E- r
/ t" y2 Y0 b. \; _; v3 P. E
这是AGV_putin中arrive的method。  e2 B$ M$ Y, c: n8 \
  n  e  L" a& Z2 ?  E
当到达物料速度越高时,这个报警更多,
4 Z, _3 F4 h8 @# @可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 l" ?' n4 z) u+ y. M$ e
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 [/ L4 v4 w9 Y& H4 u
# o3 P  k2 a9 `" x* b9 N  ?
另外一个小建议,就是move,所有的move都可以这样
, T3 @0 J. _2 bif not move() then debug end
; O; Q3 s% T" _9 @这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& `9 q( ^+ c5 ?5 J, ]) a
plant simulation中的free libraries有AGV模板,. n: [: H( o7 f/ T
里面也有案例。8 a+ \1 E/ L9 I. Z) N' O
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
. C) W, f% h: L
+ @9 k, y. f" `( h我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " m8 @3 ]# B! f8 d3 h
# C  B$ t, \' f& K/ G5 s
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ T. g3 T4 M' _6 V+ U
这是AGV_putin中arrive的method。5 s, h5 ?! S/ h: E  a& A5 o0 l
1 O% u2 J7 N% ]9 `, N* ~
当到达物料速度越高时,这个报警更多,

. O$ ?# [% [4 p/ K3 z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-17 11:32 , Processed in 0.020493 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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