设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6984|回复: 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'
# @- z8 |/ X. W) z*/
1 s0 F: \$ E. \' C$ @  j# r  vis
  x& h  H  n& i- T) K        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! [7 g" W5 }$ v& M# n0 r- A) ydo& c" u2 W' ]) R" h  n* ?* V
        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 Q& B6 A" H$ O6 b        if current = @.Destination -- else return
& g9 ]+ Q0 H" @9 f        then
, r" K/ b( [; X) q6 Q6 s3 k$ l3 F" r                @.Destination := void;- n  @$ A8 t7 Y, o+ Y
                if @.occupied then
- j4 X4 X% d1 h% X6 H. W3 e7 `0 {0 P                        part := @.cont;! y" J* ]  g+ C7 Y( L' E
                        @.transpOrder := void;1 Q# s' {6 A# c  m1 O: Y; Y4 D
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; @" F3 u( h1 ]  q: f                                @,root.eventcontroller.simTime);1 m4 ]. W( [$ C9 V
                        @.HasOrder := false;% o+ h1 _. n9 @4 {' r; t3 ^
                        @.DrivingHome := true;
" b6 N, j1 V/ m* H: o' L$ ~$ x6 l: C                        rgManager.tryToStartTransOrder;
/ n5 z2 l+ j: \: v3 K# C0 }8 w9 ?) P                        if @.Destination = void
0 Z* G$ n" O5 Y; @7 [5 i! _                        then -- no transport order for vehicle @
" G7 j2 W+ V& i2 M* u: L( n                                @.Destination :=
& i' S' j( \% k/ z3 y8 b6 S; Z' s! O                                rgManager.nearestFreeStation(@,track.~);
, [3 n& |% n3 D) G, u4 v                                newDirection(@);   2 z' o' W4 o3 X6 r
                                if @.Destination /= void then5 X0 ^' @+ i, j& f; ]
                                        @.Destination.NumReservation :=
9 h7 r1 u' j- l0 t                                        @.Destination.NumReservation + 1;7 ^; x4 L6 x4 n2 B: B
                                end;& X& b3 E4 M$ u; C/ s
                                @.CurrIcon := "drivingHome";  x% T% B) u4 m
                                @.DrivingHome := true;
  k4 b* Z  Y& _" {                        end;
7 O; ]+ ]" x9 n* u* ?                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  u) c  A4 B2 V9 b, Z3 t: x                        part := @.transpOrder;" K; Q, t$ u6 j8 t$ _) b0 H. g- n
                        part.move(@);-- load part
0 T) j" L; s1 J/ B                        @.CurrIcon := "load";0 X  i/ ^4 L+ ~) ^: Z! B
                        GlobalDistObj := part.globDestination;
5 H$ j9 Y& [# G4 m. h5 M  ?                        assignLObj := rgmanager.rgAssignL;0 x' M5 F% V: i: i
                        row := assignLObj.getRowNo(GlobalDistObj);: a8 B2 j  y, L8 N+ X, I' F% B
                        if Row = -1 then -- since 709 t4 Y5 I6 R- P9 G. w
                                if lan=1 then
7 L- j8 H7 t/ {) N                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( C! G- X! ^4 m  A4 H% h+ v; G5 {                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( R( ^  M2 F4 W7 Z% l                                else
. d3 I7 \# u, Q9 G7 f$ J& G                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," d, j% D- ]' h( X6 ?
                                                to_str("in docking station: \"",?.~.name,"\""));                                2 r+ ]# }$ t8 J, s; L/ E( i. H3 R  r
                                end;
; K5 y$ s) F8 ?9 d                        else) H6 h3 N) Y: b8 b' T7 R' s
                                @.Destination := assignLObj[1,row];! z" }% Y# A* ]: s9 z; ^. B
                        end;                        4 i/ B" w$ g# s5 N
                        newDirection(@);
% X* Y5 E, Q5 @% v8 v                        @.HasOrder := true;2 z$ X8 r6 q3 i# z  E* i; m
                end;
! m' u+ ]8 l. q7 l! i        end;
1 b7 z% H) c  w; F, Y5 G- S, mend;        -- of the method8 Z$ I! g6 X. j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 & e! J" u' Q) ?% x$ A

; s! e5 L' S# l' l  x0 s7 C这是AGV_putin中arrive的method。
& k* H3 ?; u9 G% Z5 S, T+ X! p3 ^0 D/ r+ @6 y
当到达物料速度越高时,这个报警更多,4 p& K4 S# y: R
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 X8 y* m9 o9 o程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' {# o' l& m8 |1 b3 e; c. Y& ~; l) C1 k# |5 g8 E- j
另外一个小建议,就是move,所有的move都可以这样; v1 a1 V3 [$ T4 J6 [; t
if not move() then debug end
2 y) ^# s) f: _& |# S6 ]这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% T: d4 f9 c& C- C, r' C* F1 N' M$ ~plant simulation中的free libraries有AGV模板,7 n; X+ k  u" S7 \) y9 p
里面也有案例。- ~  H; x, G2 c; R9 S
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 d$ G! i) }; A' Z) H6 n9 o% G
2 S0 E4 L- Z! A( k2 M+ ?我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
* `' G* C4 x* ~% J8 o0 J, V+ y- w8 h3 m+ z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 x% E; J8 G7 H- j+ T
这是AGV_putin中arrive的method。; Y/ V5 x. P8 m! z3 b% d# d4 |- t
( p3 V: b* i6 z2 O
当到达物料速度越高时,这个报警更多,
. }$ J9 @* c9 H  \; H8 {0 j+ D
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-9 20:11 , Processed in 0.018984 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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