设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8939|回复: 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'
- J$ `$ k) O& \5 J*/
% _& l7 B  w4 D3 T0 I4 sis
; a% J6 Y9 N3 N        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 S3 I+ Y& U1 b
do6 u- t* S# {  b3 Y0 ], U" \, u
        Lan := rootfolder.Internal.Tools.AOLlanguage;2 X+ T4 s6 @3 h2 u6 n' f
        if current = @.Destination -- else return
/ h; z) z* X/ O. R# {& b. B        then2 |- |. y+ n( S0 P" A
                @.Destination := void;  V9 i& t2 w1 C; B6 s! i2 [; l1 ?
                if @.occupied then
4 @  h7 V* i* B: ~9 I" V                        part := @.cont;7 R  N5 X8 U$ W
                        @.transpOrder := void;$ U9 u" a0 U9 k& b) C+ s& U% t
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# {- N, {6 Z$ m) A1 m                                @,root.eventcontroller.simTime);( e5 D8 M  x0 `6 u2 j) c! d
                        @.HasOrder := false;
+ x$ v/ z3 n$ `. ?                        @.DrivingHome := true;. q; N3 b& y2 ?5 Y
                        rgManager.tryToStartTransOrder;
$ H0 ~2 L- C7 O9 P& {0 G                        if @.Destination = void
. o4 E  A1 d  \* E                        then -- no transport order for vehicle @, S4 o5 c' z0 ^$ y
                                @.Destination :=- R" t9 G7 k  c- H
                                rgManager.nearestFreeStation(@,track.~);( s& c& r9 T& G* F: F6 k& F
                                newDirection(@);   # E8 Y, y% `  @% [
                                if @.Destination /= void then
, g4 F* C! w: ?0 l/ }                                        @.Destination.NumReservation :=
( D7 p) t( x- T: y0 x: D( X                                        @.Destination.NumReservation + 1;$ K0 H2 M; k3 h( {
                                end;8 U, V! h' A) y
                                @.CurrIcon := "drivingHome";; `( q3 `6 R# c7 G+ z) l. h
                                @.DrivingHome := true;5 F- R& s5 }3 \0 l% T( ?# {
                        end;* U! X8 z& F( a  z% N
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* Z- \. w, e0 B6 |6 m+ r- w& D
                        part := @.transpOrder;% [4 j% Q% i  S/ e5 Y1 t
                        part.move(@);-- load part
0 [5 N4 l8 h8 l" K# @                        @.CurrIcon := "load";. {4 {$ ]( h- H. ]; o
                        GlobalDistObj := part.globDestination;
  c' e: F! d" }: s  A                        assignLObj := rgmanager.rgAssignL;
% p  h, \' b  N- v8 u2 W; q                        row := assignLObj.getRowNo(GlobalDistObj);
% q2 F1 B3 B- ?) R                        if Row = -1 then -- since 70
9 t! p* X! v4 d' D                                if lan=1 then+ i+ ^  F, a- Z5 `
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 T7 x6 G) y0 v$ {% H. H
                                                to_str("in der Andockstation: \"",?.~.name,"\""));, ]7 o: M! d) s4 J+ f" K7 ?
                                else' m" [  E2 _2 c5 n
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: c& `' v( t& X- I% O  P5 ]                                                to_str("in docking station: \"",?.~.name,"\""));                               
9 Z; a3 _  g7 C6 A                                end;
. A$ a# n( Q5 Q/ q/ @% f# \* |                        else
; J* U  o0 I9 c- y9 Y7 g" `                                @.Destination := assignLObj[1,row];& O6 i& w6 q. L$ E9 I
                        end;                        $ o  e( |6 T) C$ P8 L) F& i/ M
                        newDirection(@);% I; Q) E. Q# J1 w: l# n
                        @.HasOrder := true;+ j! C/ S; ^0 q$ k
                end;' R3 d, J2 p1 _
        end;
+ ~& C4 b* t; O3 H+ aend;        -- of the method
0 m" n, |3 }% U0 U# B6 ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # x0 n* `3 g- h% P0 J9 _# s
5 N+ V8 p. E8 e3 s7 u( X; c
这是AGV_putin中arrive的method。! Z- x* F' n5 G4 j
9 n! h# U5 l0 s- a( F6 y
当到达物料速度越高时,这个报警更多,
" G# b: H/ R" w1 W" Z8 @6 b9 g可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, \$ i- k: C- o* R: V
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?1 Y. [9 ~! f& S* n7 e/ f2 {

& d0 r5 F. X. N: k8 v; G9 E8 ?另外一个小建议,就是move,所有的move都可以这样
/ N' o8 R$ D! a) Y5 \0 M5 ^. |if not move() then debug end0 S5 }, M7 k3 k' s& E& [, _
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。0 T2 x0 B- N2 B; h, A' t1 D1 p4 @8 c
plant simulation中的free libraries有AGV模板,
3 x2 {0 q" e! K8 Y9 j* q里面也有案例。
" ~1 j& C% ]+ P9 l6 s我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 g  ]3 x8 S7 N2 O9 D# F
# i4 i2 y$ o% U. U# g2 O我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 s. o2 B0 k7 e+ w1 w

5 j* u; }$ e9 U那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - p& B2 G$ C" ~$ w5 Q
这是AGV_putin中arrive的method。
& l# z4 W" {- }4 S" A) @
8 b6 {2 O# H' [  m当到达物料速度越高时,这个报警更多,
6 [8 F8 V  F6 M' M
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-5 09:19 , Processed in 0.015596 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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