"port by case" operation does not fit on the screen

"port by case" operation does not fit on the screen

__ANON_USER__1
Not applicable
18 Views
1 Reply
Message 1 of 2

"port by case" operation does not fit on the screen

__ANON_USER__1
Not applicable

[ FlexSim 19.0.8 ]

What if the "port by case" operation does not fit on the screen?

Is there any way to operate it?

0 Likes
Accepted solutions (1)
19 Views
1 Reply
Reply (1)
Message 2 of 2

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

If you have that many cases I would recommend using a different method. Here are some options:

Use a Table

You could create a table with one row per type and the port to be used by that type. Then you would just look up the value from the table like this:

Table("Ports")[item.Type][1]

Write some if statements

Open the code editor and use if statements to return the right port value.

if (item.Type <= 10)
	return 1;
else if(item.Type > 10 && item.Type <= 20)
	return 2;
else
	return 3;

Use a mathematical function

It's possible the port number can be derived from the item's Type using a mathematical function. For example, if Type 1-10 use port 1, Type 11-20 use 2, and Type 21-30 use 3 you could write this function:

Math.ceil(item.Type / 10)

Here's an example model with 3 routing queues using a different one of the above suggestions.

portsbytable.fsm



Matthew Gillespie
FlexSim Software Developer

0 Likes