设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9718|回复: 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') x  G4 I# ~/ v' z# N' G# E/ a. R
*/) o+ f5 A3 s  F" c- N: Q1 \
is, p: A) t, H, I$ P% |4 V
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 B8 l" B' V' v+ H
do
$ y& S8 Q* p1 q/ B! y8 X9 d  I/ _4 W        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 j! f+ N# H+ {  w: b        if current = @.Destination -- else return  c; s; d" U* R  G) C9 v& ~
        then
% @( J6 P  e# z/ `+ |7 }                @.Destination := void;  Z' ~3 U" l) n5 V; T
                if @.occupied then
# q6 g5 S0 ?: B: u% v                        part := @.cont;, ~) I4 f: P( f" |3 L  b" A# a1 G  A
                        @.transpOrder := void;
1 G) b+ j; A/ ^4 W0 [& }  T. y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 V4 ~  K. K- J- S6 m8 Y
                                @,root.eventcontroller.simTime);
; S% F7 _: v# n( J/ @5 ~/ D3 z6 Y                        @.HasOrder := false;$ O1 N8 e' h; c
                        @.DrivingHome := true;6 f' N, Y# l; r; C4 \
                        rgManager.tryToStartTransOrder;
. r8 }0 l* r: N/ u7 E                        if @.Destination = void
  N( k) m; K. d                        then -- no transport order for vehicle @
: `: q% _. q8 F& e# ~                                @.Destination :=
* S, `3 [4 l) Q% F# Q, D( _                                rgManager.nearestFreeStation(@,track.~);
: l+ l7 m7 L7 j% }9 U1 j; g                                newDirection(@);   $ g$ H6 x( r/ J1 C, k
                                if @.Destination /= void then. s* C% y' M& o" F! J* h: W& R
                                        @.Destination.NumReservation :=# E2 _% F* j0 \
                                        @.Destination.NumReservation + 1;
& V) C" ?; k7 b6 p8 p                                end;
* _( k6 @. C) r0 e- C                                @.CurrIcon := "drivingHome";0 b6 H: `% t; F% ]5 g) P+ B
                                @.DrivingHome := true;
( K/ d) D; {( ]9 B                        end;% ?4 t; [# L0 ~  m; `) Q% E7 u( f. P
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 ~8 q+ D/ V/ A9 R. `9 G5 A" W" a
                        part := @.transpOrder;/ Z0 T) t7 }$ G, b
                        part.move(@);-- load part
0 p+ w; u/ k- _  a) }3 n4 k; [                        @.CurrIcon := "load";; j+ K! Q1 J8 T+ e
                        GlobalDistObj := part.globDestination;
0 d% x3 b; G1 L2 `& N                        assignLObj := rgmanager.rgAssignL;
6 T2 W; t9 K, |5 A  g) Y/ ?7 U2 J                        row := assignLObj.getRowNo(GlobalDistObj);: r  j6 g7 T9 W* z: f
                        if Row = -1 then -- since 70; z6 `9 W; t. y
                                if lan=1 then. U8 Z( K/ Z: _7 V( ~8 E5 a5 u
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( N+ R3 n: u% E- w                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 s4 ]7 J* {- X3 v$ k9 U                                else
4 r7 v$ ^; ?# |8 M! v                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& C% O6 M7 e  `  y
                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 D' M/ X; s" G$ q2 k                                end;1 n$ ]; h8 K$ U# [
                        else
" N/ h$ M+ L4 \6 g) z                                @.Destination := assignLObj[1,row];
9 K( i' M6 b' k/ c" ^                        end;                        - G% G/ Q% h" h# R+ x/ k" `6 y1 y
                        newDirection(@);8 a7 l& y- b! G4 P
                        @.HasOrder := true;
; X. M, s, s& w& ^8 m- `* X                end;
. \& {  X9 m7 Z        end;+ w: ~. p3 |' J) _
end;        -- of the method
7 l0 o( r8 G9 V6 ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 8 m5 Q- Q/ A% `, h' O% v
2 m! L+ D. _" Y
这是AGV_putin中arrive的method。
; H0 [" O- Q, p3 i
0 R, q, ~! T9 x4 e当到达物料速度越高时,这个报警更多,% D0 P! d1 ?. D
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 W$ q7 V5 h$ r8 u; T3 o
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ r; Z( C7 g3 V% Y1 l: u& S! Q9 c
6 x* S. G# i9 b5 P2 c/ u" k
另外一个小建议,就是move,所有的move都可以这样
0 k. O6 g2 e% P$ z# B3 H' `if not move() then debug end, c* ~& ^( l: B& h; p/ i
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% H! r& P) T  y+ oplant simulation中的free libraries有AGV模板,
( N$ Q- o8 R1 o7 x0 N6 q' {: S& T里面也有案例。& a& k7 X5 J" b: u( b( z: q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
. U% t9 V- Q* D5 I  p4 @7 j1 S6 _% E
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ' ~" i! z: C5 _- ]& E0 r' z7 t
, g$ v  X) w( R
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" A9 k: N: t. N这是AGV_putin中arrive的method。4 Y* O# {2 @( t7 t# h& [+ ]

7 _; s' P' N. r当到达物料速度越高时,这个报警更多,
( h. r- D! L* o' I' N4 E% m
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-20 03:03 , Processed in 0.018415 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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