设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8499|回复: 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'$ j9 F! ~# R1 h; B- t
*/
$ }  [+ q9 p$ Z7 j9 Iis0 x- e5 ^9 f  b; |3 k
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) L1 F+ u7 Z/ o5 x4 gdo& \, x5 ?9 \* I! W* H4 `2 s  }. |$ [; @
        Lan := rootfolder.Internal.Tools.AOLlanguage;
, s! r9 {6 @/ X5 ~  n        if current = @.Destination -- else return
& ~- h+ h" R& X$ I- N' w; r        then
& @" V2 S4 J' e# H7 u, ~# Q5 y! e                @.Destination := void;4 D; O, W! z& p% t9 d
                if @.occupied then
6 d; ]$ D( h  m1 J* d                        part := @.cont;
( z* O( X: A' n- M* e8 c                        @.transpOrder := void;
- |" Z# E, r0 r9 A* f                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 B5 d  J! j2 I2 H) U0 Y, Z
                                @,root.eventcontroller.simTime);
2 L$ }! I' `, N: b9 C9 l                        @.HasOrder := false;4 u- s* D+ X) ^6 C
                        @.DrivingHome := true;
) o' N3 @- w/ I5 S1 t                        rgManager.tryToStartTransOrder;1 k( Q& Z( T$ m* `  a! W5 s5 V8 ~, a
                        if @.Destination = void
4 ~! G& k' f/ ]6 @                        then -- no transport order for vehicle @
7 }0 f+ t- P9 \0 O& A) M                                @.Destination :=5 a4 L* ~# d" C8 o0 `
                                rgManager.nearestFreeStation(@,track.~);2 I) G5 e) F7 V, D
                                newDirection(@);   % K/ H5 ~" }! |/ v" \
                                if @.Destination /= void then
( [& ^/ X: q' a3 t' A# X4 i                                        @.Destination.NumReservation :=/ M: r) K8 p# B
                                        @.Destination.NumReservation + 1;* C' Z! L0 k5 ^1 g
                                end;
$ ?4 R' u) \/ ^                                @.CurrIcon := "drivingHome";
# A7 d" X. h5 I' E" F8 L                                @.DrivingHome := true;1 J8 T, K0 v$ G& w( j
                        end;6 o1 N  C1 ^5 k/ Q' D2 ~
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station( d+ }! b7 J0 X7 q& t) ^! g/ S9 m
                        part := @.transpOrder;
8 W2 L& U1 x/ T1 G2 r                        part.move(@);-- load part2 O2 W5 S- y# W
                        @.CurrIcon := "load";. l7 o, w; n0 y6 P: r
                        GlobalDistObj := part.globDestination;
# Y9 o% T' g' W( b# T3 ?                        assignLObj := rgmanager.rgAssignL;$ D7 t, ?& i9 l. g/ L, L% i
                        row := assignLObj.getRowNo(GlobalDistObj);
( E7 f& @% ~8 a                        if Row = -1 then -- since 70
' Q9 d, R6 }' q0 Y5 ~$ D                                if lan=1 then
  H# y) ~  v' K% y5 d                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# L+ G! J" N! u. H3 e% @                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 i! ^  p& I7 ]9 r1 m. s
                                else9 n! J& U% o, m+ l" M, k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 s. `& s2 O5 q! I                                                to_str("in docking station: \"",?.~.name,"\""));                                4 v7 i3 P) P3 b6 I, U( P
                                end;) w: F) A* `* V2 x
                        else# d9 D, \1 k) L
                                @.Destination := assignLObj[1,row];* @" S% b( Y( O! `, \' \5 y- g
                        end;                        3 O# d% {2 S0 B! E
                        newDirection(@);
+ @) v) D2 l0 b; T/ i! u' [                        @.HasOrder := true;
# v0 o2 p3 i( G                end;1 b2 t4 [' ?2 J- Q" D+ k5 P9 B
        end;' K8 J; F$ k0 x: u. c- ?( n3 W
end;        -- of the method
! c5 v1 {6 c$ E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
1 ?3 d' A5 U1 z
% Y; e4 F- M6 F这是AGV_putin中arrive的method。
9 a- n2 M% J% E$ q- a
& U3 `" m" v! s0 N. g% H0 D当到达物料速度越高时,这个报警更多,
0 f. `8 `) e) G4 |# K) k2 t可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ y* V% p$ Q- L3 p; u! v" D; r/ A6 Y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
( ?2 k4 q1 B& q# T2 }7 ^' D; u. s' Z! B7 ?- f
另外一个小建议,就是move,所有的move都可以这样
! p8 L, k7 t2 X6 Y7 L4 j* @* t" fif not move() then debug end
+ w7 h9 D# L7 ]* q; ^/ s( w这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) x9 Q' [! D) H  v$ Yplant simulation中的free libraries有AGV模板,
  Q$ ]8 q6 V" j$ e( G9 q里面也有案例。; o3 j  p8 o% B1 ]4 u! }
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  S7 }, c/ h! p$ z3 t7 J; w
! h; Q- k2 W) N4 ?5 F6 k我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: T0 D2 I* i) C. Q
2 M; a0 i' J! ~5 d! F1 \那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
; w1 W+ S7 |8 h- f2 s这是AGV_putin中arrive的method。( {! t1 S1 b% m

; p  y( g5 M3 S$ G$ G2 f5 _当到达物料速度越高时,这个报警更多,

) r3 G7 H: i3 y( J另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-7 17:24 , Processed in 0.015673 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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