{10.0.1.2474} {Enterprise Dynamics startup information} if(StartingED, SoftStartED([])); {Model information} AddLayer([Main], 1, 1, 0); {10.0.1.2474} {Load required atoms} int011; int035([Product], pDir([Atoms\BASIC MODELING\Product.atm])); int035([Queue], pDir([Atoms\BASIC MODELING\Queue.atm])); int035([Server], pDir([Atoms\BASIC MODELING\Server.atm])); int035([Sink], pDir([Atoms\BASIC MODELING\Sink.atm])); int035([Source], pDir([Atoms\BASIC MODELING\Source.atm])); int035([HumanResource], pDir([Atoms\HUMAN RESOURCE\HumanResource.atm])); int035([HumanResourceTeam], pDir([Atoms\HUMAN RESOURCE\HumanResourceTeam.atm])); int035([Network Controller], pDir([Atoms\NETWORK\Network Controller.atm])); int035([Network Node], pDir([Atoms\NETWORK\Network Node.atm])); int035([Node Manipulator], pDir([Atoms\NETWORK\Node Manipulator.atm])); int035([Accumulating Conveyor], pDir([Atoms\TRANSPORT\CONVEYORS\ACCUMULATING\Accumulating Conveyor.atm])); int012; {Preregister 4DS} Dim([refHumanResourceTeam], vbAtom); {Atom: HumanResourceTeam8} sets; AtomByName([HumanResourceTeam], Main); if(not(AtomExists), Error([Cannot find mother atom 'HumanResourceTeam'. Inheriting from BaseClass.])); CreateAtom(a, s, [HumanResourceTeam8], 1, false); Set(OnInit, [4DS[Dim([refHumanResourceTeam], vbAtom, c)]4DS]); SetExprAtt(1, [{.AssignTo_FirstResourceFirst(c, cs)|2. A free resource (FRF) --> look for a free resource. Check the First Resource connected to the team First..}AssignTo_FirstResourceFirst(c, cs)]); SetAtt(2, 1); SetAtt(3, 546332368); SetAtt(4, 546334288); SetAtt(5, 0); SetAtt(6, 0); SetAtt(7, 0); SetAtt(8, 1); SetAtt(9, 1); SetExprAtt(10, [{.HumanResourceTask_GetTaskLocation(cs)|1. Task location did not change --> The task location is equal to the location where the resources was called..}HumanResourceTask_GetTaskLocation(cs)]); SetAtt(11, 0); SetAtt(12, 1); SetTextAtt(13, [refHumanResourceTeam]); SetExprAtt(14, [{.0|1. No specific rule..}0]); int023([HumanResourceTeam8], 32768, 4194); Set(Icon(a), RegisterIcon(pDir([Media\Images\atoms\graph.bmp]), [graph])); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\HumanResourceTeam.ico])); SetChannels(0, 1); SetChannelRanges(0, 0, 0, 1); int001(244); int013(1, 0, true, true, 0, 0, [], []); SetLoc(15, 19, 0); SetSize(8, 2, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetTable(2, 0); int015(0, 154, [`` `HumanResource7` `HumanResource7` ]); SetStatus(0); int018; {Atom: LstAssignedTasks} sets; AtomByName([HumanResourceTaskList], Main); if(not(AtomExists), Error([Cannot find mother atom 'HumanResourceTaskList'. Inheriting from BaseClass.])); CreateAtom(a, s, [LstAssignedTasks], 1, false); SetTextAtt(1, [LstAssignedTasks]); SetAtt(2, 0); SetAtt(3, 0); SetAtt(4, 1); int023([LstAssignedTasks], 0, 1032); 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\Prohibited.ico])); int001(571); SetSize(1, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetStatus(0); int018; {Atom: LstNotAssignedTasks} sets; AtomByName([HumanResourceTaskList], Main); if(not(AtomExists), Error([Cannot find mother atom 'HumanResourceTaskList'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [LstNotAssignedTasks], 1, false); SetTextAtt(1, [LstNotAssignedTasks]); SetAtt(2, 0); SetAtt(3, 0); SetAtt(4, 1); int023([LstNotAssignedTasks], 0, 1032); 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\Prohibited.ico])); int001(572); SetSize(1, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetStatus(0); int018; Up; {Atom: Source1} sets; AtomByName([Source], Main); if(not(AtomExists), Error([Cannot find mother atom 'Source'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [Source1], 1, false); SetExprAtt(1, [1]); SetExprAtt(2, [10]); SetExprAtt(3, [{.0|10. Do Nothing .}0]); SetAtt(4, 0); SetAtt(5, 10); SetExprAtt(6, [{. -1 |1. Unlimited .} -1 ]); SetAtt(7, 4); int023([Source1], 7168771, 240); Set(Icon(a), RegisterIcon(pDir([Media\Images\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(237); int013(1, 0, true, false, 0, 0, [], []); SetLoc(12, 9, 0); SetSize(5, 2, 2); LockPosition(false); LockSize(false); DisableIconRotation(false); 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), [Queue2], 1, false); 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, -0.5); SetExprAtt(7, [{.openallic(c)|Any inputchannel .}openallic(c)]); SetAtt(8, 2); 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(238); int013(1, 0, true, false, 0, 0, [], []); SetLoc(18, 9, 0); SetSize(5, 2, 0); LockPosition(false); LockSize(false); DisableIconRotation(false); 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), [Server3], 1, false); SetExprAtt(1, [negexp(9)]); SetExprAtt(2, [{.~1|~1~.}1]); SetExprAtt(3, [1]); SetAtt(4, 1); SetAtt(5, 1); SetAtt(6, 1); SetExprAtt(7, [{.~1|~0~.}0]); SetExprAtt(8, [HumanResourceTeam_CallResources(refHumanResourceTeam, c, i, 1)]); SetExprAtt(9, [0]); SetExprAtt(10, [0]); SetExprAtt(11, [0]); SetAtt(12, 0); SetExprAtt(13, [4DS[If( Time > 0, Concat( [Util: ], String ( *( 100, /( statustime(c,2), Time)), 0, 1), [ %]), [Util: 0 %] )]4DS]); SetAtt(14, 5.25888709002708); SetAtt(15, 0); SetAtt(16, 1E40); SetAtt(17, 0); SetExprAtt(18, [{.openallic(c)|Any inputchannel.}openallic(c)]); SetAtt(19, 7); SetAtt(20, 0); SetExprAtt(21, [0]); SetAtt(22, 0); SetExprAtt(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, 229.672245474165); SetExprAtt(32, [0]); SetExprAtt(33, [0]); SetExprAtt(34, [0]); 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])); Set(DdbRec, [>t-network:1.>t-nodeconnections-n1:1.>t-node1:1.]); SetChannels(1, 1); SetChannelRanges(1, 255, 1, 255); int001(239); int013(1, 0, true, false, 0, 0, [], []); SetLoc(24, 9, 0); SetSize(5, 2, 2); LockPosition(false); LockSize(false); DisableIconRotation(false); SetStatus(1); int018; {Atom: Accumulating Conveyor4} sets; AtomByName([Accumulating Conveyor], Main); if(not(AtomExists), Error([Cannot find mother atom 'Accumulating Conveyor'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [Accumulating Conveyor4], 1, false); SetAtt(1, 1); SetExprAtt(2, [Length / Speed]); SetAtt(3, 9); SetExprAtt(4, [Min(TempMaxLoc, Speed * (Time - EntryTime(cs)))]); SetAtt(5, 0); SetAtt(6, 0); SetExprAtt(7, [If(Elevation <> 0, Hor_Length / Cos(Angle), Hor_Length)]); SetExprAtt(8, [1]); SetAtt(9, 0); SetAtt(10, 1); SetExprAtt(11, [If(Content(c) <> 0, Do( TempMaxLoc :=Min(Length, +((Length - ExitLength), (Speed * (Time - ExitTime)))), ForAtomLayerUnder(c, Do( Setcs, SetLoc(-(*(Display_Factor, CurLoc), xSize(cs)), /(-(ySize(c), ySize(cs)), 2), +(zSize(c), *(/(CurLoc, /(If(Use_Physical, xSize(c), Input_Length), xSize(c))), Sin(Angle))), cs), SetAtt(3, -(TempMaxLoc, ProductSpacing(SpacingRule, xSize(cs), Spacing)), c) ) ) ) )]); SetAtt(12, 0); SetAtt(13, 10000); SetAtt(14, 1); SetAtt(15, 0); SetAtt(16, 0); SetAtt(17, 1); SetAtt(18, 10); SetAtt(19, 1); SetAtt(20, 4); SetExprAtt(21, [0]); SetExprAtt(22, [ArcTan(Elevation / Hor_Length)]); SetExprAtt(23, [If(Use_Physical, xSize(c), Input_Length)]); SetAtt(24, 5); int023([Accumulating Conveyor4], 11249415, 1266); Set(Icon(a), RegisterIcon(IconsDir([bmp\atoms\conveyor.bmp]), [conveyor])); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\AccumulatingConveyor.ico])); Set(DdbRec, [>legdist:3.]); SetChannels(1, 1); SetChannelRanges(1, 255, 1, 255); int001(240); int013(1, 0, true, false, 0, 0, [], []); SetLoc(29, 9, 0); SetSize(10, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetStatus(13); int018; {Atom: Server5} sets; AtomByName([Server], Main); if(not(AtomExists), Error([Cannot find mother atom 'Server'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [Server5], 1, false); SetExprAtt(1, [negexp(9)]); SetExprAtt(2, [{.~1|~1~.}1]); SetExprAtt(3, [1]); SetAtt(4, 1); SetAtt(5, 1); SetAtt(6, 1); SetExprAtt(7, [{.~1|~0~.}0]); SetExprAtt(8, [0]); SetExprAtt(9, [HumanResourceTeam_FreeResources(refHumanResourceTeam, i)]); SetExprAtt(10, [0]); SetExprAtt(11, [0]); SetAtt(12, 0); SetExprAtt(13, [4DS[If( Time > 0, Concat( [Util: ], String ( *( 100, /( statustime(c,2), Time)), 0, 1), [ %]), [Util: 0 %] )]4DS]); SetAtt(14, 0.962186472641702); SetAtt(15, 0); SetAtt(16, 1E40); SetAtt(17, 0); SetExprAtt(18, [{.openallic(c)|Any inputchannel.}openallic(c)]); SetAtt(19, 7); SetAtt(20, 0); SetExprAtt(21, [0]); SetAtt(22, 0); SetExprAtt(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, 207.192602534131); SetExprAtt(32, [0]); SetExprAtt(33, [0]); SetExprAtt(34, [0]); int023([Server5], 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])); Set(DdbRec, [>t-network:1.>t-nodeconnections-n1:1.>t-node1:4.]); SetChannels(1, 1); SetChannelRanges(1, 255, 1, 255); int001(241); int013(1, 0, true, false, 0, 0, [], []); SetLoc(39, 9, 0); SetSize(5, 2, 2); LockPosition(false); LockSize(false); DisableIconRotation(false); SetStatus(1); int018; {Atom: Sink6} sets; AtomByName([Sink], Main); if(not(AtomExists), Error([Cannot find mother atom 'Sink'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [Sink6], 1, false); SetAtt(1, 0); SetAtt(2, 4); int023([Sink6], 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(242); int013(1, 0, true, true, 0, 0, [], []); SetLoc(45, 9, 0); SetSize(5, 2, 2); LockPosition(false); LockSize(false); DisableIconRotation(false); SetStatus(1); int018; {Atom: HumanResource7} sets; AtomByName([HumanResource], Main); if(not(AtomExists), Error([Cannot find mother atom 'HumanResource'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [HumanResource7], 1, false); SetAtt(1, 0); SetAtt(2, 0); SetExprAtt(3, [1]); SetAtt(4, 0); SetAtt(5, 0); SetAtt(6, 0); SetAtt(7, 26); SetAtt(8, 12); SetAtt(9, 544802960); SetAtt(10, 1); SetAtt(11, 0); SetAtt(12, 0); SetAtt(13, 1); SetAtt(14, 546322768); SetAtt(15, 546323728); SetAtt(16, 546324688); SetAtt(17, 546320848); SetAtt(18, 0); SetAtt(19, 1); SetAtt(20, 1); SetAtt(21, 0); SetAtt(22, 1); SetAtt(23, 0); SetExprAtt(24, [{.~1|1. Fixed --> always apply an offset of ~0~ meter..}0]); SetAtt(25, 0); SetExprAtt(26, [{.~1|1. Fixed --> always apply an offset of ~0~ meter..}0]); SetAtt(27, 0); SetAtt(28, 2); SetAtt(29, 1); SetAtt(30, 0); SetAtt(31, 1); SetAtt(32, 0); SetExprAtt(33, [0]); SetExprAtt(34, [do( HumanResource_SetUseTravel(c, true), Connect(2, c, 0, out(1, c)), Connect(3, c, 0, out(1, c)) )]); SetExprAtt(35, [0]); SetExprAtt(36, [0]); SetAtt(37, 0); SetAtt(38, 0); SetExprAtt(39, [0]); SetExprAtt(40, [0]); SetAtt(41, 0); SetExprAtt(42, [1]); SetAtt(43, 0); SetAtt(44, 1); SetAtt(45, 1); SetTextAtt(46, [0]); SetTextAtt(47, [0]); SetExprAtt(48, [0]); SetExprAtt(49, [0]); SetAtt(50, 1); SetAtt(51, 1); SetAtt(52, 1); SetAtt(53, 0); SetExprAtt(54, [0]); SetAtt(55, 0); SetAtt(56, 0); SetAtt(57, 1); SetExprAtt(58, [1]); SetAtt(59, 1); SetAtt(60, 0); SetAtt(61, 0); int023([HumanResource7], 12615680, 66673); Set(Icon(a), RegisterIcon(IconsDir([bmp\atoms\operator.bmp]), [operator])); AddModel3D( RegisterModel3D(Model3DDir([Persons\Men\Man_subdivided.wrl]), [Man_subdivided.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\HumanResource.ico])); SetChannels(3, 3); SetChannelRanges(3, 3, 3, 3); int001(243); int013(1, 0, true, true, 1, 1, [Do not connect.], [Do not connect.]); int013(2, 0, true, true, 1, 1, [Do not connect.], [Do not connect.]); int013(3, 0, true, true, 1, 1, [Do not connect.], [Do not connect.]); SetLoc(43, 12, 0); SetSize(1, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); Set(OnEvent, [4DS[Do( Case( { ** Check the eventnumber ** } InList( EventCode, HumanResource_EVENTCODE_TRAVELLING, HumanResource_EVENTCODE_ARRIVEATTASKLOCATION, HumanResource_EVENTCODE_ARRIVALATNODESELECTNEXTDESTINATION, HumanResource_EVENTCODE_TRAVELTOFIRSTNODE, HumanResource_EVENTCODE_RECEIVENEWTASK, HumanResource_EVENTCODE_FINISHTASK, HumanResource_EVENTCODE_INTERRUPTTASK, HumanResource_EVENTCODE_RESUMETASK, HumanResource_EVENTCODE_ASKFORNEWTASK, HumanResource_EVENTCODE_TS_INTERRUPTANDREASSIGNTASK, HumanResource_EVENTCODE_TS_INTERRUPTANDFINISHTASKAFTERDOWN, HumanResource_EVENTCODE_TRANSPORTING, HumanResource_EVENTCODE_TRANSPORTTOFIRSTNODE, HumanResource_EVENTCODE_TRANSPORTARRIVEATDESTINATION, HumanResource_EVENTCODE_TRANSPORTARRIVALATNODESELECTNEXTDESTINATION, HumanResource_EVENTCODE_STARTLOADING, HumanResource_EVENTCODE_ENDLOADING, HumanResource_EVENTCODE_STARTUNLOADING, HumanResource_EVENTCODE_ENDUNLOADING, HumanResource_EVENTCODE_UNLOADNEXT_TRANSPORTTOFIRSTNODE, HumanResource_EVENTCODE_UNLOADNEXT_TRANSPORTING, HumanResource_EVENTCODE_UNLOADNEXT_TRANSPORTARRIVEATDESTINATION, HumanResource_EVENTCODE_UNLOADNEXT_TRANSPORTARRIVALATNODESELECTNEXTDESTINATION, HumanResource_EVENTCODE_SCHEDULEUP, HumanResource_EVENTCODE_SCHEDULEDOWN_REASSIGN, HumanResource_EVENTCODE_SCHEDULEDOWN_FINISHAFTER, HumanResource_EVENTCODE_SCHEDULEDOWN_FINISHBEFORE, HumanResource_EVENTCODE_CUTOFFTIME ), { ** Execute the event function ** } HumanResource_EventTravelling(c), do( HumanResource_SetUseTravel(c, false), { *** modified at 08/03/2017 - change use travel attribute value to false, HR can move with product now - these are the only changes in the code *** } HumanResource_EventArriveAtTaskLocation(c) ), HumanResource_EventArrivalAtNodeSelectNextDestination(c), HumanResource_EventTravelToFirstNode(c), Do( HumanResource_EventReceiveTask(c), { ** Execute the CallTrigger attribute. After the event itself, because the user might want to use references to the new task. ** } Att([CallTrigger], c) ), HumanResource_EventFinishCurrentTask(c), Do( Att([InterruptTrigger], c), HumanResource_EventInterruptTask(c, vtp(Att([CurrentTask], c)), InterruptionType_REASSIGN, InterruptionCause_PRIORITY), HumanResource_ReceiveTask(c, i) ), Do( HumanResource_EventReceiveTask(c), { ** Execute the ResumeTrigger attribute ** } Att([ResumeTrigger], c) ), HumanResource_EventAskForNewTask(c), Do( Att([InterruptTrigger], c), HumanResource_EventInterruptTask(c, vtp(Att([CurrentTask], c)), InterruptionType_REASSIGN, InterruptionCause_TIMESCHEDULE), If( And( Att([CurrentTask], c) = 0, Att([InterruptedTask], c) = 0 ), Att([Assigned], c) := 0 ) ), Do( Att([InterruptTrigger], c), HumanResource_EventInterruptTask(c, vtp(Att([CurrentTask], c)), InterruptionType_FINISHAFTERBREAK, InterruptionCause_TIMESCHEDULE) ), HumanResource_EventTravelling(c,1), HumanResource_EventTravelToFirstNode(c,1), HumanResource_EventTransportArriveAtDestination(c), HumanResource_EventArrivalAtNodeSelectNextDestination(c,1), HumanResource_EventStartLoading(c), HumanResource_EventEndLoading(c), HumanResource_EventStartUnloading(c), HumanResource_EventEndUnloading(c), HumanResource_EventTravelToFirstNode(c,1,1), HumanResource_EventTravelling(c,1,1), {HumanResource_EventUnLoadNextTransportArriveAtDestination(c),}HumanResource_EventTransportArriveAtDestination(c), HumanResource_EventArrivalAtNodeSelectNextDestination(c,1,1), Do( { ** Increase the number of delays on the human resource ** } Dec(Att([NrDown], c)), If( Att([NrDown], c) = 0, Att([UpTrigger], c) ), HumanResource_EventScheduleUp(c) ), Do( { ** Increase the number of delays on the human resource ** } Inc(Att([NrDown], c)), If( Att([NrDown], c) = 1, Att([DownTrigger], c) ), HumanResource_EventScheduleDown(c, InterruptionType_REASSIGN) ), Do( { ** Increase the number of delays on the human resource ** } Inc(Att([NrDown], c)), If( Att([NrDown], c) = 1, Att([DownTrigger], c) ), HumanResource_EventScheduleDown(c, InterruptionType_FINISHAFTERBREAK) ), Do( { ** Increase the number of delays on the human resource ** } Inc(Att([NrDown], c)), If( Att([NrDown], c) = 1, Att([DownTrigger], c) ), HumanResource_EventScheduleDown(c, InterruptionType_FINISHBEFOREBREAK) ), { Eventcode 28: CutOffTime } Do( SetAtt([CutOff], True, c), { activate CutOff } DestroyEventsOfAtom(c, 9), { destroy any pending ask-for-new-task-event of this HR } HumanResource_EventEndLoading(c) { finish current loading } ) ) ) ]4DS]); SetStatus(1); int018; {Atom: N1-1} sets; AtomByName([Network Node], Main); if(not(AtomExists), Error([Cannot find mother atom 'Network Node'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [N1-1], 1, false); SetAtt(1, 1); SetAtt(2, 1); SetAtt(3, 1); SetAtt(4, 1); SetAtt(5, 0); SetAtt(6, 1); SetAtt(7, 1); int023([N1-1], 0, 6384); Set(Icon(a), RegisterIcon(IconsDir([bmp\atoms\server.bmp]), [server])); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\NetworkNode.ico])); Set(DdbRec, [>t-node:1.>t-node1:1.>t-netreference:546320848.]); SetChannels(0, 2); SetChannelRanges(0, 255, 0, 255); int001(247); int013(1, 0, true, true, 0, 0, [], []); int013(2, 0, true, true, 0, 0, [], []); SetLoc(26, 12, 0); SetSize(1, 1, 0); LockPosition(false); LockSize(true); DisableIconRotation(false); SetTable(1, 4); int015(0, 64, [`Direction` `N1-2` ]); int015(1, 64, [`Capacity` 1000000 ]); int015(2, 64, [`Content` 0 ]); int015(3, 64, [`Use speed limit` 0 ]); int015(4, 64, [4DS[`Speed limit [m/s]` 0 ]4DS]); SetStatus(0); int018; {Atom: N1-2} sets; AtomByName([Network Node], Main); if(not(AtomExists), Error([Cannot find mother atom 'Network Node'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [N1-2], 1, false); SetAtt(1, 1); SetAtt(2, 1); SetAtt(3, 1); SetAtt(4, 2); SetAtt(5, 0); SetAtt(6, 1); SetAtt(7, 1); int023([N1-2], 0, 6384); Set(Icon(a), RegisterIcon(IconsDir([bmp\atoms\server.bmp]), [server])); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\NetworkNode.ico])); Set(DdbRec, [>t-node:1.>t-node1:2.>t-netreference:546320848.]); SetChannels(0, 2); SetChannelRanges(0, 255, 0, 255); int001(248); int013(1, 0, true, true, 0, 0, [], []); int013(2, 0, true, true, 0, 0, [], []); SetLoc(26, 13, 0); SetSize(1, 1, 0); LockPosition(false); LockSize(true); DisableIconRotation(false); SetTable(2, 4); int015(0, 0, [`Direction` `N1-1` `N1-3` ]); int015(1, 0, [`Capacity` 1000000 1000000 ]); int015(2, 0, [`Content` 0 0 ]); int015(3, 0, [`Use speed limit` 0 0 ]); int015(4, 0, [4DS[`Speed limit [m/s]` 0 0 ]4DS]); SetStatus(0); int018; {Atom: N1-3} sets; AtomByName([Network Node], Main); if(not(AtomExists), Error([Cannot find mother atom 'Network Node'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [N1-3], 1, false); SetAtt(1, 1); SetAtt(2, 1); SetAtt(3, 1); SetAtt(4, 3); SetAtt(5, 0); SetAtt(6, 1); SetAtt(7, 1); int023([N1-3], 0, 6384); Set(Icon(a), RegisterIcon(IconsDir([bmp\atoms\server.bmp]), [server])); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\NetworkNode.ico])); Set(DdbRec, [>t-node:1.>t-node1:3.>t-netreference:546320848.]); SetChannels(0, 2); SetChannelRanges(0, 255, 0, 255); int001(249); int013(1, 0, true, true, 0, 0, [], []); int013(2, 0, true, true, 0, 0, [], []); SetLoc(42, 13, 0); SetSize(1, 1, 0); LockPosition(false); LockSize(true); DisableIconRotation(false); SetTable(2, 4); int015(0, 0, [`Direction` `N1-2` `N1-4` ]); int015(1, 0, [`Capacity` 1000000 1000000 ]); int015(2, 0, [`Content` 0 0 ]); int015(3, 0, [`Use speed limit` 0 0 ]); int015(4, 0, [4DS[`Speed limit [m/s]` 0 0 ]4DS]); SetStatus(0); int018; {Atom: N1-4} sets; AtomByName([Network Node], Main); if(not(AtomExists), Error([Cannot find mother atom 'Network Node'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [N1-4], 1, false); SetAtt(1, 1); SetAtt(2, 1); SetAtt(3, 1); SetAtt(4, 4); SetAtt(5, 0); SetAtt(6, 1); SetAtt(7, 1); int023([N1-4], 0, 6384); Set(Icon(a), RegisterIcon(IconsDir([bmp\atoms\server.bmp]), [server])); SetMaterial( RegisterMaterial([Default], 8421504, 8421504, 3289650, 0, 0.100000001490116, 0, false, false, 1, 0), 1, a); Set(Version(a), 0); SetTreeIcon(pDir([Media\Icons\NetworkNode.ico])); Set(DdbRec, [>t-node:1.>t-node1:4.>t-netreference:546320848.]); SetChannels(0, 2); SetChannelRanges(0, 255, 0, 255); int001(250); int013(1, 0, true, true, 0, 0, [], []); int013(2, 0, true, true, 0, 0, [], []); SetLoc(42, 12, 0); SetSize(1, 1, 0); LockPosition(false); LockSize(true); DisableIconRotation(false); SetTable(1, 4); int015(0, 0, [`Direction` `N1-3` ]); int015(1, 0, [`Capacity` 1000000 ]); int015(2, 0, [`Content` 0 ]); int015(3, 0, [`Use speed limit` 0 ]); int015(4, 0, [4DS[`Speed limit [m/s]` 0 ]4DS]); SetStatus(0); int018; {Atom: Network Controller14} sets; AtomByName([Network Controller], Main); if(not(AtomExists), Error([Cannot find mother atom 'Network Controller'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [Network Controller14], 1, false); SetAtt(1, 1); SetAtt(2, 1); SetAtt(3, 546322768); SetAtt(4, 546323728); SetAtt(5, 546324688); SetAtt(6, 1); SetAtt(7, 546325648); SetAtt(8, 546326608); SetAtt(9, 546327568); SetAtt(10, 546328528); int023([Network Controller14], 0, 530528); 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\NetworkController.ico])); int001(252); SetLoc(18, 24, 0); SetSize(9, 2, 0); LockPosition(false); LockSize(false); DisableIconRotation(false); SetTable(4, 4); int015(0, 0, [`` `N1-1` `N1-2` `N1-3` `N1-4` ]); int015(1, 0, [`N1-1` `` 1 ]); int015(2, 0, [`N1-2` 1 `` 1 ]); int015(3, 0, [`N1-3` `` 1 `` 1 ]); int015(4, 0, [`N1-4` `` `` 1 ]); SetStatus(0); int018; {Atom: Distance Table} sets; BaseClass; CreateAtom(a, s, [Distance Table], 1, false); int023([Distance Table], 0, 3200); 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); int001(253); SetSize(1, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetTable(4, 4); int015(0, 0, [`` `N1-1` `N1-2` `N1-3` `N1-4` ]); int015(1, 0, [`N1-1` 0 1 17 18 ]); int015(2, 0, [`N1-2` 1 0 16 17 ]); int015(3, 0, [`N1-3` 17 16 0 1 ]); int015(4, 0, [`N1-4` 18 17 1 0 ]); SetStatus(0); int018; {Atom: Node Table} sets; BaseClass; CreateAtom(a, Up(s), [Node Table], 1, false); int023([Node Table], 0, 3200); 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); int001(254); SetSize(1, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetTable(4, 4); int015(0, 0, [`` `N1-1` `N1-2` `N1-3` `N1-4` ]); int015(1, 0, [`N1-1` 1 1 2 3 ]); int015(2, 0, [`N1-2` 2 2 2 3 ]); int015(3, 0, [`N1-3` 2 3 3 3 ]); int015(4, 0, [`N1-4` 2 3 4 4 ]); SetStatus(0); int018; {Atom: Pointer Table} sets; BaseClass; CreateAtom(a, Up(s), [Pointer Table], 1, false); int023([Pointer Table], 0, 3200); 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); SetChannels(0, 4); int001(255); int013(1, 0, true, true, 0, 0, [], []); int013(2, 0, true, true, 0, 0, [], []); int013(3, 0, true, true, 0, 0, [], []); int013(4, 0, true, true, 0, 0, [], []); SetSize(1, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetTable(4, 1); int015(0, 0, [`` `N1-1` `N1-2` `N1-3` `N1-4` ]); int015(1, 0, [1 546316048 546317008 546317968 546318928 ]); SetStatus(0); int018; {Atom: Angle Table} sets; BaseClass; CreateAtom(a, Up(s), [Angle Table], 1, false); int023([Angle Table], 0, 3200); 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); int001(256); SetSize(1, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetTable(4, 4); int015(0, 0, [`` `N1-1` `N1-2` `N1-3` `N1-4` ]); int015(1, 0, [`N1-1` `` 270 ]); int015(2, 0, [`N1-2` 90 `` 180 ]); int015(3, 0, [`N1-3` `` 0 `` 90 ]); int015(4, 0, [`N1-4` `` `` 270 ]); SetStatus(0); int018; {Atom: Atom Table} sets; BaseClass; CreateAtom(a, Up(s), [Atom Table], 1, false); int023([Atom Table], 0, 3200); 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); SetChannels(0, 2); int001(257); int013(1, 0, true, true, 0, 0, [], []); int013(2, 0, true, true, 0, 0, [], []); SetSize(1, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetTable(2, 2); int015(0, 0, [`` `Server3` `Server5` ]); int015(1, 0, [`Pointer Value` 544802960 544803920 ]); int015(2, 0, [`Connected Node` 1 4 ]); SetStatus(0); int018; {Atom: Battery Pointer Table} sets; BaseClass; CreateAtom(a, Up(s), [Battery Pointer Table], 1, false); int023([Battery Pointer Table], 0, 3200); 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); int001(258); SetSize(1, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetStatus(0); int018; {Atom: Battery Distance Table} sets; BaseClass; CreateAtom(a, Up(s), [Battery Distance Table], 1, false); int023([Battery Distance Table], 0, 3200); 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); int001(259); SetSize(1, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetTable(0, 2); int015(0, 0, [`` ]); int015(1, 0, [`Server3` ]); int015(2, 0, [`Server5` ]); SetStatus(0); int018; Up; {Atom: Node Manipulator13} sets; AtomByName([Node Manipulator], Main); if(not(AtomExists), Error([Cannot find mother atom 'Node Manipulator'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [Node Manipulator13], 1, false); SetAtt(1, 1); SetExprAtt(2, [4DS[do( setatt(3,0,c), var([atmLP], vbAtom), ForAtomTreeUnder( Model, do( atmLP := a, if( and( >(max(xAbsLoc(atmLP, Model), +(xabsloc(atmLP, Model), xsize(atmLP))), xabsloc(c, Model)), >(max(yabsloc(atmLP, Model), +(yabsloc(atmLP, Model), ysize(atmLP))), yabsloc(c, Model)), <(min(xabsloc(atmLP, Model), +(xabsloc(atmLP, Model), xsize(atmLP))), +(xabsloc(c, Model), xsize(c))), <(min(yabsloc(atmLP, Model), +(yabsloc(atmLP, Model), ysize(atmLP))), +(yabsloc(c, Model),ysize(c))), <>(atomid(atmLP),atomid(c)), not(ddb([t999-hidenodes],atmLP)) ), do( setatt(3,1,c), att([CurrentAtom], c) := ptv(atmLP) ) ) ) ) )]4DS]); SetAtt(3, 1); SetAtt(4, 1); SetAtt(5, 0); SetExprAtt(6, [if( atomexists(in(1, c)), connect(0, c, 1, c) )]); SetAtt(7, 1); SetAtt(8, 1); SetAtt(9, 1); SetAtt(10, 0); SetAtt(11, 1); SetAtt(12, 0); int023([Node Manipulator13], 32768, 3106); 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\NodeManipulator.ico])); SetChannels(1, 1); SetChannelRanges(1, 1, 1, 1); int001(251); SetLoc(15, 24, 0); SetSize(2, 2, 0); LockPosition(false); LockSize(true); DisableIconRotation(false); SetStatus(0); int018; {Atom: Product} sets; AtomByName([Product], Main); if(not(AtomExists), Error([Cannot find mother atom 'Product'. Inheriting from BaseClass.])); CreateAtom(a, Up(s), [Product], 1, false); SetAtt(1, 11); SetAtt(2, 1); 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(262); SetLoc(7, 9, 0); SetSize(1, 1, 1); LockPosition(false); LockSize(false); DisableIconRotation(false); SetStatus(0); int018; Up; int014(1, 237, 1, 238, 0); int014(0, 262, 1, 237, 0); int014(1, 238, 1, 239, 0); int014(1, 239, 1, 240, 0); int014(1, 240, 1, 241, 0); int014(1, 241, 1, 242, 0); int014(1, 243, 0, 250, 0); int014(1, 244, 1, 243, 0); int014(2, 243, 0, 250, 0); int014(0, 250, 2, 243, 0); int014(3, 243, 0, 250, 0); int014(1, 247, 0, 248, 0); int014(2, 247, 0, 239, 0); int014(1, 248, 0, 247, 0); int014(2, 248, 0, 249, 0); int014(1, 249, 0, 248, 0); int014(2, 249, 0, 250, 0); int014(1, 250, 0, 249, 0); int014(2, 250, 0, 241, 0); int014(1, 255, 0, 247, 0); int014(2, 255, 0, 248, 0); int014(3, 255, 0, 249, 0); int014(4, 255, 0, 250, 0); int014(1, 257, 0, 239, 0); int014(2, 257, 0, 241, 0); int006(10, 237, 1, 0, 0, 0); {Experiment settings} int034; SetAtt(17, 1); int007;