code snip for process time value by case.

code snip for process time value by case.

josiah_s2
Not applicable
14 Views
7 Replies
Message 1 of 8

code snip for process time value by case.

josiah_s2
Not applicable

[ FlexSim 22.1.3 ]

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.

0 Likes
Accepted solutions (1)
15 Views
7 Replies
Replies (7)
Message 2 of 8

kavika_faleumu
Autodesk
Autodesk

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
Message 3 of 8

andrew_o2
Not applicable

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
Message 4 of 8

josiah_s2
Not applicable

@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
Message 5 of 8

kavika_faleumu
Autodesk
Autodesk
Accepted solution

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

Message 6 of 8

josiah_s2
Not applicable
I believe this will work!


Thank you for your insight and assistance.

0 Likes
Message 7 of 8

josiah_s2
Not applicable
@Kavika F Could you send me the model of that via the cloud sharing?
0 Likes
Message 8 of 8

kavika_faleumu
Autodesk
Autodesk

Yeah here you go: test.fsm

0 Likes