设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9633|回复: 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 W- \8 p' O8 a2 \*/0 i$ u7 D( M. D; ]( a; M
is* ]- n1 r7 n$ E1 s
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! P, P+ g/ Z& `. a
do" W/ u0 t5 h0 `, N
        Lan := rootfolder.Internal.Tools.AOLlanguage;
: x! Z% X, b- l+ g: N- i        if current = @.Destination -- else return; U$ ^9 _% e% a6 |
        then
  p8 r# S$ X/ O6 p" k                @.Destination := void;  [# K' a) V* U1 Z# `  H
                if @.occupied then
* e& R, r5 L( _2 m                        part := @.cont;3 t+ {- W5 n2 V: S
                        @.transpOrder := void;; ?- C, ?' c- [7 Z# G5 u
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( b7 l' B4 m) O% m! ]/ h: {
                                @,root.eventcontroller.simTime);
- L, G% C5 @# ^* ]/ Q  A: ^' n                        @.HasOrder := false;4 V- Y* m3 @9 t( f0 q5 `
                        @.DrivingHome := true;
+ c! j5 @! ?5 D9 Q  C. P                        rgManager.tryToStartTransOrder;
, c4 B) W9 s. `' p+ {3 s0 J                        if @.Destination = void
, q: M4 J3 R! x" Y3 f  r                        then -- no transport order for vehicle @2 z/ C" n/ t- {! q! a. X
                                @.Destination :=
& i. \! ?8 b9 M1 ?                                rgManager.nearestFreeStation(@,track.~);
5 C3 y9 q# p$ o6 I                                newDirection(@);   
! y" J: N9 d' O/ F* m# t                                if @.Destination /= void then8 a, }3 u/ n7 ]+ }& o% {0 k( \8 ~
                                        @.Destination.NumReservation :=" q9 o: E( I  Z+ b0 j
                                        @.Destination.NumReservation + 1;5 G7 g( c6 }4 c- ^) z7 m: H+ `
                                end;7 A0 a1 U, u4 b6 F; A/ g6 G0 ]
                                @.CurrIcon := "drivingHome";
) d) u9 J. S* ~' j7 Z3 x                                @.DrivingHome := true;+ W4 i% T: O6 j0 Y9 ~. {
                        end;
; S! C) @* g% e# J1 f                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* E  r) W! U3 W4 o" C                        part := @.transpOrder;
7 K4 Q% ?! S- B. x) l9 s                        part.move(@);-- load part
4 D! p9 A% g+ T* X                        @.CurrIcon := "load";
# Q& p5 f/ c5 r" Z/ s% |# ]4 R                        GlobalDistObj := part.globDestination;
2 Q" y, T$ B; A# ^) ^                        assignLObj := rgmanager.rgAssignL;9 K: p$ k6 ~0 O) n/ x
                        row := assignLObj.getRowNo(GlobalDistObj);& Y8 z1 E% l4 k+ z
                        if Row = -1 then -- since 70+ l; i6 P( L, @
                                if lan=1 then6 d8 j" w7 s6 E3 p0 M, B
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# ]0 v9 w/ [4 d. y; N
                                                to_str("in der Andockstation: \"",?.~.name,"\""));) J% [0 O/ o& l: a% _% F
                                else
( f- |8 F" W3 A1 Q2 X                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: h7 _2 g$ @' n
                                                to_str("in docking station: \"",?.~.name,"\""));                                % e: \* v- L8 i+ Y- [* ?0 L3 d9 n
                                end;3 Y8 y% t- d" h: H/ C$ u2 Q. R' B7 a
                        else
/ m( E" n& C" I% l- |! q3 u                                @.Destination := assignLObj[1,row];" x1 l( ^5 U" r: }0 T2 H0 S! ^7 ~
                        end;                       
6 S( q. ^& P% R8 ~8 ^3 [: P* V                        newDirection(@);3 D) F. U& `4 ]* l- l3 ~+ v2 z
                        @.HasOrder := true;/ y& R$ p' ?& x& v0 a+ y5 {
                end;
8 ~5 u6 X5 R/ B        end;, H9 ~4 _. z! _8 B8 F& U" [
end;        -- of the method
2 m4 E' G% @( Y: I$ P6 j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; j' e: a- F" S! S0 T* s  F
/ ^( t# u$ o: v
这是AGV_putin中arrive的method。5 i, }, B! o8 y2 c

! T# ]& ^7 o* `6 m  }, v5 T当到达物料速度越高时,这个报警更多,6 o# Y+ m, I6 h* e/ e1 [- v: T
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) o+ d% K* Q9 M/ J' e8 q/ y) m  g; }程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 z; G3 l( Y$ U9 ~" Y' _
8 o% p% R2 W) G0 Q2 S0 s& k
另外一个小建议,就是move,所有的move都可以这样
4 ~0 Z4 z* `3 ?if not move() then debug end% D1 I8 B& a& o4 _: w2 A3 y9 Y) T1 c
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 {3 s0 V" B6 D" n( _% K. f4 a) b
plant simulation中的free libraries有AGV模板,
5 T; R% F7 O  T, F. G6 b  |2 g" ?里面也有案例。5 a9 g' _8 V( C# `0 o' o
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) o- u* q5 o& @6 P. e1 n  M! X7 ~: {6 g. C0 z8 p; P. j
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * F; g6 d* R2 v! X$ U

. o6 L" n/ i1 A* x那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
% Q8 ^- T9 ^! ?2 D& }' |这是AGV_putin中arrive的method。) ?" i2 n1 h4 o

& O9 Y3 x7 Z$ Z8 \当到达物料速度越高时,这个报警更多,
+ r  m+ h- K5 v7 V
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-13 05:02 , Processed in 0.022628 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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