Model not running properly if self.attribute is a decimal number

15 views
Skip to first unread message

LaAlice

unread,
Aug 2, 2020, 11:49:39 AM8/2/20
to ProjectMesa
As I want to display percentages, I am setting self.example in my agent class to equal random.uniform(0,10); this is a decimal number. However, if I do this, the model doesn't run properly: The first step seems to get executed, but then it stops. Why is this and how could I repair it?

Jeremy Foote

unread,
Aug 3, 2020, 1:50:38 PM8/3/20
to ProjectMesa
Hi,

Is Python throwing an error when it stops running the model? What is the error?


Jeremy

On Sun, Aug 2, 2020 at 11:49 AM LaAlice <larissa.a...@gmail.com> wrote:
As I want to display percentages, I am setting self.example in my agent class to equal random.uniform(0,10); this is a decimal number. However, if I do this, the model doesn't run properly: The first step seems to get executed, but then it stops. Why is this and how could I repair it?

--
Project repos: github.com/projectmesa
---
You received this message because you are subscribed to the Google Groups "ProjectMesa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectmesa...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectmesa/03f465cd-9841-49cc-81e7-546a234718dco%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages