Hi Harry.
Is there a way to limit the contents of a Container?
For example on a bus route, if the bus is full (Container) I want it to renege and go to the next stop (RemoveFrom and AddTo) and so on until enough people have disembarked and it can take on passengers again.
Something like:-
RenegeCondition this.QueuePosition==1||this.obj.Count>25
Can it be done using a Threshold to control whether the AddTo adds any more to the container or not?
Thanks
Mike H
Hi Harry.
Been thinking about what you said.
"If I have this right" then:-
Anything that makes expressions simpler is good, but that comes with a price, and I was not really aware of the consequences until I decided to control the Removefrom with a distribution.
As it is at the present if you try to unpack zero entities we get an error message that the NumberOfEntities has to be 1 or more. I tried it when I set up the discrete distribution for the RemoveFrom's.
You have to unpack at least 1 object so there is no change there.
The only way around that is to have an automatic renege condition if the distribution returns a zero for the Number of Entities for an unpack so that the container goes to the NextForContainers?
The rest of the model is working fine, I see nothing wrong with it, it allows buses to pass each other by when a stop is occupied, and it limits the passengers boarding to the capacity of the bus. Brilliant.
Now, all I need to do is decide what I will do with it.
I saw a post about Optimisation, not sure if this is what you meant, but here goes.
3 buses capacity 50
4 buses capacity 40
5 buses capacity 30
Against
Average waiting time at the queues and overall average waiting time.
Which is the best solution depending on whether you are trying to optimise the operating cost of the busses or the passenger waiting time at the queues. Each must have a cost, wait too long and you get in the car or other transport.
Somewhere in between possibly is a compromise, it might well be the middle option, or not depending upon the cost of operating each scenario.
I am not a bus operator so I do not really know how they balance these variables, I do know they look at reliability of the bus timetable, these days they have trackers to track the buses, but that's another ball game.
I am looking for a problem for my students to solve, but I do not want to make it too complicated, at least the first time around, if this works I can add to it.
I knew this was not a simple problem.
By the way, Trolley Buses. I remember them as a kid in the early to mid 60's, lost of sparks flying on a cold November night, especially if it was damp or even foggy.
Mike H