Labelvalue in tabel
Posted: Monday 10 April, 2023 - 11:16
Hey
I'm trying to simulate a production system for a university project. There is a total of 5 operations, which is sequenced after Earliest due date. I've assigned a label called Duedate in the source atom with a value from a empirical distribution table. The duedate value represent the maximum days the product can be in the system before it will be delivered late.
I've used the following code in the trigger on entry in the sink atom to put the throughput time and Duedate value in a table.
Do(
SetTable(
nrows(refTimeData)+1,
1,
refTimeData
),
SetTimeData(
nrows(refTimeData),
1,
Age(i)
),
SetTimeData(
nrows(refTimeData),
2,
GetLabel("DueDate", i)
)
)
The first part works perfectly without the last 6 lines of the script. It says the Duedate is not a valid expression, even though when i pause the simulation and press a product and go to Atom Labels in the menu i can see that each product has been assigned Duedate and a associated value. The name and capital letters are identical when the label is created and in the code above.
How can i get the script to regonize the duedate label?
Best regards
Mads
I'm trying to simulate a production system for a university project. There is a total of 5 operations, which is sequenced after Earliest due date. I've assigned a label called Duedate in the source atom with a value from a empirical distribution table. The duedate value represent the maximum days the product can be in the system before it will be delivered late.
I've used the following code in the trigger on entry in the sink atom to put the throughput time and Duedate value in a table.
Do(
SetTable(
nrows(refTimeData)+1,
1,
refTimeData
),
SetTimeData(
nrows(refTimeData),
1,
Age(i)
),
SetTimeData(
nrows(refTimeData),
2,
GetLabel("DueDate", i)
)
)
The first part works perfectly without the last 6 lines of the script. It says the Duedate is not a valid expression, even though when i pause the simulation and press a product and go to Atom Labels in the menu i can see that each product has been assigned Duedate and a associated value. The name and capital letters are identical when the label is created and in the code above.
How can i get the script to regonize the duedate label?
Best regards
Mads