Creating an unsorted list of agent properties

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating an unsorted list of agent properties

edekemp
I need to do some spatial Eigen analysis from vectors. These will be mostly matrix operations. Unless there is a way to do some Eigen function directly on my agentset properties (n1 n2 n3), I will need to load the unordered agentset properties into a list and then into a matrix with nrows = count agentset.

I will be using the matrix extension with matrix:eigenvectors matrix to get the eigenvectors from the columns.

Any ideas will be greatly appreciated!

Eric
edekemp
Geoscientist GSC
Reply | Threaded
Open this post in threaded view
|

Re: Creating an unsorted list of agent properties

NetLogo-Users mailing list
Here's one approach that will give you the properties of the agents in random order.  let mat-list [(list n1 n2 n3)] of turtles

  let mat matrix:from-row-list mat-list

 You can then use matrix:eigenvectors mat.
 

 HTH
 Charles

 

Reply | Threaded
Open this post in threaded view
|

Re: Creating an unsorted list of agent properties

edekemp
Thanks Charles,

Wonderful that works fine!

EdK
edekemp
Geoscientist GSC
Reply | Threaded
Open this post in threaded view
|

Re: Creating an unsorted list of agent properties

edekemp
In reply to this post by NetLogo-Users mailing list
Charles,

Sorry I spoke too soon. I need n1 n2 n3 properties to be literal values?


Eric
edekemp
Geoscientist GSC
Reply | Threaded
Open this post in threaded view
|

Re: Creating an unsorted list of agent properties

edekemp
In reply to this post by NetLogo-Users mailing list
Charles,

You had it right I was trying to do it within an ask which needs the properties to be literal if used to load a list.

; Does not work needs litral vlaues
;ask data with [dtype = 5 ] [let dataNlist [(list n1 n2 n3)]]

; Also does not work ...
ask data with [dtype = 5 ] [let dataNlist [(list n1 of myself n2 of myself n3 of myself)]]


This does work !
let dataNlist [(list n1 n2 n3)] of data with [dtype = 5 ]  


Thanks again,

Eric
edekemp
Geoscientist GSC
Reply | Threaded
Open this post in threaded view
|

Re: Creating an unsorted list of agent properties

NetLogo-Users mailing list
They just keep coming...

On 8 Aug 2017, at 20:11, edekemp [hidden email]<mailto:[hidden email]> [netlogo-users] <[hidden email]<mailto:[hidden email]>> wrote:



Charles,

You had it right I was trying to do it within an ask which needs the
properties to be literal if used to load a list.

; Does not work needs litral vlaues
;ask data with [dtype = 5 ] [let dataNlist [(list n1 n2 n3)]]

; Also does not work ...
ask data with [dtype = 5 ] [let dataNlist [(list n1 of myself n2 of myself
n3 of myself)]]

This does work !
let dataNlist [(list n1 n2 n3)] of data with [dtype = 5 ]

Thanks again,

Eric

-----
edekemp
Geoscientist GSC
--
View this message in context: http://netlogo-users.18673.x6.nabble.com/Creating-an-unsorted-list-of-agent-properties-tp5006562p5006567.html
Sent from the NetLogo-Users mailing list archive at Nabble.com<http://nabble.com>.





[2CV Logo]<http://www.2cv.com>


VINCENT NOLAN
Global Executive Chairman
12 Flitcroft Street London  WC2H 8DL

Phone:   +44 20 7655 9900
Mobile:          +44 7785 978 860

www.2cv.com<http://www.2cv.com>






[MRS Awards 2016 - Winner - Best Innovation]<http://www.2cv.com/what-we-think/2016/12/girl-effect,-2cv-and-maido-win-the-2016-mrs-best-innovation-award.aspx>




This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments.  2CV Ltd is a company registered in England and Wales. Company Number 319 5457. Registered Office 12 Flitcroft Street, London, WC2H 8DL.