设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9646|回复: 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', U; @) f& ?. D$ S% ]& E
*/8 A( o% H7 U( g4 R+ Q0 ]
is: }+ \( |! b1 Q9 ^1 t7 Z0 f
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, j; `; E6 s  ~4 M  b$ H" Zdo
2 z% x5 T5 S2 `/ ~& P# Z        Lan := rootfolder.Internal.Tools.AOLlanguage;, u9 e5 \5 ^" T
        if current = @.Destination -- else return3 W$ S8 ?  ~# A  U
        then
2 f6 q/ s5 H; x3 \/ p" n                @.Destination := void;/ Y7 R: x, }9 Q; D
                if @.occupied then
; Y% u- @7 x6 l' \- H- s5 G                        part := @.cont;
% N7 k$ Z4 ]* g                        @.transpOrder := void;
! @0 [+ l) _# V) W                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ s( U& D, ?9 G* z9 Q5 \, V7 d
                                @,root.eventcontroller.simTime);
0 s5 M! T0 s* s                        @.HasOrder := false;" x8 E" N$ s, @- q+ z: t* i
                        @.DrivingHome := true;
7 H8 Y* v4 _+ L" `( w2 J                        rgManager.tryToStartTransOrder;7 J8 [8 n9 u0 F9 J
                        if @.Destination = void
5 V/ E1 ]4 x4 j                        then -- no transport order for vehicle @! U- H, w/ D+ I1 k+ g( k5 T
                                @.Destination :=
8 M1 {( t6 ]0 o& U7 ]8 G$ `" j2 V                                rgManager.nearestFreeStation(@,track.~);
, |8 m1 a+ M0 |                                newDirection(@);   2 o: h6 D: b4 z& J* Q. e
                                if @.Destination /= void then$ F: B& ^  ~" f$ W% x1 N
                                        @.Destination.NumReservation :=
$ V8 s1 E3 @2 N( Z9 K                                        @.Destination.NumReservation + 1;4 `2 O% x$ I# v! j; i
                                end;
+ E: E% ^# K4 @/ {' n                                @.CurrIcon := "drivingHome";
1 A6 i" F: g' }5 s! V                                @.DrivingHome := true;3 Z" x4 Z: ]8 _$ g
                        end;) h# W$ W+ ^0 L% i% s% H5 D
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% w- S' }" J0 t8 {* k+ A; p0 d, A                        part := @.transpOrder;& u& a6 y* u7 w
                        part.move(@);-- load part5 U- ?0 `* |* b6 q& G
                        @.CurrIcon := "load";
7 d! s8 H+ d5 H- d( C' L/ k                        GlobalDistObj := part.globDestination;
. `6 [, [' t( h                        assignLObj := rgmanager.rgAssignL;
- ?5 i. A$ R' N) a0 M, f+ @                        row := assignLObj.getRowNo(GlobalDistObj);
( l- Q0 S/ E) _" |) l                        if Row = -1 then -- since 70
- m7 E' [6 V3 `4 g! S7 y                                if lan=1 then" F, C6 V4 U% d% z  G
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ M2 Z5 V: k; S: G
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; P! }9 h  ^. r4 j& g6 t                                else
5 v7 m8 l) z9 b% m                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! r7 d6 q/ R2 M7 R, a- A
                                                to_str("in docking station: \"",?.~.name,"\""));                                : R0 y2 t. Q( J
                                end;; Q/ g: O* D; h8 g/ ]
                        else( V& k/ }; w" `3 B0 V; B) N
                                @.Destination := assignLObj[1,row];( B# d6 B: D( Q: U
                        end;                        6 S5 n2 z/ U* l
                        newDirection(@);
9 e: z( M1 h$ O" @- g                        @.HasOrder := true;
$ F- a- M' }6 O$ t, V0 t                end;# D( I  t) P$ M
        end;
2 S; C8 d6 K) e, R7 w- v  }3 `9 a0 send;        -- of the method+ `' }. V9 c# h3 D1 {4 g* l& Z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 L1 Z% H% }& ^0 y) j/ b9 Z2 d
% e" C1 C- g$ M% R2 i3 H) N8 U这是AGV_putin中arrive的method。; A6 X$ `- g' L0 Z& w9 s8 K5 |- _
  F9 L: ]( j5 U
当到达物料速度越高时,这个报警更多,
9 v; g% \' y. P1 N可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, F- t, h) K- q+ V( k程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 ~8 V5 {9 Q, O: V5 O

% I# {5 F& z# D% C0 q* D5 r) j另外一个小建议,就是move,所有的move都可以这样
/ s/ A+ ^1 }: \- `0 j4 k4 Yif not move() then debug end8 o  E' K; O% s  ]
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 M) h4 x) @; gplant simulation中的free libraries有AGV模板,, z+ M8 v2 l* Q" R  a9 }% E
里面也有案例。
2 e- `0 ^" z" V2 L我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
( n* r1 j# t$ M4 W4 ^" N
' b3 T; _$ a9 t3 t+ T8 h: Q5 j$ `我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! z( \! ~( l( j4 `3 j$ u
. Y8 p6 W/ y/ m9 {+ S  o9 t, }0 h4 b那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
& I+ X! H# n: V9 s- T' `这是AGV_putin中arrive的method。- N6 y$ T( |' @* L, ?/ Y" f

9 S, T* p! F$ o1 s; m当到达物料速度越高时,这个报警更多,

8 u; M# Q- `4 _' ^  q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-14 08:14 , Processed in 0.021978 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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