设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10117|回复: 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'
. G! e$ r( s* Q0 G+ ^# ~0 a*/
& s  c4 N8 D6 P, \is2 |% t) c+ ]3 V4 a7 Z8 L
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: D( p$ T2 D6 n4 T/ X# ]" {) ^do& [5 ^' u9 G1 b. `
        Lan := rootfolder.Internal.Tools.AOLlanguage;, X  p' L2 W3 b4 Q- ~, m
        if current = @.Destination -- else return1 |- O. C* i( b" ~
        then+ L; O5 \- c0 r/ N6 T% k' A( w
                @.Destination := void;* i. A2 h7 r. |
                if @.occupied then
% G! c( C" J& p                        part := @.cont;* N# w# z8 l6 {9 W7 g) g" N& J; v
                        @.transpOrder := void;3 r* c# E( T& F, r' i0 b6 K1 Z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 y4 ]7 Z/ G. m" ?
                                @,root.eventcontroller.simTime);
* O) ~) |4 H3 [0 ]                        @.HasOrder := false;! @) r5 D0 \4 `# i/ O5 K
                        @.DrivingHome := true;- C/ {2 I# \- V8 `  u) J* ~
                        rgManager.tryToStartTransOrder;: v" X% A4 g# O+ Q, O3 R
                        if @.Destination = void' V: T) R- s: a7 Y7 w; }
                        then -- no transport order for vehicle @, ?/ D$ A9 n+ [& z. Y4 T
                                @.Destination :=
4 U4 ]2 d* G* A; A! }9 `( R                                rgManager.nearestFreeStation(@,track.~);
3 f: Z, J8 K2 `* Y0 [4 l' L. E                                newDirection(@);   
1 O: B4 C9 |4 B+ R                                if @.Destination /= void then
7 [9 r! Z6 ~3 {                                        @.Destination.NumReservation :=% j8 C* e- H! ^
                                        @.Destination.NumReservation + 1;1 F1 g7 X5 m/ P; n
                                end;( o1 M1 o# M8 h* Q6 j* j7 a
                                @.CurrIcon := "drivingHome";
# G/ L& ?7 s* N% \" @+ d                                @.DrivingHome := true;
/ {1 L6 t, T3 Z  d: A; L* Y( v  i                        end;
* [6 X( v' O% x9 o% k                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" }! B: B$ P  O% d                        part := @.transpOrder;; U7 m8 |% |. ]! n, J" e2 P
                        part.move(@);-- load part* ]' o; D8 W) O9 Q* k
                        @.CurrIcon := "load";
3 f4 ?9 k* ~2 s" `4 ?4 v) Q                        GlobalDistObj := part.globDestination;0 X: l, v6 f2 E* X5 I( ^+ G, i
                        assignLObj := rgmanager.rgAssignL;" d& `) B8 i: X* c
                        row := assignLObj.getRowNo(GlobalDistObj);
, r0 s" ~, ~: u/ j" l3 J2 J0 {. [1 ~                        if Row = -1 then -- since 70
6 u# }# S8 G+ U* |# n0 l1 W" q                                if lan=1 then
. b9 A9 ]+ @( ^                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# c1 g: M( |- c& a                                                to_str("in der Andockstation: \"",?.~.name,"\""));: d2 P2 q# p; u$ {2 C) A
                                else5 D6 M5 K& Z! H! l0 K; @
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 a% [+ f$ h, J: o, x+ n                                                to_str("in docking station: \"",?.~.name,"\""));                               
' d$ Y! \! ?( v                                end;
3 S9 U. d- h7 [. i" T+ L                        else$ F9 Y& O  J9 f2 L1 L2 v3 K7 X
                                @.Destination := assignLObj[1,row];
- c6 b0 t( `7 @                        end;                       
7 T* [; j+ K6 C; K                        newDirection(@);2 m/ f( ]& g7 I6 s) |
                        @.HasOrder := true;9 b( K( P7 C0 x( K
                end;. X1 g. d; O4 z# d
        end;
" L3 u6 I' _) d; d/ eend;        -- of the method1 u8 h9 b$ Y1 Y! @. }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 9 Z, H" |3 c4 |3 K( T8 P
2 Q+ J  k/ |, N' v% @7 p
这是AGV_putin中arrive的method。$ a0 a* L9 W9 U) d

7 I# `7 d. |/ |4 i$ G' ~* q当到达物料速度越高时,这个报警更多,
1 x% `; Q' B  L, u( ?可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
( T  Z0 }8 u) t* i- Z1 b- H) a& I1 U5 F程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! {6 o9 Y+ ]$ P4 ?9 ?, J- P7 x) g! n( S
另外一个小建议,就是move,所有的move都可以这样
9 a5 y* X/ m0 jif not move() then debug end
: _& N  d4 _  u% p4 Q2 j这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& O2 f7 ]8 R3 A2 v9 n" {  m
plant simulation中的free libraries有AGV模板,; k* c* O. r+ U
里面也有案例。
* q* G( n: u6 a' n我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* a! b  J! c: h8 a4 [

/ z, B$ v4 s& T, W5 @我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 A- L6 [+ g. E5 N* ^+ N; a, F3 i/ I4 p' U; l- f
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - A0 X0 P9 Z5 U4 g
这是AGV_putin中arrive的method。
  I/ r% d  L& a8 y/ _5 n# S! c! a8 @* b3 s9 [
当到达物料速度越高时,这个报警更多,

( B8 t% t, r8 v. i另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-14 09:22 , Processed in 0.019556 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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