Giter Site home page Giter Site logo

netlogo.jl's Introduction

NetLogo.jl

This package is meant to allow controlling NetLogo from Julia.

Warning: This is very much a work in progress and almost comically raw. It's also been on the backburner for a little while. Still, issues and pull requests are most welcome. If there is interest in the community, we might turn this into something useful...

Installation

This package is not registered, but you can still install it at the Julia prompt by running:

Pkg.clone("[email protected]:nicolaspayette/NetLogo.jl.git")

It requires Julia 0.6.x.

TODO

The first goal should be, for now, feature parity with RNetLogo, the NetLogo Mathematica link, and pyNetLogo, with the limitation that, at first, only 2d headless workspaces will be supported (i.e., no GUI, no 3d).

Except for raw types, the general strategy should be to provide interfaces to objects still living on the JVM rather than make copies. This should save memory and, in the case of mutable entities (i.e., agents), allow changes on the NetLogo side to show up in Julia.

This means that, among other things, we should:

  • expose NetLogo agents as Julia data structures.

    At the moment, we have implemented the "iterable" and "indexable" interfaces, but it might be worth considering turning NetLogo agents into Julia associative collections.

  • expose NetLogo lists and agentsets as proper Julia iterables.

  • expose NetLogo agentsets as Julia IterableTables.

  • expose NetLogo patches agentset as a Julia matrix.

  • and maybe expose NetLogo networks of links and agents through a Julia graph library.

As a long term goal, exposing most of org.nlogo.api would make sense. JavaCall.jl being fairly low level, a lot of scaffolding would be required to make this easy to use.

netlogo.jl's People

Contributors

nicolaspayette avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

netlogo.jl's Issues

Segfault problem in `NetLogo.init`

I was asked to install JRE legacy code on my Mac. I did it.
But I had to change one line of your code (NetLogo.init) because the folder containing NetLogo has a different path and I got an error. Please see what is the mistake I did:

Main> using NetLogo
Loaded /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/server/libjvm.dylib

Main> NetLogo.init("/Applications/Netlogo 6.0.4/Netlogo 6.0.4.app")

signal (11): Segmentation fault: 11
while loading no file, in expression starting on line 0
unknown function (ip: 0x11dad72b3)
Allocations: 4188932 (Pool: 4187476; Big: 1456); GC: 7

How to add Netlogo.jl package?

I want to run demo.jl but first it is necessary to Pkg.add("NetLogo.jl"). How can it be done since NetLogo.jl is not registered.

Error with dirname and LOAD_PATH

When I run the first line of code (I am using vscodeeditor):
dirname(@__FILE__) โˆ‰ LOAD_PATH && push!(LOAD_PATH, dirname(@__FILE__))

I get the following error:

ERROR: MethodError: no method matching dirname(::Void)
Closest candidates are:
  dirname(::AbstractString) at path.jl:146
Stacktrace:
 [1] eval(::Module, ::Any) at ./boot.jl:235

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.