设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8353|回复: 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 {9 W' u( h1 o; n$ C
*/
( V4 C+ g% W& }1 b+ S- G, K  |. bis4 R6 _# m5 i& {0 l; u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 e! e, [! M1 v+ ~  B; g* s" Z
do
. G0 H5 O2 }- N        Lan := rootfolder.Internal.Tools.AOLlanguage;: P& c% h' E+ \. e. x1 o' X7 z, N
        if current = @.Destination -- else return
3 E, Y, ~/ Y- ^. V! L        then
2 g) r& r# u3 N2 U" ^5 E                @.Destination := void;  E' W1 b! x$ d8 |' ]/ W+ \
                if @.occupied then
( |9 S3 }$ h1 N) ]                        part := @.cont;
: ^3 i: A! g! F6 b                        @.transpOrder := void;7 \8 {* s9 c8 w. a2 F: P1 t
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 m  b0 ]/ f. N  D5 _& Q
                                @,root.eventcontroller.simTime);6 D( w* X+ y( `# u- H, i5 [
                        @.HasOrder := false;
7 `- d9 @7 d) Z/ S4 K0 t                        @.DrivingHome := true;5 B6 \1 t' D$ z$ T) T7 k$ i$ g  d4 O
                        rgManager.tryToStartTransOrder;
. d4 G! Z8 u, g* @% a                        if @.Destination = void
$ x5 O! u( x$ |0 y                        then -- no transport order for vehicle @
- G2 z9 m  }& H% ^1 Y                                @.Destination :=
- o6 e" y2 h$ p$ S4 _/ h2 \                                rgManager.nearestFreeStation(@,track.~);
! E+ W2 T' [3 k* s                                newDirection(@);   ' X( B6 u! o8 q7 q& Y/ `& ~: |
                                if @.Destination /= void then
6 D3 |  {6 L) g; Q                                        @.Destination.NumReservation :=
% B. o7 v6 k* u* f+ Z9 e! b                                        @.Destination.NumReservation + 1;% U% i* B, S7 x0 }6 _; ~
                                end;
( F! j/ y# G+ t5 S/ ]; g                                @.CurrIcon := "drivingHome";1 a) S/ U" k% w( }+ G: U6 M
                                @.DrivingHome := true;3 H+ ]( o+ ~) Y# I  B
                        end;
1 S% O$ W) p& n                else -- the vehicle @ is empty, both vehicle and part are in the same dock station: N7 X/ }1 k: Q/ R' B
                        part := @.transpOrder;' y/ s9 Q& g6 ~5 b
                        part.move(@);-- load part
# m: @) n+ _% E, A  L( O, A! H                        @.CurrIcon := "load";; U: F/ x7 o' f' T
                        GlobalDistObj := part.globDestination;1 A& \. e4 i9 K( u, V
                        assignLObj := rgmanager.rgAssignL;: T/ e2 T6 t9 k/ I* W% Y* o
                        row := assignLObj.getRowNo(GlobalDistObj);
9 U* ]7 N' P1 [" E  ^                        if Row = -1 then -- since 70" N( `& ~1 @, W1 N9 {1 x  x
                                if lan=1 then
( Y8 ~8 X( e3 p6 Z3 c2 G) f- p                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( M7 R: J! L- s1 i
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
" c, b1 |* K( i. _2 N, E! e                                else
; F/ R9 m; w' G5 {/ T8 w+ n* J                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ [+ v$ B  c3 I* s/ ~
                                                to_str("in docking station: \"",?.~.name,"\""));                                # u+ h& o& [& ^, i4 A
                                end;6 H) V# A4 k9 J2 v- W. f8 K
                        else
0 o9 `9 t: c2 e                                @.Destination := assignLObj[1,row];% ], w) t& A7 l9 Z. y3 V
                        end;                        , I) U' s& T. ]* b$ [9 d, L
                        newDirection(@);
4 l: w+ G$ r" M% m5 s1 U9 W                        @.HasOrder := true;0 P( i3 F( |! N3 M2 [5 o% \
                end;& t; Q; O3 q1 _# c
        end;
7 a8 Z/ r- P8 n4 K/ H4 W4 K8 dend;        -- of the method  P) S: ~  r4 B  C; _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 C( ?3 B+ t) \4 D+ q8 S! `5 j& _8 f
; S3 O+ A6 v& k7 Z9 O6 j' S: W这是AGV_putin中arrive的method。9 {7 s$ A/ w! H" ]  K7 e6 |

! k7 d/ E: D; E$ ?& a+ [  N# A! q当到达物料速度越高时,这个报警更多,& x+ o5 c) w2 [6 Y& W8 n$ z- A' R
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 \& R; {- U" r. g
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?4 n0 t+ ?# }+ u" U2 z" c& t' L
  F9 S: M- u$ r5 k& d! T2 G% F
另外一个小建议,就是move,所有的move都可以这样
  m# n- ~8 p0 C6 z% |if not move() then debug end
5 R- D7 A" d" h1 P3 j3 {# E4 G这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
5 ^" R" m, l+ I: Aplant simulation中的free libraries有AGV模板,
' K" r$ c1 v4 H里面也有案例。
5 P- ^. I, {1 e' U* N; b( X8 J/ @我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" }/ Y) B/ P9 g1 c* v
, V$ H, e% Z% q" t! m% k我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 o5 l& ?$ N7 Y+ k1 Q# u
; I& I5 A9 U* Z" Z' J/ c- G& f9 V& D那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; C  k5 B3 }- s% E: e
这是AGV_putin中arrive的method。, }! K7 f$ @( P! n

; }& X. Z+ g& w$ G! S& b0 _当到达物料速度越高时,这个报警更多,
3 o- Q6 a4 Y2 W& X
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-30 00:00 , Processed in 0.108118 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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