Miscellaneous > Programming & Networking

what programming language to do this?

<< < (3/4) > >>

piratePenguin:

--- Quote from: Refalm on 12 May 2010, 01:43 ---
--- Quote from: piratePenguin on 11 May 2010, 21:51 ---one problem I'd love to see solved is why, about 30-50% of the time I'm waiting for a bus to the city center, I could be waiting for an average of 10 minutes (up to 20) and then TWO BUSES come - one right up the arse of the other, it baffles me

--- End quote ---
Psychology gets a bit involved. It depends on the personality of the bus driver, when the bus will leave.
A lot of bus drivers in my town leave 5 minutes late, so they can justify driving fast with a bus through town.
The rest actually leave 5 minutes earlier, to adjust for the traffic congestion.

It's certainly an algorithm to take into account.

--- End quote ---
A bus system based off an adaptable model such as what I mentioned will cope with situations where 2 (and more) buses are (currently) traveling the same route by redirecting one bus in such a way that it will help the system pick up the maximum passengers and leave them where they wanna go i.e. most buses should branch off asap and make different stops to collect people for the city, if that's what's deemed optimal. That raises the problem that, in all probability a bus will have someone or some people on it that seriously restricts the changes that can be made to it's route. But in the first case you will try to put people heading a similar way on the one bus.

It would really not be a simple system! And in normal working weeks I'm sure the optimal system is well approximated by a non-real time (i.e. current day) bus system, without the inconvenience. But, to see this system adapt and cater for concerts and all events, route blockages, and whatever else, in an optimal way - every day, it might just be an addition. A LOT of maths would tell you the answer, and I suspect this might work in SOME CITIES. Dublin is a roughly hopelessly planned city (Google "Dublin sprawl"), and I would venture to guess a dynamic system would work better for a city such as this, than more dense and modern cities (as most cities are).

Kintaro:
I have a simpler solution: trains.

Refalm:

--- Quote from: Kintaro on 12 May 2010, 10:02 ---I have a simpler solution: trains.

--- End quote ---
A small city only has a maximum of 4 train stops.

Automated metro rails would be a better idea. However, that doesn't work for rural areas.

Anyway, I know for a fact that ProRail (rail maintenance for the Netherlands and parts of Germany and Belgium) is using Java for their train traffic systems. Busses are a bit more complex when you have to take in account traffic congestion, stops, chauffeur behaviour, closed routes, etc.
Here's an article on Infra Atlas, you can use Google Translate:
http://www.railpedia.nl/display/test/Infra+Atlas

TheQuirk:
I actually saw some recently that explained the two bus problem: http://blogs.discovermagazine.com/cosmicvariance/2010/03/04/buses-are-bosons-and-they-condensate/

Anyway, that sounds like an interesting idea! Are you interested in working on this together? These are my first thoughts:

We could assume a simplified model of a city, represented as a weighted graph (edges would be roads, vertexes would be stops). The weights could be passenger demand (issues of "demand to visit B depends on picking up passengers at A" would have to be worked out), maybe travel time.

Set some probability distribution for number of passengers at each time as a function of time.

Look for near-optimal paths on this graph as time evolves

Record average time/passenger

Run this program many times and bin the data into a histogram.

The same could be done with standard schedules. Then we could see if there are great improvements.

piratePenguin:

--- Quote from: TheQuirk on 19 May 2010, 10:45 ---I actually saw some recently that explained the two bus problem: http://blogs.discovermagazine.com/cosmicvariance/2010/03/04/buses-are-bosons-and-they-condensate/
--- End quote ---
Interesting :)

I sure would be interested in working on this together. I finish my exams on Saturday week and after I settle down a few days later, it'll be summer. And one thing I wanna do this summer is further my maths/programming in a useful way (was and am planning to study video compression, or the maths behind something interesting like that).

So yeah, we can both tackle this problem if you're interested. Sounds like a good plan to get started, but you've got years of experience on me, I'm sure it's peanuts for you but I'd have a lot to study! What topics should I start at for this problem?

Model will be very interesting, as the "bus bunching" problem will be minimised, but I wonder will it still be prevelent. That's the big question.

btw I'm finishing second year studying actuary, I've done big amounts of linear algebra, analysis, and probability, introductary differential equations (seems like I'll need that), basic complex analysis, and a fair amount of mathematical stats. Haven't even seen much of this in practice, hence my anticipation. Will graph theory be useful? I know nothing about that at all.

Anyways, it'd be good to work at this with someone who knows what to do, surely! If it's of interest to you to start building something during the next two weeks, go ahead and I'll jump in later. The real problem is determining the conditions that affect the system positively and negatively, testing it under unusual (but realistic) circumstances, and then drawing our conclusions. A model to play with would be a big step.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version