设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7139|回复: 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'" N1 q4 r$ B6 m
*/7 h, W& s4 n- K; O. [4 h- y, q5 N
is5 t( W4 ^$ e1 H/ d+ Y% O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 e& \5 K. @* d6 E- O% }. w) L
do1 V3 O* M8 j4 d4 _" a' A$ {
        Lan := rootfolder.Internal.Tools.AOLlanguage;, x$ y+ f1 A2 ?
        if current = @.Destination -- else return
  H' o) c+ `2 X5 h. O3 [        then
# N% Z4 }/ d% \                @.Destination := void;1 _: e4 ^  K7 r) z
                if @.occupied then
) B) A4 t) i) f' ?                        part := @.cont;3 e0 d4 F3 O! G: ~) o' ?5 N" l
                        @.transpOrder := void;; ]; \! i% E+ G6 s3 @0 o, C
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- U/ u! m4 A* H                                @,root.eventcontroller.simTime);4 j0 x  s- z8 x4 x; Y2 s* d5 |+ ~3 }+ @- T
                        @.HasOrder := false;
; a9 k' I+ Z# Q8 O7 x' V" I) W                        @.DrivingHome := true;8 I7 p. @9 `+ w! M; o
                        rgManager.tryToStartTransOrder;( U$ u" I/ ]* Y/ ~) U4 @3 k0 k8 i
                        if @.Destination = void
5 ~4 F) L+ O, t( R" o( V, `# g8 _                        then -- no transport order for vehicle @# r: r3 z9 R6 A7 t* D; G
                                @.Destination :=" G) H6 K1 R+ \+ A+ |+ K7 \+ h1 P
                                rgManager.nearestFreeStation(@,track.~);* s. O+ `8 B$ r- J8 g9 `
                                newDirection(@);   2 P( ~5 g: G1 @
                                if @.Destination /= void then2 n8 T( T2 f9 T& R& b
                                        @.Destination.NumReservation :=; x2 H0 w9 m' \8 P0 Z! s# J. l
                                        @.Destination.NumReservation + 1;% @9 p' i9 K6 p
                                end;
4 I2 E' I9 ^; V" l9 X9 _$ B                                @.CurrIcon := "drivingHome";
/ o' q* ~0 K: z- @* j                                @.DrivingHome := true;/ D% n) d8 o0 T) F7 U4 W$ o) r
                        end;+ f) Y' B1 F' ^2 j/ H/ x
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station  v; o; [4 B7 ~. ~% _
                        part := @.transpOrder;. k$ w7 O/ t7 P0 z. o, ^0 @
                        part.move(@);-- load part
$ U: k, @: P9 i0 a9 G/ g                        @.CurrIcon := "load";
; R8 {$ h  H6 x                        GlobalDistObj := part.globDestination;6 J* r& q+ C: i/ h& ~1 x! l
                        assignLObj := rgmanager.rgAssignL;
$ A6 i- V% Z7 g, ~* f0 _8 D0 N                        row := assignLObj.getRowNo(GlobalDistObj);* B0 w# O8 N: D" K' }! c7 i
                        if Row = -1 then -- since 70
& z: Z6 G4 @! Z% Z                                if lan=1 then/ X: O1 o$ K/ }8 r- ]: m1 U
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; P0 H/ |# m! h/ p/ p                                                to_str("in der Andockstation: \"",?.~.name,"\""));( T( y. F5 O3 m9 t  X
                                else
3 I9 q1 |8 R4 U3 D8 J: c" g/ t9 `                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( s* m8 a( q* o  F0 m  ?" L# I
                                                to_str("in docking station: \"",?.~.name,"\""));                                7 `0 Z. \& I1 d+ _' b) [
                                end;0 ]& B. o- V1 M, o
                        else6 f' K! W7 C, ~4 R4 D% |
                                @.Destination := assignLObj[1,row];
6 g# I( L  }: |" l, o9 L                        end;                        7 G1 C# m4 U$ \, @
                        newDirection(@);1 C+ ^9 K' ]) Y. i. i7 {  B
                        @.HasOrder := true;
9 i* w# g  t, d& s                end;; f8 V: d/ u, l% i, ^/ G
        end;' j1 j# m& `9 ~1 [% R9 W5 P
end;        -- of the method  o) j# F. t/ M: J: _! n: b5 u3 f
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' U6 M  z) S% B4 [
1 w3 \1 T, m2 o0 I  m) U这是AGV_putin中arrive的method。; ^/ h! |$ c& D, I/ }$ M* O9 G

4 R1 a/ t  n9 [0 b1 g当到达物料速度越高时,这个报警更多,
. R# R6 v8 I; k" a$ H6 \可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  M& V/ R0 P2 G- l! g8 W9 Y, A  z程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" ~3 y. Q# j2 W, \( _. P  q# k4 B8 m6 I0 b
另外一个小建议,就是move,所有的move都可以这样
" H" J+ D% s* X5 k, `- c3 k5 {, ^* Pif not move() then debug end
4 s5 y2 Z' |3 r6 A& e这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* M* _. h% R; J5 J! _2 j
plant simulation中的free libraries有AGV模板,
6 j; w7 @0 j/ }4 L里面也有案例。
( o6 D% k9 f3 q9 \( R; ?' f( E* h我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# Q" ]- [7 O. @+ C( a3 N3 `
) D0 V$ R; w4 p/ x1 i% Y' p我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 v6 G, \- w2 X: J( Y2 S* u) {7 ~' H. k' \! ^% f4 u2 l
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : B6 _2 E2 a( i/ ]6 r5 m4 d2 h
这是AGV_putin中arrive的method。
4 O" u* T9 n" _1 d5 X
2 |4 H. B* T7 A3 T& x1 I当到达物料速度越高时,这个报警更多,

* l2 ?  |, Q8 a: `1 u/ {另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-21 03:22 , Processed in 0.020572 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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