Server set up

All topics specific to modeling questions in Enterprise Dynamics
MartinL
Posts: 28
Joined: Tuesday 03 February, 2015 - 21:43

Server set up

Post by MartinL »

Hello,

I would like to set up a server, which has following special requirements.

1) HumanResuorce has to work 3h with a product in the server. HumanResource works by schedule (8.00 - 16.30)

2) Product has to stay in the server at least 10h, before it could proceed to next server. ( no schedule, just 10h between entering and leaving the server)

3) Product can leave the server only if both previous requirements are fulfilled.

The server simulates an assembly workplace, where machines are assembled, which come from curing oven ( paint drying). Assembly could start right after ovening and will last 3h, after what it will be packed. Nevertheless, the packing could start minimum 10h after ovening and the assembly is not always started just after ovening (depends on HumanResource availabilty).

I would really need some ideas and help how to simulate such process.

Appreciate your help!
Bram de Vries
Posts: 60
Joined: Thursday 08 January, 2015 - 13:29

Re: Server set up

Post by Bram de Vries »

Hello Martin,

To get you started, I made a small model which includes the features you mentioned. You will find it attached.

The model works as follows. One product is created every 24 hours (to start simple). It is sent to a queue, which is followed by a CallHumanResource atom and a Server (called Assembly). These two atoms act as your assembly workplace. After these two atoms there is another server, which represents your packing process. On entry of the CallHumanResource atom, the output of the previous queue is closed (I assumed that your assembly workplace has a capacity of 1). In the CallHumanResource atom, the product waits until a Human Resource can pick it up. It then enters the assembly server, upon which two things hapen:

- The input of the packing server is closed, because a product has to spend three hours with the human resource before it can move on.
- A user event called FreeHumanResource is scheduled. This user event will release the human resource from the product. It will also open the input of the packing server. The delay time of 3 hours for this user event means that it will be executed at the correct time, 3 hours after the human resource was assigned to the product.

To make sure that the product stays in the assembly workplace for 10 hours, I also adjusted the Cycletime of the assembly server. Remember that the combination of the CallHumanResource atom and the assembly server is supposed to represent your assembly workplace. This means that time which the product spends at the CallHumanResource atom should also be counted for the 10 hours. Therefore the cycletime of the assembly server has been set to: Max(0, hr(10) - (Time - Label([EntryTime], First(c)))).

The products are given a Label called EntryTime upon entry of the CallHumanResource atom. The time a product should spend in the assembly server is then 10 hours minus the time spent in the CallHumanResource atom (Entrytime of the product for the assembly server - Entrytime of the product for the CallHumanResource atom). Since this time could in theory be given a negative value, I never allow for the cycletime to be below zero using the Max function. Of course, products should be able to stay longer in the assembly workplace depending on when the Human Resource atom picked them up. So as described before, the input of the packing server is only opened when the human resource is finished with the product. When the product enters the packing server, the input of the CallHumanResource atom is opened again because the assembly workplace can now accept new products.

To regulate the availability of the human resource, I attached an Availability Control Atom with a Time Schedule atom to the Human Resource team. I inserted a very simple schedule, but you can of course update this schedule and also make it repetitive.

I hope this helps you out a little, please do not hesitate to ask any more questions if anything is unclear. Regards, Bram.
Attachments
AssemblyWorkplace.mod
(22.46 KiB) Downloaded 300 times
MartinL
Posts: 28
Joined: Tuesday 03 February, 2015 - 21:43

Re: Server set up

Post by MartinL »

Hi Bram,

First, thanks for a reply. I looked at the model you sent me, tried to test it and one error occured.

Seems that the UserEvent ( FreeHumanResource) is not working properly. When the HumanResource has been working for 3 hours with a product in Assembly server an error occurs and and HumanResource is not released from the Assmebly server. Due to that the Packing server input is not opened and product will be stuck in the Assembly server.

The error message itself is following and maybe you know how to fix it?

19 Time: 28800 Atom: User Events1 (ID=180), OnEvent>Compile error: "&13" is not a valid expression. Reference: Do(&13&11&11HumanResourceTeam_FreeResources(refHumanResourceTeam,&11First(i)),&13&11&11OpenInput(Out(1,&11i))&13)&13
20 Time: 28800 Atom: User Events1 (ID=180), OnEvent>Compile error: "11OpenInput" is not a valid expression. Reference: Do(&13&11&11HumanResourceTeam_FreeResources(refHumanResourceTeam,&11First(i)),&13&11&11OpenInput(Out(1,&11i))&13)&13


Nevertheless, in theory the functionality should be there, if the error is solved. Also in my case I have different products with a different cycle time ( time when HumanResource is needed. Curing time is constant.) So basically the UserEvent delay is dependable on product type. Is it possible to modify the UserEvent delay so that, the delay value is read from the prduct label, which is given to the product in ArrivalList?

BR.
Martin
MartinL
Posts: 28
Joined: Tuesday 03 February, 2015 - 21:43

Re: Server set up

Post by MartinL »

Hi,

Also I was thinking if it is possible to control the HumanResource availabilty with HumanResourceSchedule. In my project model I've simulated the working time (2 shifts and breaks) like this and would like to do same for this part.

BR.
Martin
Bram de Vries
Posts: 60
Joined: Thursday 08 January, 2015 - 13:29

Re: Server set up

Post by Bram de Vries »

Hello Martin,

The reason that you are getting those errors is that I have been working with a different version of the User Events atom. The version you are using does not allow for the Eventcode of the user events to have any tabs, spaces or enters between the code. My version does allow for this and I did not realize this. I attached a new model where I removed all the spaces and enters from the user event code and this should fix your problem.

In this model, I also changed the delaytime of the user event FreeHumanResource to a function which depends on a label of the involved product. This label is defined on the creation trigger of the source. One thing that should be mentioned is that I refer to the product using the reference First(c). It might be expected that the reference c should in this case refer to the User Events atom, but since FreeHumanResource is called on the entry trigger of the Assembly Server, this server is at that moment the current atom c.

Lastly, you can indeed use the HumanResourceSchedule for the availability of the Human Resource in this model. Please note that I did not include this in the attached model.

Kind regards,

Bram
Attachments
AssemblyWorkplace_v2.mod
(19.23 KiB) Downloaded 264 times
Bram de Vries
Posts: 60
Joined: Thursday 08 January, 2015 - 13:29

Re: Server set up

Post by Bram de Vries »

Hi Martin,

I notice that the delay time of the user event was not correctly stored in the model I attached. It was this:

Code: Select all

If(
  Label([Type], First(c)) = 1,
  Hr(3),
  Hr(5)
)
So if you use this for the delay time of the user event FreeHumanResource, you should be able to have different cycletimes (of the Human Resource) for different products. Of course you can change the times and add more types of products to the model.

Kind regards,
MartinL
Posts: 28
Joined: Tuesday 03 February, 2015 - 21:43

Re: Server set up

Post by MartinL »

Hello Bram,

I tested the model and found one issue. If you look the model attached, then there is a following schedule (implemented on HumanResource and simulates working time):

hr(0) =1
hr(8) =0
hr(12)=1
hr(13)=0
hr(17)=1

There were two conditions, when product could exit the assembly server:

1) HumanResource has to work 3h with the product
2) Product has to stay in assembly workplace ( server+CallHumanResource) at least 10h

So if ArrivalList releases the product atom at hr(16) , then it should enter the Packing server at hr(34), when the two conditions and the HumanResourceSchedule is taken into account. But in this case the product enters the Packing server at hr(26), which should not be possible, because HumanResource has worked only 1h with it.

I've set the Task Interruption to "Interrupt and finish task after downtime" and the schedule repeat time is 24h, but still no working solution.

How should the model be modified so that only hours, when HumanResource is available are taken account into condition nr.1 calculation?

BR.
Martin
Attachments
AssemblyWorkplace_v4.mod
(21.37 KiB) Downloaded 269 times
Bram de Vries
Posts: 60
Joined: Thursday 08 January, 2015 - 13:29

Re: Server set up

Post by Bram de Vries »

Hello Martin,

You are correct, I falsely assumed that the Human Resource agent would finish his task before taking a break.

To better model your situation, I decided to remove the User Event atom from the model and register the time that a Human Resource spends with a product in a different way. I use a label called HrTime on the products, which is updated every time the task of a Human Resource is interrupted (on this trigger of the Human Resource) or when a product leaves the Assembly server. This label is supposed to represent the time a Human Resource spends with the product. When a product enters the Call Human Resource atom, a label called starttime is set on this product (to indicate when the complete process at the Assembly Workplace started). Then, when a product enters the Assembly server, I check whether the product needs time with the Human Resource. If this is the case, I set the cycletime of the server to this time. If this is not the case, I set the cycletime of the server to the time that needs to be spend in order to reach the 10 hours (if necessary, else both conditions are fulfilled and the cycletime can be zero). The total time that a product spends at the Assembly workplace is calculated as the simulation time minus the label starttime for this product.

If one or both conditions for the product are not met, the product is sent from the Assembly server to a queue and then back to the server. This way, a product can have multiple cycles in the server until both conditions are met (and this is also why the cycletime for the server can result in different times for the same product).

I have not been able to test the model beyond the schedule that you supplied, so let me know if there are any cases I missed.

Kind regards,

Bram
Attachments
AssemblyWorkplace_v6.2.mod
(21.28 KiB) Downloaded 255 times
MartinL
Posts: 28
Joined: Tuesday 03 February, 2015 - 21:43

Re: Server set up

Post by MartinL »

Hi Bram,

Thanks for your reply. It seems that there might be some bug in the model. I experimented with different arrival times (ArrivalList) and found some cases, when the model doesn’t work like supposed to.

Example case: HumanResource schedule is same, ArrivalList realeases the product on hr(2). In that case the product should arrive at the packing server at hr(12), but in the model the product is in the assembly server till hr(15) and then it will start bouncing between Assembly server and Queue13.
Similar problems always appear when product is realesed on the time when HumanResourceSchedule is down (=1).

I’m not sure what wrong in the scripts, but maybe could help with that.

BR.
Martin
Bram de Vries
Posts: 60
Joined: Thursday 08 January, 2015 - 13:29

Re: Server set up

Post by Bram de Vries »

Hello Martin,

You are right, the problem was that the time that a human resource spends with a products was calculated wrongly for products which enter the assembly workplace when the human resource is not available (in the case that a human resource is not again interrupted after he resumes from his initial break).
In the exit trigger of the assembly server, I calculated this time as the difference between this exit time and the time when a product first entered the assembly workplace. When a product enters while the human resource is not available this calculation is not correct and so I now calculate based upon the time a human resource starts working with the product.

I attached my adjusted model and when I tested it, both situations you have described so far were handled correctly. Let me know if you find any more irregularities.

Kind regards,

Bram
Attachments
AssemblyWorkplace_v7.mod
(21.62 KiB) Downloaded 264 times
Post Reply