question

gilbert jerald avatar image
1 Like"
gilbert jerald asked Jeff Nordgren answered

how can i make connection that item arrives first should move to first processor and second to the next processor and further

three processor or connected in series to a conveyor , how can i make connection that item arrives first should move to first processor and second to the next processor and further hear i have attached a model in starting time the item moves correctly but as time process the item does not move as per the condition. johnson-pharamaceutical-new-model.fsm

Choose One
send to portportsround robin
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Matt Long avatar image
4 Likes"
Matt Long answered Matt Long commented

Currently your model is using a duniform() distribution on your decision point to send it to a processor. This will randomly pick a processor. What you want to do is increment your output each time an item hits the decision point. The following code will produce the output: 1 2 3 1 2 3 1 2 3 etc.

outobject(current, (getinput(current) - 1) % nrop(current) + 1)
· 8
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

joshua.d avatar image joshua.d commented ·

Does the % in your code act like the fmod() command?

3 Likes 3 ·
Brandon Peterson avatar image Brandon Peterson ♦ joshua.d commented ·

Yes, you could use fmod() the following way with the above code:

outobject(current, fmod(getinput(current) - 1, nrop(current)) + 1)
3 Likes 3 ·
Matt Long avatar image Matt Long joshua.d commented ·

The % is an integer mod where the fmod() is for floating point numbers.

3 Likes 3 ·
Brandon Peterson avatar image Brandon Peterson ♦ Matt Long commented ·

Thanks for the clarification! Is there a symbol/character for a floating point mod?

3 Likes 3 ·
gilbert jerald avatar image gilbert jerald commented ·

thank you for the reply sir . now my model is running sir can u please explain the meaning of the coding which you have done sir. i am from mechanical background i don't have any idea about the coding can u please explain it sir

0 Likes 0 ·
Arun Kr avatar image Arun Kr gilbert jerald commented ·

Dear Gilbert,

I think you may have to learn the basics of c++/ c programming. Give importance to control structures ( if-else, switch, loops) ,functions and syntax rules.

Regards,

Arun KR

1 Like 1 ·
gilbert jerald avatar image gilbert jerald Arun Kr commented ·

i have added third processor as a back up ,where my first too processor have the capacity to handle 133% of incoming products , by this given data the ideal time of the first two machine should be less when compare to the third processor and the amount of work done should be more for the first two machine when compare the third processor ,for that what should be the changes to be done in my model or any coding want to be change if else please send me the coding that is to be change

0 Likes 0 ·
Matt Long avatar image Matt Long gilbert jerald commented ·

My background is mechanical as well. As a start, take a look at the FlexSim User Manual under FlexSim Coding.There is a lot of information there that will get you started and teach you about mathematical operators, math functions, syntax in FlexSim and commands.

There are some great online courses you can take, some free, some you have to pay for. lynda.com has great tutorials if you want to get more in depth. Just be aware that only some things will cross over to FlexSim.

1 Like 1 ·
Jeff Nordgren avatar image
2 Likes"
Jeff Nordgren answered Jeff Nordgren edited

@gilbert jerald

Here is a model that I posted for essentially the same question/problem here. And here is the model:

johnson-pharamaceutical-new-model-jn2.fsm

This is very similar in results as @Jörg Vogel posted above. But still using DPs instead of PEs. His model shows Processor7 with 17.7% and my model is 10.5% processing. Not sure which one is more accurate. You will have to decide that. The essential difference between the models is that in my model, up to the very last DP, you can still send the flowtiem to one of the first two processors, if one of them is available. Thus the lower % processing number.


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeff Nordgren avatar image
2 Likes"
Jeff Nordgren answered Joerg Vogel edited

@gilbert jerald

Would the attached model fit your needs? What is does is send the flowitems from the conveyor to the next available processor in the order of Processor5, Processor6 and then Processor7 only if both of the first processors are busy. Is this what you are looking to do?

johnson-pharamaceutical-new-model.fsm


· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·

;-) nice solution. @phil.bobo sorry, I must comment this, that way.

0 Likes 0 ·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel edited

@gilbert jerald

If you insert a jam control on the conveyor and use the converyor as a buffer, you can get the distribution you want. An extra control let items wait at an exit, when the process finish time is nearly reached. The decision point sends all items to exit 3. But the photo eyes control the allocation.


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.