设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8684|回复: 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'! j# o. z6 t  I' {6 c7 h* G
*/1 r& k. x  m3 h' F# \9 Q
is
! x/ H$ @# M! ?! v        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" {4 k8 W# i& W/ h
do  R+ h/ }8 V. Z
        Lan := rootfolder.Internal.Tools.AOLlanguage;
# q7 m- e6 O/ q! i/ b& _        if current = @.Destination -- else return6 I9 w9 x/ _( A: B
        then
- ?2 l; o. N1 `, n: w. r                @.Destination := void;
0 I4 r% Q* E6 K/ J6 c1 ^                if @.occupied then: i, T- D7 ?1 C4 h% M8 W8 s; I, p
                        part := @.cont;
& ^8 ]; Z; l- S  `                        @.transpOrder := void;
: w& c0 N: a0 f8 n                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," d, w  M1 |# E6 Q# _
                                @,root.eventcontroller.simTime);/ k' G/ U! g+ t2 Y: @0 q# `
                        @.HasOrder := false;
6 ?* g$ h  N; K, `                        @.DrivingHome := true;
  Y4 |2 d* j0 C: c8 g                        rgManager.tryToStartTransOrder;
. I6 `( o! e0 t. S, C6 f2 X                        if @.Destination = void
8 H2 X' V* d$ \# |5 c* Y% E                        then -- no transport order for vehicle @
6 f8 Q0 v2 i0 A* Y                                @.Destination :=
) U. H) b$ R! o  Z: v1 U; i1 I                                rgManager.nearestFreeStation(@,track.~);
' i  z; N0 p) ]                                newDirection(@);   
9 Z6 S+ _/ t7 @* D+ C                                if @.Destination /= void then
. ]7 O$ Z+ K* ~3 A) q# q' }$ ?                                        @.Destination.NumReservation :=1 v, }6 [* ^+ e) ]4 N  F6 K4 Y
                                        @.Destination.NumReservation + 1;6 w$ q7 [* k% ]$ w# P+ e" v
                                end;
; B) R% k& u! g1 D: ]- T7 L                                @.CurrIcon := "drivingHome";/ I- U4 j# W  f4 J7 t" E) a
                                @.DrivingHome := true;
2 m% W/ W6 k3 r5 x/ J                        end;
2 u- i0 y' ~/ n4 A: V# H) a8 ]                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  v3 E& K8 _" ^3 ]$ V% Y                        part := @.transpOrder;
; u" Y" ]8 y5 ^9 x5 L                        part.move(@);-- load part6 v; V" a- P2 P: R
                        @.CurrIcon := "load";+ b4 Z- ?! s& h" r8 P0 }5 h
                        GlobalDistObj := part.globDestination;
# ~, r# F% k- c2 ]1 J                        assignLObj := rgmanager.rgAssignL;! D) f. \; D7 f1 A( f& S; f
                        row := assignLObj.getRowNo(GlobalDistObj);* y4 m4 Q, f- j4 f; f7 d
                        if Row = -1 then -- since 70
! S* Q) \. `- B4 E3 s$ M( c1 u                                if lan=1 then: J9 R5 ^$ s4 `, u
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 V$ B5 |) {( A" P. c. O' T                                                to_str("in der Andockstation: \"",?.~.name,"\""));
" k& z6 C0 D) f6 m' b# W) ~; j8 X                                else) |- f! v* a# f
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: e5 _( c+ S* R; n7 P" v
                                                to_str("in docking station: \"",?.~.name,"\""));                                " |# D& c7 ~3 _7 Q
                                end;
! Z! E7 g1 E) c                        else5 v/ U  C! n; ^- ~8 A5 b
                                @.Destination := assignLObj[1,row];
0 P6 a- x4 c  z                        end;                        ! L0 K( c3 I% E. n) b8 _! X
                        newDirection(@);
+ p5 _  r  z, y! m% ^                        @.HasOrder := true;; l, h6 C# p7 s" m* J# P
                end;% `( W2 L& x0 z* ~
        end;
' r/ r4 W+ U; G& q- \- G0 _end;        -- of the method/ y. T1 N+ `. d# ?* g& e  }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! n8 @: {4 u  i: c9 H) |
( F% w' ~+ U+ j2 G; L: Q/ |这是AGV_putin中arrive的method。
6 p" \* K  z! M
) f$ F4 @; ?, p) B7 a) ?1 C当到达物料速度越高时,这个报警更多,( Q- r( Z( w  T/ S5 T* G9 }
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 y! h1 b! \( g2 T9 C: J
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 f7 o" B, q3 e- ^2 A% G/ R
. }  }6 p3 d) H4 n另外一个小建议,就是move,所有的move都可以这样5 e( V" l9 z' ?  x' p+ @
if not move() then debug end
1 g8 h1 \- Y( B% i4 r. x9 s+ A这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  G1 {& P- V  @8 m* a$ W
plant simulation中的free libraries有AGV模板,( Y" o4 }6 s# k  K. d
里面也有案例。, E* ], u$ ?& }9 ]: U
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 D. `/ L" q0 R4 k9 Y( i5 N) M1 O$ y; T7 L
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 e% f1 j7 ?* }
7 \+ N$ \4 x6 S5 h; k- `
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
& }( V( e* e' ^% m这是AGV_putin中arrive的method。6 Q7 [9 U: r- k
+ Y' [" O0 O4 w. J9 {
当到达物料速度越高时,这个报警更多,

+ t- e# X$ F" P! G4 o. d2 ?9 [0 D另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-20 07:29 , Processed in 0.017803 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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