设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9590|回复: 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'
/ c2 k: L" T- L: ?*/
# L9 M* C6 C% h! X8 Ois3 L# v$ X9 X) V# Z7 i9 j
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; Y7 y1 z( V  c! y" j( ldo
0 u- N& |9 J- I+ x. P! R5 m        Lan := rootfolder.Internal.Tools.AOLlanguage;) L3 ?9 x/ P6 L6 F
        if current = @.Destination -- else return
( D3 K4 R, ]$ _) s7 X        then
- N1 g, U0 ]# [0 T/ M& |4 R                @.Destination := void;
9 G7 _+ i5 k, [- E                if @.occupied then, l5 e, s" \: B4 O
                        part := @.cont;3 A4 f% p- t8 V% H. s! v" H' D
                        @.transpOrder := void;
3 X7 u5 f# u$ ~0 p$ v* ~                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" q8 d" R* W8 d. Z* x  c                                @,root.eventcontroller.simTime);
- m  U2 s1 G0 C4 ]                        @.HasOrder := false;
1 d+ A5 c) ]* X                        @.DrivingHome := true;* C9 u3 E, F3 Y6 G; S" h, _
                        rgManager.tryToStartTransOrder;7 u6 p- Y- v5 u$ ?/ J! K; ^
                        if @.Destination = void
6 L- d8 b) Z  m4 b2 i2 c                        then -- no transport order for vehicle @
$ d# ]8 `; [7 e, O( w                                @.Destination :=5 z! f( D) \$ z, f
                                rgManager.nearestFreeStation(@,track.~);
, s9 x5 n, X7 \; Q: k% l/ L                                newDirection(@);   ! f' C9 S* F  {* W4 o! V1 q2 }8 E
                                if @.Destination /= void then- }' B, w3 z6 S) V  r' \
                                        @.Destination.NumReservation :=8 w2 n7 Y9 h" n, z2 d7 A" U
                                        @.Destination.NumReservation + 1;
% P$ S( _5 ]! E# [; i7 F                                end;
( w  A+ ]( ]: T, d8 A                                @.CurrIcon := "drivingHome";3 k! a$ D$ f2 J6 A" S
                                @.DrivingHome := true;4 f% }0 G: }' q- T8 m- ^% w
                        end;
% n( S1 _: e1 _5 ?$ {" E0 r                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 L' R( A; y0 W4 m8 p9 N                        part := @.transpOrder;6 m8 R4 N% p! ?: }5 e( U( \
                        part.move(@);-- load part& F, b' r* T4 e! P8 D8 ?
                        @.CurrIcon := "load";( y% u- s2 z2 f6 W
                        GlobalDistObj := part.globDestination;
  w* P6 |+ G" i! j* p) r9 {                        assignLObj := rgmanager.rgAssignL;6 z" i) i5 ^8 B% M
                        row := assignLObj.getRowNo(GlobalDistObj);
6 d: I1 {& V( c& O                        if Row = -1 then -- since 706 A  Z2 E2 Y4 M
                                if lan=1 then
( g& \- W! X8 ~' ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ e" |: D" \0 }9 {                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. b! P6 G3 C, c; H                                else0 R+ p' H% r5 X  y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' {' y8 ~. K8 M1 z$ I  I- b4 M                                                to_str("in docking station: \"",?.~.name,"\""));                               
) \( v7 s. q/ T7 y                                end;: Y( o1 s8 ]; Z  c
                        else% X# B  V9 F+ T8 ^2 |
                                @.Destination := assignLObj[1,row];; U! W( I' V3 }7 @! @, S, ]% \3 Z
                        end;                       
' \' _$ b5 _$ i4 L% Z# o                        newDirection(@);
9 v4 v* M1 U' U                        @.HasOrder := true;* ~5 t! _7 y7 {5 d
                end;
/ Z  n; P. s$ ]2 o; Y) h- [        end;# D/ L' e+ N- ^  r$ R
end;        -- of the method5 b- N& z, J) d5 m1 J& ~8 `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 M! s$ e0 W/ ^/ g; r

9 a( U$ |/ a) t3 }7 e6 ~' [" N这是AGV_putin中arrive的method。
( a) M7 e5 }$ k4 F9 M3 }0 b
$ ^  E, B& V6 I当到达物料速度越高时,这个报警更多,* s. \) L) B5 M. z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ C$ j$ W" X  L' N5 b程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 v  o( h1 G. a* O' l4 i5 l
1 H. l* g( Y3 s9 B" X/ H
另外一个小建议,就是move,所有的move都可以这样
* x, d4 M. W4 x6 Wif not move() then debug end% v. ?/ z$ j4 ^' h
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 s/ P2 W' a3 ?/ K  A& iplant simulation中的free libraries有AGV模板,1 f# J) O6 B4 f0 C5 a9 J
里面也有案例。9 q& D+ b% Q/ K( G
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  T. e  \) ?& S# d

2 y  I! r' N: c6 C: W我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
+ O! G- `; z! b2 H: ?1 l
' C5 N6 ]% e2 ]: E' m9 b) p0 o- {+ _那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 Q5 `# Q0 a- u5 {2 o" a
这是AGV_putin中arrive的method。
" D! P% P# Q( u4 A6 ?
) E& j3 L3 v% C( O0 i当到达物料速度越高时,这个报警更多,
, i' D  r' Z2 g4 O0 G0 A5 @
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-10 05:38 , Processed in 0.023025 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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