Percentages in order

Percentages in order

alistair.loweET3GP
Participant Participant
153 Views
4 Replies
Message 1 of 5

Percentages in order

alistair.loweET3GP
Participant
Participant

[ FlexSim 25.1.1 ]

How do i set the 15% to be assigned first?


1745239372304.png

0 Likes
Accepted solutions (1)
154 Views
4 Replies
Replies (4)
Message 2 of 5

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

I'm not sure I understand what you're asking. It's only going to assign one of those two values. There's a 15% chance it assigns the value "Seed" and an 85% chance it assigns the value "Serial".



Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 3 of 5

alistair.loweET3GP
Participant
Participant
I am trying to get the first 15% to be Seed and then the rest to be Serial.


0 Likes
Message 4 of 5

Matthew_Gillespie
Autodesk
Autodesk

Then the By Percentage pickoption isn't going to be useful to you. The question is 15% of what?


The simplest way is probably to set this up in an arrivals table. Like if you have 100 items arriving make 2 entries. One with 15 items that get the Seed label and another with 85 items that get the Serial label.


Alternatively you could write a code snippet that keeps track of how many items have arrived and if the number goes above your 15% number then you switch. Something like:

string labelValue = "Seed";
if (current.NumArrivals > 15)
    labelValue = "Serial";
    
item.Type = labelValue;
current.NumArrivals++;

I've attached a sample model with these two approaches.

PercentArrivals.fsm



Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 5 of 5

alistair.loweET3GP
Participant
Participant

Thanks for the help.

0 Likes