设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8153|回复: 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'
) c( S1 A5 v! \  N5 y  K- L*/
8 M) J5 ^( e& u: k8 ~2 y5 U, Tis+ b. `$ j5 T+ X8 S* s4 D
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* I5 C8 Z& j1 n- C. X6 I/ g" o
do
" S4 A4 ~& O+ m1 d        Lan := rootfolder.Internal.Tools.AOLlanguage;" Z' w. o% P3 Q3 a# ?+ _
        if current = @.Destination -- else return
& ?! t' Q8 v8 D% d        then
% K9 `' h  A7 i: d: t5 W                @.Destination := void;: x6 m! O* p* B$ G* F6 V  k1 K
                if @.occupied then
+ P# I0 I, `+ {' Z4 @' r                        part := @.cont;; m8 w& x' j) k$ d2 h) }# H4 V
                        @.transpOrder := void;
; ^; |( U5 M4 d  A& E! Z                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 l# ^+ b8 Q) m
                                @,root.eventcontroller.simTime);
  x+ [+ V; _: `: [: f/ a# V$ R                        @.HasOrder := false;8 F2 U: }# Z; S# `3 Y
                        @.DrivingHome := true;
- N8 c; G$ P- K: {" `! e                        rgManager.tryToStartTransOrder;. S) _( x4 u% e6 F1 `, S5 m/ T- R3 C
                        if @.Destination = void
- o9 ~$ X7 D$ N2 @/ {                        then -- no transport order for vehicle @0 ~8 b" C1 v0 [) c: X2 U5 i8 X4 D: K
                                @.Destination :=) Z/ c( v( j5 H- E  K( Q
                                rgManager.nearestFreeStation(@,track.~);
- i0 f% ~% t+ g6 |2 h/ B                                newDirection(@);   
/ z- I( v2 b: Z5 o& Y" D                                if @.Destination /= void then+ U! m+ [6 R9 \9 n; u. ^- u: e
                                        @.Destination.NumReservation :=9 w4 g, ~6 a: U# `- C" ?8 Q, x4 [7 o
                                        @.Destination.NumReservation + 1;; n5 S7 L* |6 a6 [  ]
                                end;
" X; f; f' ?: [5 W! ~) k2 O                                @.CurrIcon := "drivingHome";% N. b: b$ X7 T" g
                                @.DrivingHome := true;9 n3 N; k4 m7 `+ w2 b
                        end;
0 ^8 g$ Z3 m# {5 J0 U! M% {7 L+ q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% L5 r. L( L1 I: U4 r4 P  E$ x                        part := @.transpOrder;  u3 R! ^* T4 ^7 `: z% i
                        part.move(@);-- load part
% X" _7 Z8 D! y* K                        @.CurrIcon := "load";2 ^& `' y9 y) `' q
                        GlobalDistObj := part.globDestination;2 _' a, Y7 W3 s1 E  [
                        assignLObj := rgmanager.rgAssignL;% H+ o; v- Q& n! z
                        row := assignLObj.getRowNo(GlobalDistObj);! O# p3 \$ `: \% h
                        if Row = -1 then -- since 70
9 d# _# t; ~" e; G, b/ I# x                                if lan=1 then* t1 U: n8 |$ {8 d
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ E* \: T$ ?1 b5 W! \- {$ I
                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ k/ M! q; l" E
                                else* O0 }+ ]; E1 e1 B
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; t) R. q6 |1 m2 s7 }, E. ~1 n
                                                to_str("in docking station: \"",?.~.name,"\""));                                1 ^8 d0 c. u/ C5 o5 k
                                end;
, _6 j# n  H% c$ e# ?                        else
# L# W8 K) ]: p: Q                                @.Destination := assignLObj[1,row];
1 Z" K7 h2 y* E4 D1 b5 y  ?  [$ R# A& Q4 B                        end;                          ?7 _, }4 F, J. n0 _; x  Q( k
                        newDirection(@);
# x- N- C% n: a5 }3 ]/ j8 E                        @.HasOrder := true;5 x, X1 ]9 e! V  Y9 [
                end;
% D! L( ^5 s' F8 D) b        end;8 @% O3 a! @; T7 a
end;        -- of the method) O7 r& P3 x! c" q" ]% Y* C! k" O: B! S
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + B0 P4 r# |8 X
1 X1 J2 Q8 i. b4 l
这是AGV_putin中arrive的method。
0 s* d5 p& Y9 B) I2 T7 a& d
$ s& _* y; ]' V1 E- s当到达物料速度越高时,这个报警更多,1 n9 I' |' ?" t4 l# |
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% o' @7 l- X" K6 N  y/ d7 R
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 _0 k7 q/ n$ {7 E' g/ y! d4 ~2 A& b1 b$ J& a  J: w$ d
另外一个小建议,就是move,所有的move都可以这样6 e5 b4 U4 D! ^& F4 Z( \
if not move() then debug end1 C$ P5 Y/ Z9 g4 i
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ p; w* P/ }" V) G6 S  `
plant simulation中的free libraries有AGV模板,/ U) T# u+ v$ ]8 ]' Q
里面也有案例。/ ?5 Z( P9 t6 G# {- x8 c/ b
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 ?$ @. f$ o' J$ R) f% K& ?# ]8 q/ R2 e
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 Q1 p0 K: O5 S# L) w/ P; Z5 B
) j! c1 L1 C* v7 |( u
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: Y# x' ?* ~6 R9 L8 Q这是AGV_putin中arrive的method。
0 e& E/ u& p! n' r8 |" j/ Z. o( T5 c8 F3 r0 W1 J6 f6 v1 J0 C
当到达物料速度越高时,这个报警更多,
! l1 S4 Z9 n+ n% U7 u& b# n) l; o9 E3 W
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-17 17:44 , Processed in 0.021773 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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