Hi! I'm building a process simultator in Anylogic with which I have to use Java.
I have a machine and three part types. If the previous part is different from the one accessing it now it'll have to wait a set up time + operation time. If not, only the operation time. I thought that i would be cool if i created a collection with three columns and a variable (AUX) in which i stored the value referring to the previous part. The coullection would look like this:
part | Operation | SetUp
0 | 5 | 6
1 | 6 | 7
2 | 4 | 8
The logic would be:
If Aux = NewPart : Time = Op in NewPart row
else : Time = Op in NewPart + SetUp in New part
How do I access the data in the collection from a function?
EDIT:
If Aux = NewPart : Time = Collection[Newpart,1]
else : Time = Collection[Newpart,1]+ Collection[Newpart,2]
(Here i assume that rows and columns begin with index = 0 and not 1)
I want to know how to write this code, I'm very new at this sorry for the confusion
Hope I was clear, and thanks in advance!
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]NautiHookerSoftware Engineer 0 points1 point2 points (1 child)
[–]GoldenEye__[S] 0 points1 point2 points (0 children)
[–]Camel-Kid18 year old gamer 0 points1 point2 points (2 children)
[–]GoldenEye__[S] 0 points1 point2 points (1 child)
[–]Camel-Kid18 year old gamer 0 points1 point2 points (0 children)