question

Prateekq4 avatar image
0 Likes"
Prateekq4 asked Natalie White commented

process time changes based on a specified "per second" rate.

So i am developing a model with a processor that must change its process time based on a specified rate. Now i can reference set values by pulling them from the global table by inputting something like

1*Table("GlobalTable1")[1][4]. But this gives discrete values

in the process time. Suppose i want a continuous change in values, what code could do this?

FlexSim 22.0.16
dynamic process time
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·
This sounds like you want to build a PID controller for a discrete event driven processor.
0 Likes 0 ·
Carter Walch avatar image Carter Walch commented ·

Hi @Prateekq4, was one of Jeanette F's or Jason Lightfoot's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·
Natalie White avatar image Natalie White commented ·

Hi @Prateekq4, was one of Jeanette F's or Jason Lightfoot's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·
Jeanette F avatar image
0 Likes"
Jeanette F answered Jeanette F commented

Hello @Prateekq4,

@Jacob W2 had created a model close to your description and he modified it so that it focussed on the concept of the kinetic tracked variable which you will need to accomplish what you are asking.

Tracked Variable Processor:

Kinetic tracked variable.fsm

This model demonstrates a method of using a tracked kinetic variable to measure process completion on a processor. This allows a processor to have a dynamic processing time that isn’t possible using the standard processor logic. This is all handled though the use of an object process flow that easily allows other processors to be used in a similar fashion.




This is the basic layout for the model. A source, a basic fixed resource because It has no innate logic that we have to deal with, and a queue.

1690065681778.png

This is the object flow layout. It’s fairly simple, but handles all of the logic we will need for the processor to work. The “Model Start Logic” allows the first item to enter the processor.


The “Item Control” section is the main feature of the model. A token is created whenever an item enters the processor. A process time label is created that is used to set when the process will be completed. This value should be set in model time units. For example if the part takes 50 seconds to complete and the model time is in seconds, this should be set at 50 seconds.


The Initialize tracked variable custom code block is what actually creates the tracked variable that represents the processing progress.


A token that will be used to set the processing rate is then created in the “Variable Rate Loop”. This token will first set an initial rate for the tracked variable, and then after a random delay, it will set a new rate for the part processing.

1690065667200.png

While the token for tracking the rate is running, the token in the “Item Control” container is at the Wait for Event activity watching the tracked variable that we created. Once the tracked variable reaches the value of the process time label, it then releases the item from the processor, and then readies the processor for the next item. The tracking rate token is then released to the delay and sink activities, and the token is then sent to the sink activity.




· 2
5 |100000

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

Prateekq4 avatar image Prateekq4 commented ·
Hi, thank you for the reply. My flexsim is the 2022 version. Is there a way i can view this in the 2022 version since this model is developed in 2023 version.
0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ Prateekq4 commented ·
Hello @Prateekq4, You can download the latest version and open the model. If your license is not current for 23.1 then it will still open for you to view but there will be a model limit. The model limit should not impede you being able to examine how the model is made.
0 Likes 0 ·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

If you're modelling a continuous rate change based on other continuous variables you may need to implement a continuous systems solver which FlexSim does not currently have. Google Euler, Trapezoidal, Verlet, or Runge-Kutta methods.

5 |100000

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