artificiall, agent, movement

2008-05-12 Thread Iman
hi
i'm working on some simulation project . i'm going to simulate traffic
of a city.
this simulation has cars , passengers , non-movable objects and
Traffic signals  .
i've made cars as intelligent agent . it has thinking method ,
changing states agents ...
the main problem is i have problem to move my agents in world .
it would be possible to add some method to agent which move  agent in
random  destination .
but i'm trying to find some patterns which is designed  for this
problems .
is there any sample source code in python or links, docs to help me ?
 thanks for your attention .
--
http://mail.python.org/mailman/listinfo/python-list


Re: artificiall, agent, movement

2008-05-12 Thread Iman
On May 12, 4:50 pm, Gerry <[EMAIL PROTECTED]> wrote:
> Many city travel surveys collect source destination trip-start data;
> you might be able to find one of these studies.
>
> I think each car in your simulation should have a destination.  Then
> the simulation needs a route-finder, and cars can progress along their
> routes as traffic permits -- or even change routes if traffic seems
> too slow.

yes, we should have destinations for cars. but my goal is my
agents(cars) can recognize non-movable objects ( for example ) so
change it's path or stop when light is red.
i can add lots of if-then-else in my code to action in these
situations but thought maybe there are some patterns or books which is
talking about these topics...

>
> I think if you start with a very small city -- perhaps just a 5 by 5
> grid, and generate sources and destinations at intersections randomly
> along the perimeter, you'll have enough to prototype all of the
> building blocks.

>
> Gerry
>
> On May 12, 6:37 am, Iman <[EMAIL PROTECTED]> wrote:
>
> > hi
> > i'm working on some simulation project . i'm going to simulate traffic
> > of a city.
> > this simulation has cars , passengers , non-movable objects and
> > Traffic signals  .
> > i've made cars as intelligentagent. it has thinking method ,
> > changing states agents ...
> > the main problem is i have problem to move my agents in world .
> > it would be possible to add some method toagentwhich move  agentin
> > random  destination .
> > but i'm trying to find some patterns which is designed  for this
> > problems .
> > is there any sample source code in python or links, docs to help me ?
> >  thanks for your attention .

--
http://mail.python.org/mailman/listinfo/python-list


please help

2013-05-21 Thread iman . memarpour
WAP in python to accept a list of words on STDIN and searches for a line 
containing all five vowels(a,e,i,o,u)
-- 
http://mail.python.org/mailman/listinfo/python-list


FrontPage COM Object Model

2006-08-17 Thread iman gowhari
I want to get frontpage web and page object models with this code.
OnPageNew works properly but when I click on the page nothing happen.

from win32com.client import DispatchWithEvents
import time, pythoncom, msvcrt

class FrontPageEvents:
def __init__(self):
print 'FrontPageEvents'
def OnPageNew(self, page):
DispatchWithEvents(f.ActiveDocument, PageEvents)

class PageEvents:
def __init__(self):
print 'PageEvents'
def onclick(self):
print 'onclick'

f=DispatchWithEvents("FrontPage.Application", FrontPageEvents)
while not msvcrt.kbhit():
pythoncom.PumpWaitingMessages()
time.sleep(.2)
msvcrt.getch()

-- 
http://mail.python.org/mailman/listinfo/python-list