设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10116|回复: 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 r+ ?2 w7 P! t/ w6 J2 K% J
*/4 ^& e5 n- n* v0 O6 E: c
is
, `3 o8 i$ D8 L3 X) H% A# r        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 r( |; _+ q8 F3 gdo
) E  }2 U/ s$ n& k        Lan := rootfolder.Internal.Tools.AOLlanguage;+ Q  S5 P+ g. P) }+ B& {7 a, Q
        if current = @.Destination -- else return  N( R2 o7 B3 G5 U: s
        then# [+ q! i6 S1 _$ }% [2 x) T+ ~
                @.Destination := void;
$ ]+ W* ~2 L7 V; r                if @.occupied then1 Q, f6 A% K- q- L  u
                        part := @.cont;
0 T$ O% n# `8 T' |                        @.transpOrder := void;& C9 A$ r$ c- M3 ^
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; T: U. k% E! C0 Y  N! B                                @,root.eventcontroller.simTime);
/ \) [5 P# ~5 r& C                        @.HasOrder := false;
; h# q5 Z! b0 D6 |% {, }, R6 Y                        @.DrivingHome := true;
" S( s: `8 P' m) H; i1 c                        rgManager.tryToStartTransOrder;' t5 [; R& `! z8 o
                        if @.Destination = void
  f3 P( a1 C6 Z6 n9 F                        then -- no transport order for vehicle @, P; ?5 [5 [2 Q% x' i, k) i
                                @.Destination :=
$ o0 i* M) \; g                                rgManager.nearestFreeStation(@,track.~);# x# Y7 i0 e) }
                                newDirection(@);   $ _  u9 g, o2 s/ z2 h' c, f/ R2 a
                                if @.Destination /= void then
8 c: H9 Y) a; h, X                                        @.Destination.NumReservation :=
. P# k: t& S( }9 e* ^9 v" ]# y                                        @.Destination.NumReservation + 1;  L2 E5 s. v2 o
                                end;. M6 V6 _# G0 [0 L+ z& m
                                @.CurrIcon := "drivingHome";" i5 V1 b5 ~& b& l
                                @.DrivingHome := true;6 ]( Q+ j* e2 f$ `
                        end;$ B& l+ b/ Q, N. X6 Y( q# g
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) `# a  i8 Q/ m7 o                        part := @.transpOrder;" J3 ~% \( I1 i! o
                        part.move(@);-- load part- J( E( \/ n* |% o" a
                        @.CurrIcon := "load";
) |7 z" o  G' }0 D5 z) k) L                        GlobalDistObj := part.globDestination;
0 P- [+ F  F* K9 o0 n$ u) j% G4 ~                        assignLObj := rgmanager.rgAssignL;
$ ]/ o8 @; Z5 i1 m, m                        row := assignLObj.getRowNo(GlobalDistObj);
9 {  @% j! v0 _1 M8 z1 {                        if Row = -1 then -- since 709 T# x! f9 Y+ f6 Q
                                if lan=1 then
: W3 G( ~  t& o8 Z9 d) r1 e                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" q) i) e) A2 Q                                                to_str("in der Andockstation: \"",?.~.name,"\""));: [8 r6 Q9 X: j% L& X7 L+ E
                                else
6 K' ~, B& V' N' ~/ j; }8 p$ E                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 g9 K2 m6 k3 \2 Y                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ W  B. O2 [4 O+ \  c                                end;$ F4 V& [$ z  n3 k! a8 a! H
                        else  C$ l, i# i, u( k3 l
                                @.Destination := assignLObj[1,row];
, C! ]( U# D' J1 }                        end;                       
0 y* h. s' D0 n  v! ?6 V. m. N- A                        newDirection(@);
3 L5 l+ ^3 z$ v                        @.HasOrder := true;
& e& O2 }0 [5 u: G                end;; j2 E8 ]0 D2 |9 v. ?! f5 T
        end;
7 _- h2 m1 ^: F9 l. R! _7 oend;        -- of the method
0 A+ w1 f' v9 o9 R( r. x9 @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 ~0 ], m4 B" ?8 a
7 b0 ^0 K" S9 C# I7 \6 b, ]  J) S
这是AGV_putin中arrive的method。
  \( H8 F) K' R  [/ J; l& S' C% o) L+ m) i
当到达物料速度越高时,这个报警更多,
- ]; r! p& I0 e6 x; W可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 Q$ }) W7 g  v% v3 k程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?8 B# `, G4 g  ?" o" ~
" o) P7 Z# Z/ R
另外一个小建议,就是move,所有的move都可以这样
1 R" g0 Y6 B, m4 H" B; Lif not move() then debug end9 ^: d$ Q% X3 Z  G+ Q+ L! F- s
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 N& G5 n. I, R5 }, R; E. ~" }plant simulation中的free libraries有AGV模板,
! y7 Q. y0 d: T' V+ W5 F' S- }' _; R里面也有案例。* J' Q3 N$ f* C7 ^
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 y' U& A! Y4 [- x$ O! ~# Q: b' o1 S" T. a1 ]0 c& l. G  M) v
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& q2 h# ^; m& A' V' R4 N: h" R1 m9 p
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 9 r* d& N, y9 i
这是AGV_putin中arrive的method。
0 u( l1 f6 L' L: @0 N( G  J. X7 j: l
5 ]7 P1 P9 R; d8 `# c( U当到达物料速度越高时,这个报警更多,

, u9 M! {0 w2 z' K. l另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-14 05:29 , Processed in 0.019305 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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