设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7538|回复: 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'
; A7 Q6 |) Z- l. K*/! a1 D; N  ~  s* g) |
is' ^+ Y) b4 t* h9 Q  y+ Y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 ^4 s: v) F/ v2 ?' a$ H. hdo7 G! R# j4 `) I2 l7 T" L
        Lan := rootfolder.Internal.Tools.AOLlanguage;% }2 A, W  S4 X" o
        if current = @.Destination -- else return
6 f% \8 l1 r3 j) p0 G9 A        then0 |, |+ w& P6 k- [8 ]
                @.Destination := void;+ @5 X6 T: s+ y& P8 {$ f6 w5 }
                if @.occupied then' P: ~- B+ X: I6 N* K
                        part := @.cont;% O( C& _5 G5 |6 c6 D
                        @.transpOrder := void;4 p0 G; R. i) r1 Z- q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ Q5 ?6 P8 G! Y6 ?, ]* S
                                @,root.eventcontroller.simTime);
: x2 R3 k' p  I0 w& w/ Q1 A0 ?# g                        @.HasOrder := false;
- l- ]+ ]4 k, m1 G+ B( ]+ [7 _                        @.DrivingHome := true;
# K3 u1 e  A7 J                        rgManager.tryToStartTransOrder;
+ P+ S5 D; W4 v' G, w% o; d9 V6 U& q                        if @.Destination = void, ^7 \3 c1 x8 C& k! c5 a
                        then -- no transport order for vehicle @$ x- F6 ^- O: j
                                @.Destination :=( I! d8 l0 |/ C3 W. q! K, |- ]2 s
                                rgManager.nearestFreeStation(@,track.~);: j( r8 }! \. Z& N% }9 T- I
                                newDirection(@);   
9 {6 z* |( r- w2 o                                if @.Destination /= void then* G% r0 r' R$ L# b+ E8 J4 ~
                                        @.Destination.NumReservation :=
0 v# t8 z" s; C! [5 k                                        @.Destination.NumReservation + 1;, Y, I2 G7 U0 p8 J3 s
                                end;
6 k, j# }1 _1 }+ u. x                                @.CurrIcon := "drivingHome";9 s& i: ]+ ~. |1 h
                                @.DrivingHome := true;
. V+ a7 {4 O) G' [; k9 f" Z, P- m                        end;# x# F' W  }& h" l% M9 }
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 i2 D- `7 d% J
                        part := @.transpOrder;
" g4 z# t# P4 z5 b& i& [                        part.move(@);-- load part
5 q( C" Q4 _( r2 A                        @.CurrIcon := "load";
! E5 v' M' i# a3 G; G2 a                        GlobalDistObj := part.globDestination;
, V5 M+ t$ R# {                        assignLObj := rgmanager.rgAssignL;
0 {, H  ]: A3 `9 Z- ]% `                        row := assignLObj.getRowNo(GlobalDistObj);5 ?+ ?7 g7 {& a3 M  ~$ l
                        if Row = -1 then -- since 70
. u5 R. }. H3 U7 g5 G4 H                                if lan=1 then
& h: |8 j: z$ s# T2 _                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," ^2 J' R0 P$ g- u' A8 H
                                                to_str("in der Andockstation: \"",?.~.name,"\""));6 G( C' F. z/ z* J
                                else6 \' Y( _9 F6 I1 Z* j
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 z( C9 s: V( f, [6 C% y" m                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 l9 F2 N" {4 j$ v5 J, H4 V1 a7 Y6 v                                end;8 B  e! k, A7 x6 Y0 Z
                        else
4 E8 J0 z0 r1 x4 V& r                                @.Destination := assignLObj[1,row];
7 ?( h. n$ L6 @5 K+ Z% k                        end;                        % `# e$ u, S3 b+ X( |! q; s# E
                        newDirection(@);
. V* b) e# l* Y, E8 r                        @.HasOrder := true;8 y) M$ C" Q/ E% b$ z9 p3 v
                end;
) I; N# B5 X, v# o/ B4 @        end;! S" G, O, q) ?/ D* {& y" J
end;        -- of the method
# h; E; \+ G! K5 b! f
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
& W: V! @9 H2 Y6 {& z1 k- t' W4 ]2 E$ }! F
这是AGV_putin中arrive的method。
% E, E! e3 M+ K! [4 {8 l, Z- M9 ]9 q
当到达物料速度越高时,这个报警更多,8 Q, x" g% Q! @3 f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 c2 X% H2 N. k
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 A. Y5 ~& m$ [! @8 m& v+ \, J, d' L  n* C2 P4 ~
另外一个小建议,就是move,所有的move都可以这样
& t2 a& s. V6 h/ r5 R( |+ |7 l# fif not move() then debug end) b+ ]  @" Q6 A. x
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& [% `$ I. I% h/ k/ Tplant simulation中的free libraries有AGV模板,
9 Z# S6 j5 I  Y! t里面也有案例。$ o% A% v, R  d8 W. H
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. n, M8 L" V2 I- A
, t0 R* \3 Y4 W
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 K& R6 B. K  |% R7 F6 j

+ E& \3 Q% C& R, d/ p# j那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) O) L% z2 c1 }7 j
这是AGV_putin中arrive的method。
: C( z/ s% E* h, }. C
: c+ t& _# _. v当到达物料速度越高时,这个报警更多,

: H1 W% D) @5 e4 w' G" U9 r另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-16 23:38 , Processed in 0.020148 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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