设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9117|回复: 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'# V/ B! l: u$ Y. L
*/
& H- h) Y3 \( o. f8 Vis
# ]+ V2 t% f4 h1 H" Z6 n; @* P! G) Z        part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 d2 @; k4 c6 G3 E  M9 \
do
  v! n% J: `. K0 o0 Y2 _2 ^6 c        Lan := rootfolder.Internal.Tools.AOLlanguage;
9 @' r# ], M3 N- E% k5 x        if current = @.Destination -- else return
0 r: Z2 V! Y+ x# s  v0 X0 h        then) y, M8 O5 p7 |5 g
                @.Destination := void;+ k; }/ D* ?/ \' O1 N
                if @.occupied then9 I% U* J3 v0 K; N, t$ n# d# n
                        part := @.cont;
4 f/ o  e9 w9 u  P/ g                        @.transpOrder := void;
* N% ]& g; O+ [$ a0 D' l$ u                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ A1 O) D+ n4 B) u% ]
                                @,root.eventcontroller.simTime);  O% }' J5 f2 \0 C
                        @.HasOrder := false;4 M1 l& h& s/ f1 D: V9 K$ u- H
                        @.DrivingHome := true;0 a& `- [1 c& p3 K
                        rgManager.tryToStartTransOrder;8 p: F% |  c+ F! G$ x1 a) U1 ]
                        if @.Destination = void. L( ^0 G; ^% m8 ^. o
                        then -- no transport order for vehicle @2 }+ N% o' U, v& Y: V
                                @.Destination :=+ @4 C5 Y' Y% O0 Z
                                rgManager.nearestFreeStation(@,track.~);
$ e7 x0 c! ~( R& L( J$ c                                newDirection(@);   8 [0 ?' G! l* _) t' a& F: E
                                if @.Destination /= void then
% `# Z( @4 k0 ^                                        @.Destination.NumReservation :=% A, z5 B6 h3 w4 n" f
                                        @.Destination.NumReservation + 1;! _6 P. }6 p5 p( c
                                end;5 j5 Q( E1 b9 B: z" Y) S
                                @.CurrIcon := "drivingHome";( E" K$ M) z( t% P7 K; y& ~* n* w
                                @.DrivingHome := true;
, [: j+ ~# R" V  Y" ?                        end;4 h% B) u0 X. T7 ~, b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& D, A6 E) J5 j& c5 Y3 s                        part := @.transpOrder;
% ?2 W7 u" m" t- t: _) X                        part.move(@);-- load part8 x$ [9 ^8 T  v
                        @.CurrIcon := "load";4 f; J8 h0 C! k
                        GlobalDistObj := part.globDestination;- s: z% A! q& u0 q  c, m/ t, W
                        assignLObj := rgmanager.rgAssignL;2 L- z. i8 J) H/ r' M2 H
                        row := assignLObj.getRowNo(GlobalDistObj);& x0 `4 b/ Q2 I5 ]6 ]: `
                        if Row = -1 then -- since 70/ c' A1 C$ w  q; g- S9 l7 C
                                if lan=1 then2 |& J1 c) n' K& j, V+ `# [: t$ R
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ z+ D( E& ^4 ]$ L& K1 n                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! E3 ~# X  r. D0 \                                else
; _( ]2 J, t0 ]8 V6 g& p2 o8 D/ `                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& c5 M, M3 _, B+ _+ q& k                                                to_str("in docking station: \"",?.~.name,"\""));                               
& D1 o8 K' `! k+ x+ a1 W4 ~+ c                                end;) b" H" s4 U3 U0 {7 d
                        else  K2 q* r1 @5 Y- r" y
                                @.Destination := assignLObj[1,row];0 M! H4 G( |1 J) I$ k% p/ I
                        end;                        & B+ T5 h2 C1 J/ O  V. q+ a$ d. X
                        newDirection(@);
9 @1 e8 Q& d  L* \" K0 V% W                        @.HasOrder := true;
, o" {4 \6 ?1 t( L8 g                end;
2 i5 `5 R- q9 Q. h7 R        end;
; R- a' ]3 q. M1 U3 {1 ~end;        -- of the method7 s6 @# Z4 G6 ?9 ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 C  j( O' i& |  q% V& X& j  E" x' z2 \
这是AGV_putin中arrive的method。3 W" P* ]" ~) \$ T8 @  H

( {" P$ w. ]$ d, X! ~+ _. y当到达物料速度越高时,这个报警更多,
3 R3 l( q2 Y: n+ Q' i可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 u! Q; Z* S! R- V  L) g% B; S9 D
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. _0 ]. k* L7 O5 @3 E
4 [8 A4 |8 K) U3 i( X另外一个小建议,就是move,所有的move都可以这样
( s2 u! G9 @' s8 sif not move() then debug end2 C- A4 n8 M! B' [& S
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- A4 n2 P  P! w, H& [4 g/ y4 r% dplant simulation中的free libraries有AGV模板,
+ A+ K. a1 C  W; A0 S里面也有案例。
$ J  W/ y( Q! ?4 @% a3 N" G我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, x: ^# R$ U( B4 n, ^1 {% L/ c! U" R2 U+ m5 k+ Y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 M) ^% \$ K' @! U) }# I
; j4 y$ u) X, _% ~2 h8 W
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ E3 [, N, y- T2 y这是AGV_putin中arrive的method。
& x+ \. u, U* L9 U' M( Q! o. e: w4 e* F6 E: t
当到达物料速度越高时,这个报警更多,

/ Q# i/ n4 ~" o: n& K另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-14 18:07 , Processed in 0.015009 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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