question

Rober G avatar image
0 Likes"
Rober G asked Rober G commented

Global Table Equation

Hi! I hope you are well :)

I have the following control policy (T,S)
1692886125687.png

I wish to save the order quantity needed to obtain level S to my "Squantity" global table, so that once the lead time is over the Inventory is updated with the "Squantity" corresponding to the token.type. As seen below the S value is the Set Quantity S from my global table "MaximumS" minus the Current Inventory from "Buunker Bulk Inventory". This equation is however causing error for me.

1692886085149.png


My "Update INV WIth S" can successfully obtain the value once the lead time has passed, however as stated I am struggling to save the S Quantity. Could you please explain where I went wrong in Figure 1?

Kind Regards
(T,S).fsm

FlexSim 23.0.10
process flowtablesglobal tablescontrol policy
1692886085149.png (13.8 KiB)
1692886125687.png (14.0 KiB)
ts.fsm (73.6 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

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Rober G commented

MaximumS is formatted as a string - change it to numeric (or convert the string to a numeric on the fly).

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

Rober G avatar image Rober G commented ·

Awesome, @Jason Lightfoot is this achievable through using the function string.toNum() ? :)

Trying it out now to edit the flex script directly, just a foreign concept.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Rober G commented ·

I'd right click the column and change it to string data - it's what people will expect and you can then use the data for comparison queries etc. if needed.

The syntax for getting the numeric value of the string cell will be something like this:

Table("GlobalTable1")[1][1].as(string).toNum()
1 Like 1 ·
Rober G avatar image Rober G Jason Lightfoot ♦♦ commented ·
Thanks a lot!
0 Likes 0 ·