0
votes

I have to create a model where I have different ships that arrive in the oil terminal.

For example, ships arrive every 11 hours +- 7 with a 60% chance being size A, 25% being size B and 15% being size C.

I am a begginner on anylogic, so this might be a basic question. I have tried to use a source that generates a boat every 11+- 7 hours but then I don't know how to force the source to generates boats of differents sizes at that rate. I thought about using parameters, but I couldn't figure how to do that and I am still wondering if that would work in the model since the ship size has to affect loading operation times.

1
Show us what you've tried so far - Tim Gerhard

1 Answers

0
votes

You must use agents to do this:

  1. Create an Agent Type called Ship
  2. Create a variable in your ship called size
  3. In the source, in the action "on at exit" you can do the following:

    agent.size=uniform()<0.6 ? sizeA : (uniform()<0.625 ? sizeB : sizeC) )

I know it's weird to see this 0.625, but it's the number that you get 0.25/(0.25+0.15)

This is equivalent to an "if statement", check more info here: http://www.cafeaulait.org/course/week2/43.html