purduedb / LIMO

A web-based programming environment for interactive geographical maps, location-oriented data, and the operations of synthetic objects that move on the maps
2 stars 0 forks source link

Moving commuters between zip codes #27

Open aaron97neu opened 5 years ago

aaron97neu commented 5 years ago

Currently there is no modification of a commuter's zip code (either global ZIP in master/dev branch or zipcode field in commutersAsObject branch). This mean that once a commuter moves into another zip code, calls begin to fail, notably the db queries in geocode_intersection2(), which is used by move_until()

This is especially problematic in areas like downtown Indy where zipcodes are small and irregular, such as 46204, pictured: image

Example of failing code due to zipcode change:

# Program 2: Sequential [Modified]
# This program moves a Commuter from one location to another showing the route traveled.
addressIN = read_address("40 E St Clair St", "Indianapolis", "IN", "46204")
display_marker(addressIN)
start_at("com2", addressIN, "EAST")
move_until("com2", "N Delaware St")
turn_to("com2", "N Delaware St", "right")
move_until("com2", "E Ohio St")
turn_to("com2", "N Capitol Ave")#, "right")
move_distance("com2", 1.5)
turn_to("com2", "W Washington St")
move_until("com2", "N Belmont Ave")

last_location = get_current_point("com2")
display_marker(last_location)
show_on_map("com2")