which packages, libraries I can use?

This is the place for queries that don't fit in any of the other categories.

which packages, libraries I can use?

Postby leen » Wed Apr 02, 2014 10:49 am

Hi,

I want to implement something like the following and I do not know what packages can I use:
say I have five houses
for each house, I will send and agent who will test the condition of a part of the house and he can record one of three states for this part condition, where the conditions can be one of the following: {good, bad, unchecked}
If an agent record something I want the other agents know about the decision so they can make their own decision, for example: if agent decide that part 1 in house no.1 is in a good condition, I want this to be checked first ... etc.
- can you please help me with the packages, libraries that I can make use of since I am new to python.
- is this is an agent based modelling ?
- do I need to build the required model from the scratch or their an existing code and work that I can make use of?
Last edited by Mekire on Wed Apr 02, 2014 12:06 pm, edited 1 time in total.
Reason: First post lock.
leen
 
Posts: 2
Joined: Wed Apr 02, 2014 10:40 am

Re: which packages, libraries I can use?

Postby rrashkin » Wed Apr 02, 2014 3:49 pm

It sounds to me like a simple matrix (or list of lists in Python-speak). Five houses, five parts, each starts of with value, "not inspected":
Code: Select all
>>> a=[["not inspected" for i in range(5)] for j in range(5)]
>>> a
[['not inspected', 'not inspected', 'not inspected', 'not inspected', 'not inspected'], ['not inspected', 'not inspected', 'not inspected', 'not inspected', 'not inspected'], ['not inspected', 'not inspected', 'not inspected', 'not inspected', 'not inspected'], ['not inspected', 'not inspected', 'not inspected', 'not inspected', 'not inspected'], ['not inspected', 'not inspected', 'not inspected', 'not inspected', 'not inspected']]

House-i, part-j =a[i][j] = 1 (true, passed inspection) or 0 (false, failed inspection)
___________________
Bob Rashkin
User avatar
rrashkin
 
Posts: 35
Joined: Tue Feb 12, 2013 4:47 pm

Re: which packages, libraries I can use?

Postby Marbelous » Wed Apr 02, 2014 4:43 pm

I was going to say the same thing. You don't need advanced ABM modules to do this unless it's actually your goal to learn about ABM. Have you gone through the basic python tutorial that comes with python? It's quick and will give you a good foundation. Even if you find the perfect module for your needs you will still have to write some code to use the tools provided so the more python you know the easier it will be. ;)

FYI, also being discussed here:
http://www.dreamincode.net/forums/topic ... try1992629
Marbelous
 
Posts: 116
Joined: Fri May 31, 2013 8:12 pm

Re: which packages, libraries I can use?

Postby leen » Wed Apr 02, 2014 6:10 pm

Hi, thanks for your reply
but the problem is that I want all of the agents start working at the same time and, in any time, when a condition have been recorded I want one of the agents to go to check the house which one of its parts condition have been recorded as good.
I already program in python but still working with the basics.
leen
 
Posts: 2
Joined: Wed Apr 02, 2014 10:40 am

Re: which packages, libraries I can use?

Postby Marbelous » Wed Apr 02, 2014 9:47 pm

I would look into the pyABM module I linked over at your DIC thread. I don't know if it's appropriate since I've never worked with ABM but it looks promising.
Marbelous
 
Posts: 116
Joined: Fri May 31, 2013 8:12 pm

Re: which packages, libraries I can use?

Postby Kebap » Thu Apr 03, 2014 11:42 am

Please be aware that cross-posting questions is mostly frowned upon which tends to yield less answers rather than more. :roll:
Learn: How To Ask Questions The Smart Way
Join the #python-forum IRC channel on irc.freenode.net and chat with uns directly!
Kebap
 
Posts: 380
Joined: Thu Apr 04, 2013 1:17 pm
Location: Germany, Europe


Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 1 guest