Comments (4)
If you just want to re-import the tutorial model, you could delete what you have in your workspace and re-import it. If you need to download the sample models again, here's the link for those.
To better understand the error's cause, you'd need to post, e.g., the ContextBuilder you've created.
from repast.simphony.
Hi,
Thanks for the link I will look into the examples and compare them with what I've written. Here is the jzombies context builder I wrote that is throwing the errors mentioned above:
package jzombies;
import repast.simphony.context.Context;
import repast.simphony.context.space.continuous.ContinuousSpaceFactory;
import repast.simphony.context.space.continuous.ContinuousSpaceFactoryFinder;
import repast.simphony.context.space.grid.GridFactory;
import repast.simphony.context.space.grid.GridFactoryFinder;
import repast.simphony.dataLoader.ContextBuilder;
import repast.simphony.random.RandomHelper;
import repast.simphony.space.continuous.ContinuousSpace;
import repast.simphony.space.continuous.NdPoint;
import repast.simphony.space.continuous.RandomCartesianAdder;
import repast.simphony.space.grid.Grid;
import repast.simphony.space.grid.GridBuilderParameters;
import repast.simphony.space.grid.SimpleGridAdder;
import repast.simphony.space.grid.WrapAroundBorders;
public class JZombiesBuilder implements ContextBuilder {
@Override
public Context build(Context<Object> context) {
context.setId("jzombies");
ContinuousSpaceFactory spaceFactory =
ContinuousSpaceFactoryFinder.createContinuousSpaceFactory(null);
ContinuousSpace<Object> space =
spaceFactory.createContinuousSpace("space", context,
new RandomCartesianAdder<Object>(),
new repast.simphony.space.continuous.WrapAroundBorders(),
50, 50);
GridFactory gridFactory = GridFactoryFinder.createGridFactory(null);
Grid<Object> grid = gridFactory.createGrid("grid", context,
new GridBuilderParameters<Object>(new WrapAroundBorders(),
new SimpleGridAdder<Object>(),
true, 50, 50));
int zombieCount = 5;
for(int i = 0; i<zombieCount;i++) {
context.add(new Zombie(space, grid));
}
int humanCount = 100;
for (int i = 0; i < humanCount; i++) {
int energy = RandomHelper.nextIntFromTo(4, 10);
context.add(new Human(space, grid, energy));
}
for(Object obj:context) {
NdPoint pt = space.getLocation(obj);
grid.moveTo(obj, (int)pt.getX(), (int)pt.getY());
}
return context;
}
}
from repast.simphony.
I tested out the JZombies_Demo model and it worked out fine, the issue I have seems to be because of the DataLoader.. the builders aren't appearing as options when I choose set data loaders even in the JZombies_Demo model.
The error I get is after choosing context.xml as the data source type and it appears that way even with the JZombies_Demo model if chose context.xml when setting my data loader.. could this be due to the illegal reflective access warning?
Thanks for your help.
from repast.simphony.
Ah nevermind, I found myerror, I was setting context.xml when I should have used custom context builder.
from repast.simphony.
Related Issues (20)
- Project updater improvements
- Describe update from Amount to Quantity in FAQ
- Quantity agent property probe doesnt work
- Document setting tick units
- Document GeoTools library updates to user model.
- Update xstream HOT 1
- Javadoc/Groovydoc generation HOT 2
- Fatal exception with malformed MessageCenter.log4j.properties file HOT 2
- Java Units API fix
- Java 17 JVM Arguments for Batch Mode Runs HOT 7
- JSchException: Algorithm negotiation fail HOT 3
- Fix getPublicFieldsAndProperties in BaseObserver with Java 17 HOT 5
- ICU4J deprecated HOT 5
- Create example with loading agents from CSV in a demo + documentation HOT 3
- Batch VM Arguments
- Groovy libs update to latest
- Update GeoTools (requires JDK 11+)
- Put the developer environment info from Trello into the project README
- how to use GeoJSON which maybe is a provice of China to show a display in repast simphony HOT 2
- Batch Runner Can't Find Groovy HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repast.simphony.