March 02, 2006

Finishing

1. Test it
2. Fix closed lanes. Act strange on reset.

March 01, 2006

Final Done.

If anyone fancies having a go with it and sending any comments i would be grateful. Cheers

link

Unzip and run java Engine or use the batch file


February 28, 2006

TO DO:

2 days:

1. Develop the graph (re add back in vehicles/sec? Wasnt that useful). Add output.

2. Develop Aggression

  • +-10% speed
  • +-10% headway
  • +-10% accel/dcel

3. Add crashes. Not sure what to do here. Will either have a billion crashes or none?!

4. If have time, add offramps. Although not sure how usefull to show traffic?

5. Tidal flow for on-ramps?

6. Presentation.


February 21, 2006

Linux is SHIT

To Fix:

Cannot change ents properties when sim is NOT running

Java messes up loading of blocked lanes

Lane closed panels needs updating when opened


February 18, 2006

Nearly Done

To Do:

Output from graph (csv?)
OffRamps
Standing Traffic (could leave out, not sure would be that useful)
Sort out simulation start/stop so can change ents whilst running, but not add/remove
Touch up dialogs

Problems I have had:

The backend is annoying, should have made addNext() addBack() etc incorporate adding the vehicle to the other itsself. Save on errors

Some issues with the backend, cars would drive over each other. Found to be beacuse i was using floats not doubles.

Issues with closed lanes – inserting elemetns into a linked list randomly was nasty!


February 02, 2006

Finished Backend

Ok finished backend is but still need to do:

MOBILE (lane changing)
Tweak to

  • keep to left
  • lorries not to use outside lane
  • appreciate pushy drivers (to move out the way)
  • onramps

Frontend:

Dialogs

Control

  • "build mode"
  • Start/Stop
  • Reset/Scale/Move etc

Output

  • Graph of system (Current & AVG)
  • save-to-file?

Settings

  • Vehicle – aggression, politeness, headway, spawn timing etc.


January 28, 2006

Now then

OK got as far as basic AI to drive forwards and not crash into cars infront.

Problems so far:

Lane changing

Complicated to move vehicles from one lane to another in the linkedlists (threads + itterators = evil). Now just realised that i get problems when cars change into a lane with no cars behind them, or into a lane with no cars infrot of them, i.e. can only move if between two cars. Great.


January 08, 2006

After Xmas Update

Finally got around to coding now, heres the final hirachy:

Main program divided into 3 subsections:
GUI (main gui and action handlers)
Engine (main runfile, manages everything)
Entities

The Entities are related by:

JEntity (basic knowldge of position/lane, abstract methods for tick/draw)
|.......................|
JVehicle Other Ents (Divided into general/info markers/static road etc).
|

Car/Van/Truck

All ents must
Tick() – called by engine to upadate ent
Draw() – called by GUI to engine to ent to draw the object (if drawn).

——————————————————————————————————————————————————-

Development so far:

  • Basic GUI to display vehicles
  • Basic vehicle place holder ents which just move forwards
  • Entities such as
  • Info ents – placeholders in place, a class to pass information from them to the ents has been created
    1. Road ents – a 'peice' of road for the cars to drive down. Each 800 units long. Divided into 4 200 unit subsections where ents can be placed. Onramp placeholder made. Handles kill car ents
    2. Spawns for cars (needs work to add variation)
    3. Kill Car entities

    Logic so far:

    1. Engine timer called. Loop through all entities in list and Tick(). Loop through all Vehicles and Tick().
    2. Entities Tick() – do what is needed. May be generate a new Vehicle etc (or nothing)
    3. Vehicles Tick() – first check where we are. If we have entered a new 200 unit subsection then check if there are any new info ents to know about (speed limits/headway markers etc). Then we call Move(). If we find a CarKill then tell the engine we have.
    4. Engine – see how many cars have to be Killed. Pop from appropriate ques.
    5. Engine Draw Timer. Loop through all ents and vehicles and call Draw().

    Problems:

    How to Manage entities within the engine
    When a new entity is created, the constructor within JEntity adds it to the engines know entities. Cars are added to a queue (there are three queues, one for each lane, when a kill signal comes it pops the queue). Entities are added to a linked list, organised by position. NEED WORK If an entity is moved its position in list needs updating! Change list to an array and just search? Speed if each car keeps searching?

    Drawing Ents
    Needed to add a second timer to call Draw() seperatly or else when moving/resizing window timing dies.

    What to do now

    1. Add ability to add entities by clicking on GUI. Shouldnt be too hard (current structure makes it v. easy to add ents, just need basic code and dias to manage ents)
    2. Physics
    3. Develop Road Entity to auto generate entities
    4. Develop car spawns – need to ability to increase/decrase flow over time
    5. Ramps?!

    November 27, 2005

    Physics For Model

    link

    September 2023

    Mo Tu We Th Fr Sa Su
    Aug |  Today  |
                1 2 3
    4 5 6 7 8 9 10
    11 12 13 14 15 16 17
    18 19 20 21 22 23 24
    25 26 27 28 29 30   

    Search this blog

    Most recent comments

    • You might want to add which class has the main method in it, or compile it as a jar file, otherwise … by Matthew Jones on this entry
    • Ok, it's actually one. If it's not the same as the one at home then you need to make sure they match… by on this entry
    • That's two hyphens. by on this entry
    • java version by on this entry
    • worked at home on windows by on this entry

    Blog archive

    Loading…
    RSS2.0 Atom
    Not signed in
    Sign in

    Powered by BlogBuilder
    © MMXXIII