设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9210|回复: 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'8 Q" U& y2 l" `2 d
*/
5 |/ B6 ^$ \6 |' gis5 k" r* A0 l: C* x7 R* W* B
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- H3 w8 W% y' v) i: Kdo3 n' j+ u  Y7 h6 P& D. t
        Lan := rootfolder.Internal.Tools.AOLlanguage;9 c8 D$ H% S/ [! N; c/ v0 C
        if current = @.Destination -- else return
# X( g) ^0 V* ^: `/ y& w        then
1 e6 T' {: t+ F" S' c                @.Destination := void;* v9 z: G' V% f( p+ ?
                if @.occupied then, ^% r1 F  T$ C) m/ U6 Q5 _
                        part := @.cont;
8 X6 \& S3 @5 f( }                        @.transpOrder := void;6 U0 m% |, Z2 b+ s4 ?
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 _8 m* `; t' j: |+ i, i3 S  c                                @,root.eventcontroller.simTime);* f7 P: M- O# b" I: K8 [. n
                        @.HasOrder := false;
3 M# b! }/ A9 R$ p( ]- {' R" J3 [7 U                        @.DrivingHome := true;
5 c$ t4 p, t) |& e0 m' X                        rgManager.tryToStartTransOrder;
; G" f4 W5 r7 s/ T                        if @.Destination = void2 C) c% i2 ]1 ^3 u  S
                        then -- no transport order for vehicle @
$ m+ E/ b* O  J9 ]) ?" _                                @.Destination :=) V* ^! e: A+ ]
                                rgManager.nearestFreeStation(@,track.~);2 j) P. F9 Z, ~& ^! i; D: _
                                newDirection(@);   
. a/ w. B, w3 @                                if @.Destination /= void then0 A3 C: g8 g! R/ U4 N
                                        @.Destination.NumReservation :=: m9 o( O( U( o( g- Q1 _
                                        @.Destination.NumReservation + 1;, ]) ~7 P6 S% l3 N. ~
                                end;' v( B( g8 U$ E5 N1 r' A
                                @.CurrIcon := "drivingHome";
& O& {5 @) {" O) `                                @.DrivingHome := true;* f$ ?& N& J5 ~5 f5 d' ]2 e
                        end;
2 |7 A, I2 s9 \; O% M4 N+ \' c) h                else -- the vehicle @ is empty, both vehicle and part are in the same dock station# I+ q1 T1 V8 F4 [
                        part := @.transpOrder;: w6 H1 K/ n5 I; \
                        part.move(@);-- load part4 ~! D" Q) R. T7 i$ y+ V
                        @.CurrIcon := "load";6 f) R2 _4 G+ r% m4 g
                        GlobalDistObj := part.globDestination;. q9 [) l0 R  J
                        assignLObj := rgmanager.rgAssignL;. H" E% G! t1 c+ M$ J: R0 a
                        row := assignLObj.getRowNo(GlobalDistObj);
7 O+ ^' c! {. |7 N6 ^                        if Row = -1 then -- since 70
- I: y7 ~* @. C+ J                                if lan=1 then
# A8 C) F4 E, k) P: ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 S9 q3 L6 b4 }+ ^                                                to_str("in der Andockstation: \"",?.~.name,"\""));; P4 ~$ V. ?2 `" a' Z6 q% |
                                else
! C2 A; C: T! c7 w) P+ D0 g( N                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 W$ @$ H4 Z5 ?4 w" R5 C! B                                                to_str("in docking station: \"",?.~.name,"\""));                               
; n+ r1 K- n; f" e- r6 B                                end;
3 O* o5 P5 f$ U8 z( ~# z) i                        else
. b8 R  x9 V: x) f. K% q                                @.Destination := assignLObj[1,row];
. K: Q6 S( s- l0 y                        end;                        ; Y3 Y$ k4 |. _" X
                        newDirection(@);+ a; ]+ q5 k4 E
                        @.HasOrder := true;
$ {- L+ r  s) B' {! N" C                end;4 x1 h7 Y+ F% W0 ~5 H* M7 q5 d0 G
        end;) y, p  B2 c7 z! v
end;        -- of the method
; X' W# E% m2 A( R; t  G4 ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 Y' X/ X5 z8 E# D( O" d: ^, t- J' I
" A# Q9 m4 o7 P. C6 f8 p0 }" y; U
这是AGV_putin中arrive的method。7 H! P% Z6 o/ f9 F8 ]$ v
6 Z+ d" F9 y' B9 B
当到达物料速度越高时,这个报警更多,: c5 D. \3 E% y. u7 G
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
& A" ~* C' P% g& A$ A- P% U程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' \1 \0 I; Z6 S5 {6 G/ P9 E+ U3 `/ Z
另外一个小建议,就是move,所有的move都可以这样
7 P) {1 o$ E  n. xif not move() then debug end$ K# q/ a7 b6 X$ r) ?+ X
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
  V0 |! a$ }1 ~3 W1 Bplant simulation中的free libraries有AGV模板,' `! k5 S' W/ ~4 h& y' p
里面也有案例。
! M! c# W. ^  r- D3 C' J' D: o- n我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& y5 e+ P" H. r4 k; d3 h$ {
. }1 E# U3 a, L9 e我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , c# o+ z5 J- y, J$ U# J

$ M3 X2 \; o1 i$ p" i, H* \3 s1 A! P; h那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
* O( o, H- ?2 ]' y8 [3 P; Z这是AGV_putin中arrive的method。
: h% e0 |: p# l6 Q5 _( `, ^% D  K, ?3 z" q
当到达物料速度越高时,这个报警更多,
' c* D% A0 N; S7 P5 r9 G' M3 [
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-19 17:41 , Processed in 0.015937 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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