设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10269|回复: 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'3 ^0 o  |$ K$ l7 s
*/( M- V' M- T' D( ^+ W
is2 G& Z6 B& k, h' u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 m' F2 n' U) o! F- O/ i7 K
do  `/ g  z$ h, ~7 E# f
        Lan := rootfolder.Internal.Tools.AOLlanguage;2 G4 o$ W& u. X
        if current = @.Destination -- else return, `7 z1 @9 X. |
        then
/ C, B. y0 V0 h( q" B% o                @.Destination := void;
, B3 Z: w: t% d                if @.occupied then
1 t- `1 C( d6 Y: T- N                        part := @.cont;
8 K% d: Y* @* S: y+ y* {                        @.transpOrder := void;3 Q0 {, T+ i' f$ z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# @$ O9 K! v! @! T7 o
                                @,root.eventcontroller.simTime);& I2 O' z1 V3 G
                        @.HasOrder := false;
' j3 q# I6 P8 O7 n  A                        @.DrivingHome := true;
, S" I/ r0 Q3 j3 `; M* Q2 w                        rgManager.tryToStartTransOrder;
% ]7 t  e* f! ?) Y5 R+ M8 P$ ^2 S                        if @.Destination = void
0 ~1 m' l6 m; p                        then -- no transport order for vehicle @" O4 S  c3 e8 w" e0 G0 Z
                                @.Destination :=! K: U! ?' \2 X) j& D9 t* }: u
                                rgManager.nearestFreeStation(@,track.~);5 N9 X! ?( s0 O& W0 v3 N$ D
                                newDirection(@);   
1 H3 \9 f% p$ S! }                                if @.Destination /= void then
. |9 ?* F# w& V                                        @.Destination.NumReservation :=' ^7 U, e7 ~' L
                                        @.Destination.NumReservation + 1;
( |# z  v4 {! l                                end;
" l! ]0 F  C  O6 M/ k                                @.CurrIcon := "drivingHome";9 h; Y0 s$ f  J/ I" u
                                @.DrivingHome := true;' C! m+ {% N0 s& b8 T
                        end;* t4 X! v% S# f; j
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 R$ `6 b5 l5 \; J; @8 {                        part := @.transpOrder;
  h7 z( q" }$ `$ N8 ~                        part.move(@);-- load part' Z4 p- p9 U2 f3 e
                        @.CurrIcon := "load";8 ^9 l6 q/ A7 X- H
                        GlobalDistObj := part.globDestination;2 x% E7 k" |8 h% ~
                        assignLObj := rgmanager.rgAssignL;
8 P6 Y0 E/ c9 m: q$ j5 M                        row := assignLObj.getRowNo(GlobalDistObj);" |3 s2 u: G; ^5 a3 P( O$ Q) R1 k
                        if Row = -1 then -- since 701 V% D+ Y/ F! n. O7 j
                                if lan=1 then
. U- P  Y4 n, z" m  O                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& n: Q3 K' e4 V4 ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& O# [7 j& |" S, H2 g0 d8 A5 C                                else
9 C/ y- P0 C0 ^# Y) r) O                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 y8 E, |/ y" P  f& g3 b                                                to_str("in docking station: \"",?.~.name,"\""));                               
( x. ]* R7 Y$ I& e% H3 J                                end;5 f2 T3 a% @$ u, c) b8 ~
                        else
( A. E/ I& G' m& r$ G                                @.Destination := assignLObj[1,row];
# U  l6 I. j- v5 v/ ~                        end;                          x6 p6 d, N" k
                        newDirection(@);' R& o& y( C  [2 }/ o4 g+ u( [7 L
                        @.HasOrder := true;
0 N+ z3 J& a+ c4 G0 y) ^8 {& n                end;
  W: [6 r9 V+ i% o+ @2 w; V7 v        end;8 m2 d, O1 Q; U8 R* U
end;        -- of the method/ r8 }; n3 G# F# G5 [' A. g
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 B4 Q& p7 i1 c. m) K) z* I; [
8 }4 F# ?  {; ~: b7 Q* [
这是AGV_putin中arrive的method。
4 ?2 a6 c  F4 ~1 F" V' i
  ^: C0 Z7 r7 q) i! B% s/ Z当到达物料速度越高时,这个报警更多,
2 o3 Q: ]& k" q$ S0 v1 x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  @" P! n3 B/ }1 C) ]程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; T7 x+ V8 _! D5 t& w8 u: n
- J! A; Q# _# n6 E% k2 A( ^9 t
另外一个小建议,就是move,所有的move都可以这样( h- b( i# q7 S  O: {0 P1 z
if not move() then debug end
8 i! `7 B  S( A  C: K8 b这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) @% u  Z( f+ |5 g8 g+ [
plant simulation中的free libraries有AGV模板,! O! {( ]1 J; u3 k$ p. ]2 t. q
里面也有案例。: }: r9 v4 B# j! I& J& ^
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。7 L) @0 |: [; c! c, m
4 t& w/ B3 j' D& r
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 c$ m: P3 @6 j0 L3 Z2 `$ @3 `4 A1 F1 B7 N
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * f7 D% _( F6 W! g
这是AGV_putin中arrive的method。
: X& _5 n0 f7 x: ~+ e' g
. P" o" r0 ^, Z, s/ T8 J当到达物料速度越高时,这个报警更多,
7 b+ S) ]( I( A% c+ G* J! @" _2 [
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-23 13:28 , Processed in 0.022799 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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