{Enterprise Dynamics startup information} if(StartingED, SoftStartED([])); {Model information} AddLayer([Main], 1, 1, 0); {Load required atoms} int011; int035([User Events], pDir([Atoms\TIME\User Events.atm])); int035([Initialize], pDir([Atoms\TOOLS\Initialize.atm])); int035([Sink], pDir([Atoms\BASIC MODELING\Sink.atm])); int035([Queue], pDir([Atoms\BASIC MODELING\Queue.atm])); int035([Server], pDir([Atoms\BASIC MODELING\Server.atm])); int035([Source], pDir([Atoms\BASIC MODELING\Source.atm])); int035([Product], pDir([Atoms\BASIC MODELING\Product.atm])); int012; {Atom: User Events6} sets; AtomByName([User Events], Main); if(not(AtomExists), Error([Cannot find mother atom 'User Events'. Inheriting from BaseClass.])); CreateAtom(a, s, [], 1, false); Set(OnInit, [ LateInit([ do( {reset vtp's in the attributes} var([strBegin], vbString), var([strAtt], vbString), var([strPointer], vbString), var([strNewPointer], vbString), var([strNewAtt], vbString), var([strInvolvedAtom], vbString), var([strInvolvedAtomNew], vbString), var([atmI], vbAtom), repeat( NrOfAttributes, do( if( cell(count, USEREVENTS__NOTIMESCHEDULE, c) = 1, do( strAtt := textatt(count,c), strBegin := StringCopy(strAtt , 0, 4 + StringPos([vtp(], strAtt) ), strPointer:= StringCopy(strAtt , StringLength(strBegin), -1 + StringPos([)], StringCopy(strAtt, StringLength(strBegin), StringLength(strAtt)- StringLength(strBegin))) ), strNewPointer := string(ptv(c)), strNewAtt := StringReplace(strAtt, strPointer, strNewPointer, SR_REPLACE_ALL), textatt(count,c) := strNewAtt ) ) ) ), repeat( NrOfAttributes, RegisterFunction( StringReplace(AttributeName(Count, c),[att_], []), {minus att_!!!} [Various], 0, 0, textatt(count,c), [], [], true ) ) ) ] ) ]); int023([User Events6], 33023, 1248); Set(Icon(a), RegisterIcon(pDir([media\images\default.jpg]), [default])); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\UserEvents.ico])); Set(DdbRec, [>t-newuserevents:1.]); SetChannels(1, 0); SetChannelRanges(1, 255, 0, 0); int001(185); int013(1, 0, true, true, 0, 0, [], []); SetLoc(15, 15, 0); SetSize(7, 2, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetProductCode([]); CreateAttributes(1); SetAttributeName(r(1), [att_CloseSource]); SetTextAtt(r(1), [CreateEvent(hr(3),vtp(202258588),1,0)]); int024; SetTable(1, 7); int015(0, 0, [ 1 ]); int015(1, 0, [1 `hr(3)` ]); int015(2, 0, [2 0 ]); int015(3, 0, [3 `CloseOutput(In(1,&11c))&13` ]); int015(4, 0, [4 0 ]); int015(5, 0, [5 0 ]); int015(6, 0, [6 1 ]); int015(7, 0, [7 0 ]); SetStatus(0); int018; {Atom: Source1} sets; AtomByName([Source], Main); if(not(AtomExists), Error([Cannot find mother atom 'Source'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [], 1, false); int023([Source1], 7168771, 240); Set(Icon(a), RegisterIcon(IconsDir([bmp\atoms\source.bmp]), [source])); AddModel3D( RegisterModel3D(Model3DDir([source.wrl]), [source.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); AddModel3D( RegisterModel3D(Model3DDir([source_Resized.wrl]), [Source_Resized.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\Source.ico])); SetChannels(1, 1); SetChannelRanges(1, 1, 1, 255); int001(179); int013(1, 0, true, false, 0, 0, [], []); SetLoc(15, 10, 0); SetSize(5, 2, 2); LockPosition(false); LockSize(false); DisableIconRotation(false); SetProductCode([]); SetExprAtt(1, [{.~1|~If( Time < hr(3), 1, 2 )~.}If( Time < hr(3), 1, 2 )]); SetExprAtt(2, [10]); SetExprAtt(3, [{.0|10. Do Nothing.}0]); SetExprAtt(4, [0]); SetExprAtt(5, [10]); SetExprAtt(6, [{.-1|1. Unlimited.} -1 ]); SetAtt(7, 4); int024; SetStatus(2); int018; {Atom: Queue2} sets; AtomByName([Queue], Main); if(not(AtomExists), Error([Cannot find mother atom 'Queue'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [], 1, false); int023([Queue2], 12615680, 1264); Set(Icon(a), RegisterIcon(IconsDir([bmp\atoms\queue.bmp]), [queue])); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\Queue.ico])); SetChannels(1, 1); SetChannelRanges(1, 255, 1, 255); int001(180); int013(1, 0, true, false, 0, 0, [], []); SetLoc(22, 10, 0); SetSize(5, 2, 0); LockPosition(false); LockSize(false); DisableIconRotation(false); SetProductCode([]); SetExprAtt(1, [1]); SetAtt(2, 10); SetAtt(3, 0); SetAtt(4, 0); SetExprAtt(5, [{.content(c)|Fifo (First In First Out) .}content(c)]); SetAtt(6, 4.5); SetExprAtt(7, [{.openallic(c)|Any inputchannel .}openallic(c)]); SetAtt(8, 2); int024; SetStatus(13); int018; {Atom: Server3} sets; AtomByName([Server], Main); if(not(AtomExists), Error([Cannot find mother atom 'Server'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [], 1, false); int023([Server3], 292315, 263408); Set(Icon(a), RegisterIcon(IconsDir([bmp\atoms\server.bmp]), [server])); AddModel3D( RegisterModel3D(Model3DDir([Server.wrl]), [Server.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); AddModel3D( RegisterModel3D(Model3DDir([server2.wrl]), [server2.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); AddModel3D( RegisterModel3D(Model3DDir([Server_Resized.wrl]), [Server_Resized.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); AddModel3D( RegisterModel3D(Model3DDir([Server2_Resized.wrl]), [Server2_Resized.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\Server.ico])); SetChannels(1, 1); SetChannelRanges(1, 255, 1, 255); int001(181); int013(1, 0, true, false, 0, 0, [], []); SetLoc(29, 10, 0); SetSize(5, 2, 2); LockPosition(false); LockSize(false); DisableIconRotation(false); SetProductCode([]); SetExprAtt(1, [negexp(9)]); SetExprAtt(2, [1]); SetExprAtt(3, [1]); SetAtt(4, 1); SetAtt(5, 1); SetAtt(6, 1); SetExprAtt(7, [{.~1|~0~ .}0]); SetAtt(8, 0); SetAtt(9, 0); SetAtt(10, 0); SetAtt(11, 0); SetAtt(12, 0); SetExprAtt(13, [If( Time > 0, Concat( [Util: ], String ( *( 100, /( statustime(c,2), Time)), 0, 1), [ %]), [Util: 0 %] )]); SetAtt(14, 9.19716304911452); SetAtt(15, 0); SetAtt(16, 1E40); SetAtt(17, 0); SetExprAtt(18, [{.openallic(c)|Any inputchannel .}openallic(c)]); SetAtt(19, 7); SetAtt(20, 0); SetAtt(21, 0); SetAtt(22, 0); SetAtt(23, 0); SetAtt(24, 0); SetAtt(25, 0); SetAtt(26, 0); SetAtt(27, 0); SetAtt(28, 0); SetAtt(29, 677797); SetExprAtt(30, [mttf]); SetAtt(31, 10803.8309800873); SetAtt(32, 0); SetAtt(33, 0); SetAtt(34, 0); int024; SetStatus(1); int018; {Atom: Sink4} sets; AtomByName([Sink], Main); if(not(AtomExists), Error([Cannot find mother atom 'Sink'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [], 1, false); int023([Sink4], 7168771, 240); Set(Icon(a), RegisterIcon(pDir([Media\Images\Atoms\sink.bmp]), [sink])); AddModel3D( RegisterModel3D(Model3DDir([sink.wrl]), [sink.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); AddModel3D( RegisterModel3D(Model3DDir([sink_Resized.wrl]), [sink_Resized.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\Sink.ico])); SetChannels(1, 0); SetChannelRanges(1, 255, 0, 0); int001(182); int013(1, 0, true, true, 0, 0, [], []); SetLoc(36, 10, 0); SetSize(5, 2, 2); LockPosition(false); LockSize(false); DisableIconRotation(false); SetProductCode([]); SetAtt(1, 0); SetAtt(2, 4); int024; SetStatus(1); int018; {Atom: Product} sets; AtomByName([Product], Main); if(not(AtomExists), Error([Cannot find mother atom 'Product'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [], 1, false); int023([Product], 12615680, 73809); Set(Icon(a), RegisterIcon(IconsDir([Png\products\product.png]), [product], 1, 1, 16777215, 255, 255, false, 0)); AddModel3D( RegisterModel3D(Model3DDir([box-closed.wrl]), [box-closed.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); AddModel3D( RegisterModel3D(Model3DDir([box-opened.wrl]), [box-opened.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); AddModel3D( RegisterModel3D(Model3DDir([pallet-wood.wrl]), [pallet-wood.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); AddModel3D( RegisterModel3D(Model3DDir([pallet-plastic.wrl]), [pallet-plastic.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); AddModel3D( RegisterModel3D(Model3DDir([oildrum.wrl]), [oildrum.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); AddModel3D( RegisterModel3D(Model3DDir([crate.wrl]), [crate.wrl], 0, 0, 0, 1, 1, -1, -90, 0, 0), a); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\Product.ico])); int001(183); SetLoc(10, 10, 0); SetSize(1, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetProductCode([]); SetAtt(1, 11); SetAtt(2, 1); int024; SetStatus(0); int018; {Atom: Initialize7} sets; AtomByName([Initialize], Main); if(not(AtomExists), Error([Cannot find mother atom 'Initialize'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [], 1, false); int023([Initialize7], 4194432, 248); Set(Icon(a), RegisterIcon(pDir([media\images\default.jpg]), [default])); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\Initialize.ico])); SetChannels(1, 0); SetChannelRanges(1, 255, 0, 255); int001(186); SetLoc(15, 4, 0); SetSize(5, 2, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetProductCode([]); SetExprAtt(1, [CloseSource]); SetAtt(2, 1); int024; SetStatus(0); int018; Up; int014(0, 179, 1, 185, 0); int014(1, 179, 1, 180, 0); int014(0, 183, 1, 179, 0); int014(1, 180, 1, 181, 0); int014(1, 181, 1, 182, 0); int006(10800, 185, 1, 0, 0); int006(10, 179, 1, 0, 0); {Experiment settings} int034; int007;