Determining status across several atoms

All topics specific to modeling questions in Enterprise Dynamics
Jtran
Posts: 15
Joined: Wednesday 04 October, 2017 - 11:44

Determining status across several atoms

Post by Jtran »

Hello

I hope you may be able to help me again. I am having issues determining the status(Busy, idle, blocked, down) of a process i have modeled which consist of the following.
Conveyor --> Process --> Conveyor.

In real life the conveyor is a part of the machine, and referred to as the inbound and outbound conveyor.
In my simulation they consist of separate atoms, which is two conveyors with one on each side and a process in the middle.
They are currently programmed, by applying user events to not allow other product into the inbound conveyor unless it matches the label value of the previous product. If it is another product, then the machine and conveyors will have to be emptied first, before the changeover can occur and a new type can be allowed into the system.

The current issue is when there is nothing in the middle process, a product is block on the outbound conveyor and a different kind of product waits to enter the inbound conveyor. The inbound conveyor will show that the conveyor is empty, process will show idle status and the outbound will be blocked. When the machine and the conveyors are considered as one, the most correct status will be blocked.

I would therefore like to determine an overall status of these three atoms, as they are integrated parts in reality. Is this possible considering the way it has has been modeled currently?

I hope that my formulation makes sense, or else please let me know.

Best regards,

Jesper Tran
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Determining status across several atoms

Post by HarryBunnik »

Hello Jesper,

I understand what you want, but with a combined object, build up out of several objects that all have their own automated status reports, it is difficult to get something useful out of it that is still valid for the complete set. So we will need a workaround.

What you however can do, is to keep track of the statuses yourself. To do this you will need to place an atom to which you connect the Status monitor. On that extra atom (preferably one that doesn't use statuses by itself) you can then set the statuses, the moment something changes in your block which you find important (I used a table).

For instance:
  • if you connect the second outgoing channel of your first conveyor to the information/central channel of the object on which you keep track of the statuses.
  • You can update the status when for instance an object enters the conveyor (Entry trigger): SetStatus(26, out(2, c)). (26 here stands for conveying)
  • On overview of the available predefined statuses can be found in the help file under Statuslist.
  • On the Exit trigger you can then change the trigger to: SetStatus(2, out(2, c))
  • You'll need a similar setup for the server and the outbound conveyor.
  • For instance Exit trigger outbound conveyor : SetStatus(4, out(2, c))
  • The problem will be the blocked status I guess. You could place a sensor just before (0.01 mm or so) the end of the conveyor and set the status there to blocked. Over the overall process times, the time that it is reported falsely blocked (the 0.01mm travel time) will be minimal. If that is still to big, we have to see how we can get to a more accurate registration.
  • Make sure that the status of the atom is set back to idle on Reset (for instance with an Initialize atom).
And that way you can create a status overview that reflects your combined process. I created a small test model to see if it actually works:
Status modeling.mod
(35.38 KiB) Downloaded 215 times
I hope this helps you further.

Harry
Jtran
Posts: 15
Joined: Wednesday 04 October, 2017 - 11:44

Re: Determining status across several atoms

Post by Jtran »

Hello Harry

Thank you, this gives some insight in where the solution may go. Although i am still having a challenge, as the number of product which can enter is several more, and the status which is required depends on what happens.

For an example when there is a product on the outbound conveyor, and further processing is blocked.
- If there is a product in the process and it is processing, then it should state busy.
- If there is a product in the process and it is done with processing, then it should state blocked.
- If there is no product in the process(and it shows idle), then the outbound conveyors status blocked should be applied.

Additionally if possible, if the conveyor before the inbound conveyor is blocked, and all of them is idle then it should state changeover.

I have attached a part of my model, in order to get a better understanding of my challenge.

Best regards,

Jesper
Attachments
test 1.mod
(222.64 KiB) Downloaded 208 times
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Determining status across several atoms

Post by HarryBunnik »

Hello Jesper,

I fear that the only solution I see, is that you keep track of how many objects are within your process (for instance in the table that you use to display the status of your entire process block) and set the status depending on that. So that will results in some if- or case statements.

So it's mainly a case of administration, I think.

If all code is the same for each process block, you can decide to place that code in functions (Entry trigger, exit trigger), so you only have to update the function, instead of having to update the code at each point again. I can imagine it will needs some iterations, before it is all working the way you want and that can safe you some time.

Regards,

Harry
Jtran
Posts: 15
Joined: Wednesday 04 October, 2017 - 11:44

Re: Determining status across several atoms

Post by Jtran »

Hello Harry

Thanks for the help so far, i am currently using the external solution you suggested with a table, and it works fine.

I have another question in relation to queue discipline. I am currently using the function "findqueuepos()" in order to arrange the queue in relation to a label value of my own. I would like to apply a queue discipline according to an additional label value.

For example:
- I have "priority" orders with label value {1,2,3}
- And label value "DueDate", where i am subtracting the "age()" of the atom to determine how long there is left to deliver the product.

I would like to arrange the queue according to priority, and within the each priority value the queue should be arranged in in relation to "Duedate" label minus age.

Regards,

Jesper
Jtran
Posts: 15
Joined: Wednesday 04 October, 2017 - 11:44

Re: Determining status across several atoms

Post by Jtran »

Hey again

An additional question in relation to my ExcelActiveX atom. I have the "Excel visible at startup" unchecked, but it still keeps on opening up visibly when i connect to my sheet. If i close the document it disconnects, and re-connecting opens it up, so it becomes visibly again.

Regards,
Jesper
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Determining status across several atoms

Post by HarryBunnik »

Hello Jesper,

The Queue discipline is executed every time that a new product enters the Queue. At that moment the code is expected to return the location at which the freshly entered product must be placed. This means that in the Queue discipline code you have to loop over the content of the queue and see where it should be placed.

I've written a small piece of code that does this. Note that I use a multiplication factor on the priority, which must ensure that the priority always becomes the main factor on which to sort. Since the time is always of less influence (due to the factor), this is the second part in which the sort takes place. Depending on how large your time difference becomes, it can be that you have to enlarge this factor (in both the Queue discipline and the Exit Trigger).

Using the IndexMatch I loop over the content and search for the place where the latest atom should be placed.

I've placed a few error messages that gives an idea what is happening.

Queue discipline

Do(
var([valAnswer], vbValue),
var([valFactor], vbValue, 1E5),

Error([Content], content(c), [new atom in queue with prio:], Label([Priority], Last(c)) * valFactor + Label([DueDate], Last(c)) - Age(Last(c))),

valAnswer :=
IndexMatch(
Content(c) - 1,
1,
Do(
Error(count, Label([Priority], Rank(count, c)) * valFactor + Label([DueDate], Rank(count, c)) - Age(Rank(count, c))),
Label([Priority], Last(c)) * valFactor + Label([DueDate], Last(c)) - Age(Last(c))
>=
Label([Priority], Rank(count, c)) * valFactor + Label([DueDate], Rank(count, c)) - Age(Rank(count, c))
)
) + 1,
Error([Is placed in queue on position:], valAnswer, [with prio], Label([Priority], Rank(valAnswer, c)) * valFactor + Label([DueDate], Rank(valAnswer, c)) - Age(Rank(valAnswer, c))),
valAnswer
)


Exit trigger on Queue
Error([Is exiting with prio], Label([Priority], i) * 1E5+ Label([DueDate], i) - Age(i))

I hope this helps you further.

Regards,

Harry
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Determining status across several atoms

Post by HarryBunnik »

And there indeed seems as if something goes wrong with the ExcelActiveX atom. I will report it.
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Determining status across several atoms

Post by HarryBunnik »

I see the logic behind not allowing Excel to become invisible (when other excel files are open, the chance is quite big they are opened in the same instance of Excel. These will also be hidden and that is mostly an unwanted side effect).

However, then it might be better not to offer his option in the GUI.
Jtran
Posts: 15
Joined: Wednesday 04 October, 2017 - 11:44

Re: Determining status across several atoms

Post by Jtran »

Hello Harry

Thanks in relation to the queue question, that helped resolving my issue.

In relation to the excel, it worked at the start where it would not open up the excel when i connected, if i did not have the "Excel visible at startup" checked. This has been occurring lately on one of my systems. I tried on another system, and here it worked fine. Not sure if it is an installation problem, or something that i am missing. Reasoning for not wanting it open is because the simulation is already some what slow, and i do not want to put more stress on the system when i am collecting data.

Best regards,

Jesper
Post Reply