GithubHelp home page GithubHelp logo

phelps-sg / jabm Goto Github PK

View Code? Open in Web Editor NEW
24.0 7.0 10.0 101.31 MB

Java Agent Based Modelling toolkit

Home Page: https://jabm.sourceforge.io/

Java 99.71% HTML 0.29%
agent-based-modeling agent-based-simulation java simulation dependency-injection multi-agent-systems multi-agent-simulation reinforcement-learning evolutionary-algorithms

jabm's Introduction

JABM - Java Agent-Based Modelling toolkit

(C) 2015 Steve Phelps

Overview

JABM is a Java framework for building agent-based simulation models. A simulation model is constructed using dependency injection by creating a Spring beans configuration file which specifies which classes to use in the simulation and the values of any attributes (parameters). The Spring configuration file is specified using the system property jabm.config .

The main application class is DesktopSimulationManager

Prerequisites

JABM requires Java version 6 or later. It has been tested against version 1.6.0_35 and 1.7.0_75.

Note that on Mac OS, you will need to use the Oracle version of Java instead of the default one shipped with the OS.

Installation

The project archive can be imported directly into the Eclipse IDE as an existing project. Alternatively, you can import the project into almost any Java IDE by importing the maven project file pom.xml.

In order to add jabm as a dependency to a Maven project, configure the following repository:

<repositories>
	<repository>
		<id>jabm.sourceforge.net</id>
		<url>http://jabm.sourceforge.net/mvn-repo/jabm</url>
	</repository>
</repositories> 

and then configure a dependency on the jabm artifact; for example:

<dependencies>
	<dependency>
		<groupId>net.sourceforge.jabm</groupId>
		<artifactId>jabm</artifactId>
		<version>0.9.1</version>
	</dependency>
</dependencies>

Installation using Gradle

If you use gradle to build your project, you have to include the following snippets in your build.gradle:

dependencies {
   implementation 'net.sourceforge.jabm:jabm:0.9.9'
}

as well as specify the repository as:

repositories {
    mavenCentral()
    maven {
       url = "http://jabm.sourceforge.net/mvn-repo/jabm"
    }
}

Running the examples from the Eclipse IDE

The distribution archive can be imported directly into the Eclipse IDE by using the File/Import menu item. Create a launch configuration in the jabm-examples project with the main class net.sourceforge.jabm.DesktopSimulationManager and specify which configuration file you want to use by setting the system property jabm.config using the JVM argument -D , for example

-Djabm.config=config/elfarolbar.xml

Documentation

jabm's People

Contributors

phelps-sg avatar zauster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jabm's Issues

Switch classes in experiment.properties

Hey,
i have an agent with a certain strategy. There are two possible implementations of this strategy. I wondered if it's possible to define an experiment.properties file that can then switch the implementation for me, without me manually commenting and uncommenting the respective beans in the model.xml file.

I tried something like:

strategyBean.class = abm.strategies.Strategy1:abm.strategies.Strategy2

where the strategyBean in defined in the model.xml.

But that doesn't work; I encountered a IllegalArgumentException:

Exception in thread "main" java.lang.IllegalArgumentException: householdsConsumptionStrategy.class
	at net.sourceforge.jabm.VariableBindingsIterator.getType(VariableBindingsIterator.java:113)
	at net.sourceforge.jabm.VariableBindingsIterator.parseVarFile(VariableBindingsIterator.java:88)
	at net.sourceforge.jabm.VariableBindingsIterator.<init>(VariableBindingsIterator.java:63)
	at net.sourceforge.jabm.SimulationManager.setup(SimulationManager.java:201)
	at net.sourceforge.jabm.SimulationManager.run(SimulationManager.java:130)
	at net.sourceforge.jabm.SimulationManager.main(SimulationManager.java:219)
	at benchmark.Main.main(Main.java:24)

Do you know of a way to get that to work?

License?

Would it be possible to put a specific license on the project?

Thanks!

0.9.3 project imported into Eclipse yields many errors

Hi,

I've tried importing the 0.9.3 zip project into Eclipse as suggested on the Sourceforge page, but with little luck. Both Eclipse 3.8 (Juno) on Linux and 4.6 (Neon) on OSX present many "X cannot be resolved to a type" errors all over the code. Based on a brief examination it appears that the pom.xml file might be mis-specified, and thereby the various dependencies aren't handled properly.

I was wondering if someone with better knowledge of the code could possibly try to reproduce this behavior, and perhaps suggest a solution?

For what it's worth, I was able to import the 0.8_01 zip project successfully into Eclipse, as suggested by the lab exercise sheet found here. However, I'd like to work with the latest version of the code if possible.

In addition, it seems the latest 0.9.3 updates are not on github yet, will that change?

Thanks!

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.