On Thursday, December 17, 2015 at 2:21:37 AM UTC-6, s wrote:
>
> I am trying to startup a NetLogo model from Clojure. I can achieve this 
> using "headless workspace" based on the example provided at 
> https://github.com/NetLogo/NetLogo/wiki/Controlling-API but I want to 
> open a model with its UI.
>

Cool.

Maybe this isn't relevant to your situation, but in case you're interested, 
I've had success using Clojure from NetLogo using the extension interface.

netlogo-clojure <https://github.com/mars0i/netlogo-clojure> is a NetLogo 
extension that allows evaluating strings containing Clojure code, returning 
values as strings in NetLogo.  I don't think that's very useful, in 
practice, but it works.

What I think is more useful is to set up a custom interface for a specific 
purpose, using data types other than strings.  This 
<https://github.com/mars0i/bali/tree/pop1/src/extensions/popco> is a 
NetLogo extension (a work in progress) that I'm using to connect a NetLogo 
model to a simulation in Clojure 
<https://github.com/mars0i/popco2/blob/master/src/sims/bali/netlogo.clj>.  
It turns out that once the extension is set up correctly, it's relatively 
easy to convert data types in some cases.  I found that it was easy to pass 
a hashtable from the NetLogo table extension and convert it to a map in 
Clojure, and to return a Clojure sequence and then convert it to a NetLogo 
list in Java.

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to