设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8247|回复: 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'" M0 V- R2 o7 b; k/ ^( N0 ]) p
*/
- @7 _5 [& _6 H9 Y+ V2 Nis
3 ]& G# s/ K2 _: @' `/ P2 z        part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 y$ G7 e3 p* _8 F& I! J
do6 d/ s$ w( c! S4 d: w8 Y1 L+ J' t5 ?
        Lan := rootfolder.Internal.Tools.AOLlanguage;5 ?. }1 f/ s. V& z% j
        if current = @.Destination -- else return$ i# X4 |" y9 a9 I6 c3 u( S" v
        then
9 l2 A  |; L- G2 ?# z7 \! s                @.Destination := void;
) X5 c6 n$ w  E5 v2 `                if @.occupied then9 l( T7 d9 C1 l: C0 e; h2 m2 Y
                        part := @.cont;6 e; ]$ i# D. p- ^$ t; _4 h. a
                        @.transpOrder := void;
: |' x$ P! v& t* V+ h9 z7 V                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 S5 p7 Q$ T7 f
                                @,root.eventcontroller.simTime);
& L: u5 ^5 \7 \/ j" s: k7 ^                        @.HasOrder := false;
9 h: ?* p* c- a  c                        @.DrivingHome := true;
7 C- z& ^) c0 e. M                        rgManager.tryToStartTransOrder;
  D( \( v/ B4 u! `. Q/ Y/ h                        if @.Destination = void
7 }5 D& A- I* w: C2 F4 {                        then -- no transport order for vehicle @3 u+ L2 t" Q7 C2 Y
                                @.Destination :=
( L/ s+ n4 o* `9 M7 H                                rgManager.nearestFreeStation(@,track.~);' X$ o" v% v0 w  x
                                newDirection(@);   1 [" \1 z+ I  c* B
                                if @.Destination /= void then
: z7 U% A& y" O7 \# A7 k                                        @.Destination.NumReservation :=' e$ G& \" X! _7 [: R
                                        @.Destination.NumReservation + 1;
  h( v5 p9 h' B+ {7 o8 P                                end;
( p$ a5 b9 d' t% ]                                @.CurrIcon := "drivingHome";1 p0 c, L; \" C5 s0 T+ c
                                @.DrivingHome := true;; Z* E( @$ b/ E) b, d: p( I
                        end;
3 G; q1 n4 p6 s/ i; e                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 f& E$ ]3 J7 A  a- L* f6 l% c' m
                        part := @.transpOrder;
! b9 r$ f0 w$ m8 [" X3 c: S                        part.move(@);-- load part
9 S" r1 N# G( I( h, V, T5 J                        @.CurrIcon := "load";
- P# p/ ^# {) F" r. v! r2 n- W; V                        GlobalDistObj := part.globDestination;
0 q  @6 p; s; x) G4 Y                        assignLObj := rgmanager.rgAssignL;* o/ |0 t" Y8 U) v5 \# _' J
                        row := assignLObj.getRowNo(GlobalDistObj);1 f+ e6 T, ^$ A, B+ J
                        if Row = -1 then -- since 70
! b2 c, n, d  `; L* y  i                                if lan=1 then
6 v* ^, J' W  A. D8 K, h                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- z/ B2 j. R, c( _- K                                                to_str("in der Andockstation: \"",?.~.name,"\""));
% l9 b% V) m8 a  ^                                else
) {' f: P! V! t! G                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  q: u8 T1 O$ r6 y# f+ W
                                                to_str("in docking station: \"",?.~.name,"\""));                                4 v0 @0 k& K, ?+ x
                                end;: {7 ~6 d: b0 X4 c' O
                        else& B4 q. I* W0 t' [! @
                                @.Destination := assignLObj[1,row];0 P% L9 f5 j& y% o  {7 H" {3 S1 X! w
                        end;                        : U$ F7 X+ q( |2 }; M
                        newDirection(@);- H/ Q* A6 K- C1 R& {5 I. W
                        @.HasOrder := true;
4 `$ s) g/ J8 Q% j                end;
/ F9 y* S4 \' R1 m$ H        end;
; A0 U* K) N+ n& F. |* F; o/ Uend;        -- of the method
5 a2 ^4 X# e9 E/ n5 y: a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 g. k6 o" W0 H7 k" v; ~1 U) v$ {& {$ ]7 P
这是AGV_putin中arrive的method。& Z6 k0 l3 F9 n9 _
/ @- n- x  |5 c- H
当到达物料速度越高时,这个报警更多,
0 H8 q1 K: \! T' F0 Y* q0 ]可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。7 k0 j- |! w  P5 a8 U
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) ~) O+ Y7 w, m% U: x" k& }! i& P! H2 e. |2 b4 e
另外一个小建议,就是move,所有的move都可以这样
/ Y2 @/ D/ l. wif not move() then debug end
  ~/ l4 y1 h6 x+ U0 u这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 [. n+ V- p. ~8 K9 Mplant simulation中的free libraries有AGV模板,/ s- q; F& M0 X7 K) ]' T
里面也有案例。
5 l' C4 Z+ S; Y: U/ X. \我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% y; ~& d8 I; U0 T' Q

; U$ ]8 n) |" X6 B7 B- [5 ]我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 \) L1 V. d; B# Z& N
- z8 t0 r3 O; d- B那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 4 \, `" `$ u2 w" Y
这是AGV_putin中arrive的method。
! i; c8 W1 g3 t6 G1 e6 ]+ t4 ~7 [) k  ^% n- x% Q, H
当到达物料速度越高时,这个报警更多,
6 P* B! _. {7 ?) h5 q4 \) }" {
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-23 02:23 , Processed in 0.016073 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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