设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7934|回复: 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'
  v$ v; k- e% L" l$ A# A# z6 K*/
; B; R' d* N1 L2 Y: Eis! [" B# f# H% o8 E" L. x
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) u7 @$ z4 P  H- c  Jdo" s: _9 A! W! [
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ n+ a  e' A5 Z$ }9 {4 I3 ~        if current = @.Destination -- else return
. P' N0 {) W& q$ n& u/ f        then4 e+ N8 B8 F# z6 {& m
                @.Destination := void;
* L0 o# H8 |( f3 `: m                if @.occupied then! \4 Y3 w! ^: |- o3 Q
                        part := @.cont;7 o2 O$ Q  Q4 l& l& E  d
                        @.transpOrder := void;( r! h* F5 U. P0 a6 p8 G5 N. P
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, m, `# T( Q# R' ]$ K9 G! B' _6 x                                @,root.eventcontroller.simTime);! ^8 N/ E6 K. K" O: e* v
                        @.HasOrder := false;
4 U- \# x2 @$ P- K1 d) L+ G                        @.DrivingHome := true;
9 K  L. H! ^% t                        rgManager.tryToStartTransOrder;# k, M/ {/ W' H, E
                        if @.Destination = void
" `' m. C; p+ Y! N* W, E& K  g                        then -- no transport order for vehicle @+ f8 e2 U( E6 g8 N+ V/ ~
                                @.Destination :=
+ w% L% P5 H7 O/ ]9 \3 w0 U% v, f                                rgManager.nearestFreeStation(@,track.~);
$ k1 x# j# M, W: G                                newDirection(@);   
% I$ s  _5 i  E4 ?                                if @.Destination /= void then
3 @: ~% U$ j- V                                        @.Destination.NumReservation :=) m6 O) j2 y+ q8 |' o% J
                                        @.Destination.NumReservation + 1;
. X% y$ d1 p4 S+ B                                end;  q, w$ P: V, P
                                @.CurrIcon := "drivingHome";# _0 @$ o; J% L
                                @.DrivingHome := true;* Y9 A! U* Z% A; I. p
                        end;
2 v, @% ^/ G: u6 F                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& J! [0 ^& g$ m2 E- I! y                        part := @.transpOrder;/ X% V& U" C% ]. d5 O& ]
                        part.move(@);-- load part  r" V1 k* h, ~& G, A5 _
                        @.CurrIcon := "load";- V) L  s4 w$ q8 C
                        GlobalDistObj := part.globDestination;/ e. p+ L0 Z+ c( f1 ?
                        assignLObj := rgmanager.rgAssignL;' w' C- A/ I- Z% {1 Q# C4 j
                        row := assignLObj.getRowNo(GlobalDistObj);  C, @6 N# v/ C) o
                        if Row = -1 then -- since 702 g8 J; S3 K( A- o+ a2 ?
                                if lan=1 then
* z1 O- _4 Y4 e5 v5 F. V                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( R7 [7 Q4 f' j" Y! q1 S, s, f$ ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ `- a1 H3 i( ^  T
                                else
( \4 [: g4 {0 E" M1 v3 m; X                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. I$ y5 ]" _* q: m8 A5 m4 B% {
                                                to_str("in docking station: \"",?.~.name,"\""));                                $ _  B  d8 Y& E2 x( E4 h3 `0 x
                                end;6 _$ E; ?/ Q) i: w0 F
                        else
- [1 ^+ ?7 O+ c+ _9 Y                                @.Destination := assignLObj[1,row];
  P/ J( D) i/ y6 z4 l+ Y7 A                        end;                       
- R' n/ w( D: A; _. g2 F2 Y                        newDirection(@);
- S. y! y7 P3 |" d( z                        @.HasOrder := true;
; U& Z; X/ r" b+ z% ~6 W/ ^                end;
- d# Y$ X% ^  K  u" c/ Q% h, S( e        end;
+ K* T: T  n0 ^' Aend;        -- of the method
. b0 z1 e$ m, G" S5 i; H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 O6 n) D. F  L9 f1 b) R
+ h/ ~) y/ `( D/ a/ `这是AGV_putin中arrive的method。8 |: z- k* s" t2 `

' r7 s+ I3 u  U! H9 V) y/ f9 ]) K当到达物料速度越高时,这个报警更多,
3 {4 i+ z$ C) @5 M) V1 ^( k可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ j, B" C) I( @6 ~5 E4 B
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) C( N" I+ V8 n; |* u( H3 n

5 H  g% x+ `% B, x2 _另外一个小建议,就是move,所有的move都可以这样
6 o( \$ z2 l) s. Zif not move() then debug end" z9 {# T) q# Z! a0 d
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
; x8 P( a4 d5 Q2 }0 Z1 Kplant simulation中的free libraries有AGV模板,$ Y, {0 D8 i/ {( Z2 H2 U
里面也有案例。% u1 t2 z9 l2 Q. L$ i
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 J+ y! D' {# h) o0 x
2 Q' r. O& S& ?" P2 Z( m; |我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 P& z- O1 H6 z; V& W6 \% S- e0 H& g
; Q6 }: p7 k) I3 j, Z. w那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 p5 r3 W% x# l+ u这是AGV_putin中arrive的method。
8 s/ v' I  p1 \' l1 _1 F! O" {2 t4 W7 M; M4 m  C5 ~
当到达物料速度越高时,这个报警更多,
% y' O: q; `  M
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-6 08:40 , Processed in 0.023693 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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