Is there a way to have two consecutive assign blocks that assign information to an entity based on what the first block is? When I try this I first get an error that my entity does not have the second attribute then if I try to add a second attribute after my first it errors again saying "Expected an input with 2 or 3 value(s), received SO 00 dm 0. Value will be cleared"
I want to give my product code (Either a string or a 2 digit number that does not increase in simple sequence 00 01 02 03 05 09 14 15.. 73). Based on this product code I want to give it a subcode (4 possibilities - each product has a different ratio) then based on that subcode give the entity a length from a distribution.
Let me know what options I have or examples if this is possible.
Thanks,
Chris
Thanks for the quick response. Right now I cannot post the test file I am using - (I'm guessing I need to be a member of the group?). I have two back to back assign blocks the first being:
{ this.obj.Prod=[GoodsDistribution].Value }
This distribution has values 0 1 2 3 5 and probabilities .5, .2, .15, .1, .05
What does the assign expression for an attribute named "Type" have to be such that each of those specific values of "Prod" could have their own new set of values? What about a range, continuous & discontinuous?
So lets say:
0 will need its own group of values {20 , 26 , 32}
1 and 5 will share a group of values {26, 32}
2-3 will share a new group of values {6, 32}
In other words:
If Prod.Value = 0 Then Type=DiscreteDistribution(20[.2],26[.1],32[.7])
Would it be easier to do that by first doing a discrete distribution on the Type then based on the type it got assign it a random discrete product code?
*Can these distributions be changed based on needs later in the model while it is running? (Override)
The next steps are:
Assign an average length to each type of each product (Will need to know both). This Length is for both the processing time through a number of servers and the number of units it produces.
Determine the Type so that a duplicate block can determine how many to make
Hopefully what I am asking makes sense. Basically I need to know how to assign a specific value based on another specific value.
Thanks,
Chris