设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6729|回复: 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'
5 x; t6 K/ u( U% |0 e' R( I*/# {1 j& b- Z. E0 z
is$ C6 O; f0 h+ @
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( F) S6 c1 D# ]8 }4 v9 ?6 gdo! J8 A0 p+ E8 E' c( M
        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 B% Z: d2 \3 J+ ~6 ]        if current = @.Destination -- else return
, c2 a+ c& |' |8 n* V        then* v/ ~3 {- T3 }) y( n+ Z) D5 M& C% T
                @.Destination := void;
8 D3 {  [4 p) p1 V                if @.occupied then
& f3 l* i7 v+ J' j: c! t% x# t                        part := @.cont;! G6 r6 M  y  b8 `/ A; Y) \) z; G+ S
                        @.transpOrder := void;* M5 V. B, S0 h, {  d( w. Y9 m
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 w% f7 F$ K, n, \
                                @,root.eventcontroller.simTime);
& \& {, c! r) f3 `3 W$ Z                        @.HasOrder := false;
, A" ~" L! t) |' l1 k% [5 T6 n                        @.DrivingHome := true;$ @- F! R, H/ ]! g+ X
                        rgManager.tryToStartTransOrder;
* Y+ [7 ]: Q0 ]                        if @.Destination = void
- o7 t, Y, u+ H' {                        then -- no transport order for vehicle @
+ G+ j% h4 Y+ k8 ?6 L; F& B                                @.Destination :=
/ P5 u' z5 H5 c                                rgManager.nearestFreeStation(@,track.~);: g+ {( \0 ~6 x9 L5 G$ Z
                                newDirection(@);   
% D2 J$ F; p# y                                if @.Destination /= void then6 b7 x+ }& L; b8 B1 B
                                        @.Destination.NumReservation :=
1 X2 A* a' t0 K$ e# \. A3 o$ E                                        @.Destination.NumReservation + 1;
, C6 d/ i5 O- v$ c3 i                                end;7 |, P' ^+ w1 ]0 _
                                @.CurrIcon := "drivingHome";
/ T  u- S6 [$ c' _- k                                @.DrivingHome := true;& s1 [/ m' p" y4 A& ~' i( L; S
                        end;% ~; n. E6 t* A! F6 g0 K# t; E2 V
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. g. d5 m" `% P4 [& J8 r                        part := @.transpOrder;1 {7 v, u5 l( b" u
                        part.move(@);-- load part) k9 G4 l* O( D# O( D
                        @.CurrIcon := "load";/ @* Q* V4 R( ?/ J9 |* |' b
                        GlobalDistObj := part.globDestination;
- |4 T, V1 o2 s1 N/ K                        assignLObj := rgmanager.rgAssignL;
- b: V7 v, S6 z, t, A                        row := assignLObj.getRowNo(GlobalDistObj);# ~$ H( g1 p; f4 O* X  a" P
                        if Row = -1 then -- since 70
* p1 S& I0 B3 p& w+ E5 V                                if lan=1 then4 c* P. D; L; c3 a& p
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 r9 D( }" T% M' i$ T* n' g" g/ X                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 O3 P$ v; w- f( t9 Q& L4 g2 M: q: p. U                                else% M; r8 j0 k5 B; l+ g! x# R6 `
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  S* ]8 {, {0 N" g9 v
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ l: B! G$ B5 G$ u2 U" B                                end;
( G0 Y; V5 g1 U( [; [                        else- a9 a5 t+ b3 E. w5 s: S
                                @.Destination := assignLObj[1,row];
7 v* F3 E5 D9 J, E9 {                        end;                        " ~( U  B: [' h. g* w
                        newDirection(@);3 L* G- B& `5 K+ N6 M( f2 i
                        @.HasOrder := true;7 ?/ y8 y! v4 ]) q& g6 Z3 l
                end;3 V" O' q# L/ h% z
        end;
$ C$ z( e8 U! _6 Wend;        -- of the method
* N/ i. x5 F, ]. T; O; J( r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 8 v1 L: g2 [" t2 H+ {! t# F5 n

3 g2 Q# C9 E2 Y- H这是AGV_putin中arrive的method。
/ ]9 r4 J5 d3 g$ C+ a% \# g2 z2 Y% J: N+ M" x/ H4 m  v( b
当到达物料速度越高时,这个报警更多,4 j5 r8 ?, G8 [* Q6 |0 q9 u! O" }
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 [( @+ d& P& w9 U3 j
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 J  J2 H1 e+ \3 m# }! X% u- J% X
# S+ t) S& o4 g& [
另外一个小建议,就是move,所有的move都可以这样
: M* L- |0 w9 m9 f2 aif not move() then debug end
9 L# w- o; w- y- z. \5 K& [% D这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 z% O6 A2 L) u9 E. Z* |1 {plant simulation中的free libraries有AGV模板,
* p+ t* u4 h& z" ~4 r里面也有案例。
& _  j4 }/ T$ |我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 p) x) W& H' m" G7 S% r
2 z' p1 u4 S' ?9 A$ L  \3 c# A/ C我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 r. p7 V( i" d/ s! P
( b: ~9 d/ J5 S7 e( J那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) B0 x# |5 b' o这是AGV_putin中arrive的method。
7 I/ r* U5 V1 ^9 _7 i+ Q5 P/ H( Q8 B. v' e2 K
当到达物料速度越高时,这个报警更多,
: u, S5 x5 j$ {/ A
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-23 04:11 , Processed in 0.024331 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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