设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9942|回复: 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'4 z. }7 {( R3 k6 Y" I1 U  t" h
*/
# i' n9 l0 c5 Dis
: n0 a6 p+ d4 q* p( ]        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 q2 p( C) K  o
do+ Q: u; Y' L* ~. C# ]* N
        Lan := rootfolder.Internal.Tools.AOLlanguage;; U- a5 g: B% ~1 {5 e
        if current = @.Destination -- else return9 ?" `3 L  s3 n
        then! U! B( _2 R/ j
                @.Destination := void;3 a5 u0 G- q/ M$ g' `" B6 v, x; F7 u
                if @.occupied then
$ |) O! u" @( l4 x                        part := @.cont;
% j4 ~- t  }# ^) Q. z                        @.transpOrder := void;8 H' D3 q$ `9 y, T# p) G
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 P, G1 F3 C* J# [, p* ^
                                @,root.eventcontroller.simTime);) P4 `+ O: M+ v. I& R8 k
                        @.HasOrder := false;: U4 y. S. U. t- T' ^
                        @.DrivingHome := true;. ^' [* m0 b1 O# Z+ }
                        rgManager.tryToStartTransOrder;
' @. J1 H+ F6 v1 p0 v                        if @.Destination = void0 {2 X/ m' M; g/ v0 C
                        then -- no transport order for vehicle @
" Q+ v3 i: ?- R) i                                @.Destination :=: h! }7 N" }3 [/ G: d! x# _2 J
                                rgManager.nearestFreeStation(@,track.~);
4 u! z$ d% D, g                                newDirection(@);   / Z% ~! E3 V& N, D* Q& w
                                if @.Destination /= void then
3 n9 t+ S/ x$ R* Y/ O' B                                        @.Destination.NumReservation :=8 I6 A& D; j/ d$ S2 S! F) J" \
                                        @.Destination.NumReservation + 1;
1 p8 M- z% v' |2 f) }" G# ]) _9 y                                end;
* n, K1 x6 ?2 f7 Y( ?/ Q                                @.CurrIcon := "drivingHome";# G, C2 Q" e/ k0 ^" t$ F8 @, A
                                @.DrivingHome := true;  A" \0 l7 I1 q: n: g& r
                        end;1 q- ?5 R$ n8 N. ~' ?3 A1 n. h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, ~/ P, r, ~1 ?$ Q* j
                        part := @.transpOrder;3 Y, G: i+ @# B1 U$ w0 B& {
                        part.move(@);-- load part2 E' T$ W- [' O# u% m' p6 a
                        @.CurrIcon := "load";
1 y% q) |7 x: {0 e. ~5 _" d: {- \                        GlobalDistObj := part.globDestination;
" m  {% D/ c% h; L                        assignLObj := rgmanager.rgAssignL;9 H9 M3 k8 @6 P5 k) ^7 a
                        row := assignLObj.getRowNo(GlobalDistObj);
9 F% b+ H8 m4 r" B4 _; {) L0 b                        if Row = -1 then -- since 70' g  X& t# L" S! Y
                                if lan=1 then3 e7 O" F+ q! f- _- I% o% n" r
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 A& R4 V! |: X- V0 e7 l2 p% K4 W. D- M
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 }  B+ A( r5 p( ?                                else
$ }- I- m- t: u" _; R                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ Y* b( D6 r% Q7 l+ L
                                                to_str("in docking station: \"",?.~.name,"\""));                               
* ?) f; Q2 V/ _  w+ R9 o3 K! Q                                end;
6 G+ o& Y: K9 }9 ]                        else
  R6 w" f/ ]. f                                @.Destination := assignLObj[1,row];0 D; G) [. }: k9 O
                        end;                       
8 ~# k. C" B) m: H                        newDirection(@);
& B0 v/ t" ?! s- G4 n1 n3 G                        @.HasOrder := true;
* \$ [  m* r3 y" g0 T1 Z                end;1 W# p2 e5 W$ O6 Q) |& ~
        end;$ {; |) ~# W2 \# p2 O
end;        -- of the method2 d5 o' c" v4 G. M6 j! N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* g" N/ X/ j" ^! f" Z/ @7 g2 }- b( V
这是AGV_putin中arrive的method。
7 X- c( N* Y2 O+ O% S0 H2 V$ z
( g: \# r. Q, M$ Z+ n当到达物料速度越高时,这个报警更多,
0 H9 u  X7 X9 C! ]+ |+ d1 n可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- A1 f; ]7 [% m. P9 _3 E程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ U! F9 z. @7 l, k0 z8 f) S
* n6 l. ^# J) o
另外一个小建议,就是move,所有的move都可以这样
4 x; q5 a0 K: ^5 P" wif not move() then debug end
7 l+ V8 |, E% [6 |- i& q: \这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ d2 G8 V- n; r( O0 A; \plant simulation中的free libraries有AGV模板,. y/ n, b: |0 L7 O' I
里面也有案例。
5 v3 f; v! Q, _6 m+ Z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。, E* |, n6 L- U2 N0 T8 d- y. g+ i

+ I" x- Q* X+ W) ]2 e% B我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + A) K! q' V( P4 ^( I$ }
9 e' x& N* M3 {, I5 L. B
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! s5 c; f" c# h! D
这是AGV_putin中arrive的method。
" {) U5 W. s0 g5 Z( n6 e  }* m% N2 h: `
当到达物料速度越高时,这个报警更多,

- e. @/ Q/ I, [# Z+ }另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-3 12:14 , Processed in 0.019065 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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