question

Josiah S2 avatar image
0 Likes"
Josiah S2 asked Logan Gold edited

code snip for process time value by case.

I'm using a code snippet for changing the processtime of a processor once a task sequence sends an operator to help (reducing needed time in half do to help) but when thats done and I need him to leave I want the code to put the processor's processing time back to value by case. The value by case has to be able to read the labels again for the values.

FlexSim 22.1.3
code snippet
· 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.

Kavika F avatar image Kavika F ♦ commented ·

Hey @Josiah S2,

It's hard to know how to help without looking at your model. To receive a more accurate solution, please post your model or a sample model that demonstrates your question.

Proprietary models can be posted as a private question visible only to FlexSim U.S. support staff. You can also contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·
Andrew O avatar image Andrew O commented ·

Hi @Josiah S2,

We haven't heard back from you. Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to @Kavika F's comment so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·
Josiah S2 avatar image Josiah S2 commented ·

@Kavika F Here is a model picture. It wont let me attach the model file. sorry, I had gotten busy and forgot to check the post.


I would like for the 3rd operator on the right to move to the 1st operator on the left and split the process time. after a certain period of time I would like for the operator to go back to his station and for the first operators processtime to set back to processtime BY CASE. I was using labels to define the by case process time. I want this task sequence to start when the line before the first operator reaches a certain object limit.

1659623904016.png

0 Likes 0 ·
1659623904016.png (173.3 KiB)

1 Answer

Kavika F avatar image
1 Like"
Kavika F answered Logan Gold edited

Hey @Josiah S2, one thought I had was to set it up using a Global Table. This gif shows an example of a simple setup I did similar to yours where I have a Decision Point (DP) that delays Type 1 items for 50 seconds. If the Photo Eye (PE) gets blocked for too long (i.e., 10 seconds), then the Process Flow (PF) brings Operator3 over to help Operator1.

variable-process-time-by-processor-num.gif

There's a label set on the DP called "numOperators" that starts at 1 but gets updated to 2 in the PF when Operator3 arrives. Then the delay/"process time" changes based on the code in the "On Arrival" trigger.

Table("OperatorProcessTable")[current.numOperators]["ProcessTime"]

1659718630898.png

This code for the conditional will look at the global table I made and grab the process time based off of the number of operators at the station.

1659718662619.png

Once the PE has been cleared, Operator3 will go back to their station. The PF will change the label of numOperators from 2 back to 1 and the Delay will change back from 20 to 50.

I don't think changing the time in code would be effective if you're wanting to change the time based on case. Here in the table, you could have another column that specifies "Type" and change process time based on NumOperators and type so it looks more like this.

1659718893688.png


· 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.

Josiah S2 avatar image Josiah S2 commented ·
I believe this will work!


Thank you for your insight and assistance.

0 Likes 0 ·
Josiah S2 avatar image Josiah S2 commented ·
@Kavika F Could you send me the model of that via the cloud sharing?
0 Likes 0 ·
Kavika F avatar image Kavika F ♦ Josiah S2 commented ·

Yeah here you go: test.fsm

0 Likes 0 ·
test.fsm (61.9 KiB)