Jump to content

Sequence alternative


Pedro

Recommended Posts

Hi,


I know about sequence tables that define a sequence from wich an entity will guide himself, but is it possible to have a sequence of something like:


Order:Machine

1: A

2: B

3: C or D

4: E


or even


1: A

2: B

3: C or D

4: C or D (depending on the previous choice)

5: E


How can I do this?

Thanks!

Link to comment
Share on other sites

The basic technique is that instead of including C and D in the sequence, you include a "choice" node where the decision is made which one(s) to go to and in what order.

I have attached a draft SimBit submitted by a user that illustrates the technique.[attachment=0]FlexibleProcessingSequence.zip[/attachment]

Thanks for the example!


I see you put the Selection Goal property as "Random", but what happens if I want it to depend on a entity's state variable, for example in my entity I have a state variable that can have the value of 1 or 2, and when it reaches that TransferNode1 I want it to decide which is that entity's destination based on that state variable. You can only use the keyword "candidate" in that property's expression, but how can I refer to the entity that is being transfered and to its state properties?


Thanks!

Link to comment
Share on other sites

I'm not sure exactly what you are trying to do, but perhaps you should be selecting a path using expressions in your path weights rather than selecting a destination. Or perhaps you could use network constraints.

Here is a brief excerpt from our training course:Routing.PNG.a791a9d8669210b09f73545c62fa8b20.PNG

Link to comment
Share on other sites

I'm trying to implement a specific case where an entity needs the following operations:


Step:Machine

1: A

2: B

3: C and D (where it can chose to do first C if the D machine is more busy, or D if machine C is more busy, but he must leave step 3 with both machines visited)

4: E

5: F


What is the best way to implement this situation? I wanted to do it by inserting a state variable inside entities telling which machines it already visited or something similar. The result that I'm looking for is for a way to have this machines listed in a table , such that if I want to modify the visited machines and their order I just need to modify that table.


Thanks!

Link to comment
Share on other sites

This can easily be solved if I have a way to modify the "Next Destination" variable/flag/state of an entity as soon as it arrives to my transfernode, this way I could use a process to set the next destination based on a complex decision according to some state variable in the entity.

Link to comment
Share on other sites

Pedro, the model posted earlier looked to me to do exactly what you wanted. It used the 'set node' step with add-on processes, and used decisions based on entity states that tracked which servers had been visited. Did you take a look at the processes in the model? If so, did they do what you want?

Link to comment
Share on other sites

I know, the problem is that I want to do it just throught data tables. That example uses a fixed number of state variables


TjxnzIJ.png


That must be modified each time I ned to add or remove machines to the sequence, this is not scalable.

Link to comment
Share on other sites

Arrays can be dynamically sized to match a table (on initialization).

Or you can use Storages (an element) which is essentially a dynamic array of objects.

But lets keep this thread on topic.

How can that be done? I can't find such option.

Link to comment
Share on other sites

×
×
  • Create New...