Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

The variable Agent group

33 views
Skip to first unread message

huang lucky

unread,
Nov 18, 2024, 11:21:24 AM11/18/24
to netlogo-users
Hello,
Experts, I am using Netlogo  for a few weeks, and I am facing a problem which confuse me for days.
I have 2 agent groups:KOL and Consumer, they both have Know variable ,  I want to set the "(Know-kol - Know-consumer) > 0" as a judgment statement,but it is not allowed  to use the variable of another agent group likes Know-consumer in the text of"ask kols",I have tried to use global variable compare to save the variable of consumer for avoid this problem,but it fails,so I'm here to seek advice from you experts,sincerely.
Thanks for your help if you have any suggestions!

The error message is as follows
Breed KOLS does not own variable KNOW-CONSUMER
error while kol 7 running KNOW-CONSUMER
  called by (anonymous command: [ ifelse Know-kol - Know-consumer > 0
微信图片_20241117151232.png

Jacob Kelter

unread,
Nov 18, 2024, 4:26:07 PM11/18/24
to huang lucky, netlogo-users
Based on your code it looks like you should be able to just do know-kol - compare, because compare is a list of know-consumer values. 

--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/netlogo-users/b83d9f84-2384-4c2d-8836-882df721f79dn%40googlegroups.com.


--

Reply all
Reply to author
Forward
0 new messages