question

Ignasi P avatar image
1 Like"
Ignasi P asked Ignasi P commented

How can I make a send to port only if a tracked variable is lower than a value?

How can I make a a send to port only if a tracked variable is lower than a certain value without blockign the entire system, so just wait it out untill the variable is lower than a value and continue.

Hi Community,

I have been trying to block a processor from sending a part to a buffer if the amount of parts in the system from a certain point (Which I did a tracked variable for, like workinprogress but from a certain point) is bigger than 5. In other words, I want the processor NOT to send to port if this tracked variable is bigger than 5, and wait untill the element goes out of the system, that I have a trigger that reduced the value of that variable by 1.

I have tried to create a trigger that copies the value of the tracked variable when finishing with the processor, but despite it stops the process it doesn't continue when the variable is low enougth again to continue the process. I understand I should code it myself, but I don't know how to do it. I made a quick model with the same problem so it's more visual.

In the image we can see the trakced variable I have created, and from the second queue there should not be more than 5 items. Both in the queue 2 and the processor 2.

Thanks a lot in advance, that would be really helpful.

FlexSim 17.2.5
processortracked variablestrackedvariabletracking
captura.jpg (75.4 KiB)
questionmodel.fsm (18.2 KiB)
5 |100000

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

1 Answer

Roi Sánchez avatar image
1 Like"
Roi Sánchez answered Ignasi P commented

Hi @Ignasi P, in the attached model you will find a possible solution to your question. As you will see, I used ProcessFlow to update the value of a tracked variable called MyContent, which is the same as the queue´s subnodes length. Then, just after the process finishes in Processor1, a decision is made regarding the value of this tracked variable as you said.

I hope it will be helpful for you.

routing-based-on-trackedvar.fsm


· 3
5 |100000

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

Marcello Rosadini avatar image Marcello Rosadini commented ·

@Ignasi P Unfortunately FlexSim does not allow backward compatibility saving.However your license is now upgradable and you can use the latest FlexSim version. If, for whatever reason, you prefer to keep working on 17.2 you could just open the example and reproduce it in your model. However, I would strongly suggest to update the license and use the latest version. As I mentioned in my email, with the updated license you can run any of the previous versions of FlexSim as well.

1 Like 1 ·
Ignasi P avatar image Ignasi P Marcello Rosadini commented ·
@marcello.rosadini

I understand, will try to upgrade again to the new vesion, thanks for the upgraded licence adn for your help!

0 Likes 0 ·
Ignasi P avatar image Ignasi P commented ·
@Roi Sánchez

Thanks a lot for your time and help, that sound really good, but I can't open it because it says it is not compatible with my flexsim version. I am currently using flexSim 17.2.5, so could you possible save in on another format or just make a picture capture here? Thanks a lot again!

0 Likes 0 ·