question

Axel Kohonen avatar image
0 Likes"
Axel Kohonen asked Axel Kohonen commented

Possible to set a zone partition constraint to use FlexScript?

Hi,

I would like to set a Zone partition constraint to use different values depending on the partition that we are in. It is possible using the exception rows as in the image below. However, the values are fixed. Is it possible to make them into FlexScript so that one could use e.g. a value defined in a macro as with the main limit?

Or would it be possible to get the token/partition already in the limit code so that one could write the exception rules there?

Thank you!

Kind regards,

Axel

FlexSim 17.2.5
zone partitionconstraintspartition constraint
· 1
5 |100000

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

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·
0 Likes 0 ·

1 Answer

Jordan Johnson avatar image
3 Likes"
Jordan Johnson answered Axel Kohonen commented

For now, if you want to get a macro to return its value, you should use parenthesis:

(MY_MACRO)

The check for code checks for parenthesis. Maybe that will change someday, but that will work for now.

testmacro.fsm


testmacro.fsm (16.0 KiB)
· 5
5 |100000

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

Axel Kohonen avatar image Axel Kohonen commented ·

Hi @jordan.johnson

Great! That works in this case. Do you have any plans on making the constraints FlexScript?

Thank you!

0 Likes 0 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ Axel Kohonen commented ·

It is FlexScript. The parenthesis are how I check if the node should be compiled as FlexScript.

1 Like 1 ·
Axel Kohonen avatar image Axel Kohonen Jordan Johnson ♦♦ commented ·

Hi @jordan.johnson

I tried to use the parenthesis trick to use a macro to define the name of the partition, but that does not seem to work, regardless if I add the "/" which FlexSim seems to add if I write the partition name directly.

Is it possible to use a macro in the partition name field or only for the limit value?

Thank you!

0 Likes 0 ·
Show more comments