Print

Print


Dear List,

I have created a world by importing some GIS vector files, and now I
am trying to add some agent randomly placed on this world.

I have followed the CampusWorldWithUI example to load the shape files,
but now I'd like to just add some agents - they won't move during the
simulation. I am wondering how to change the code in the example to
obtain my goal. In my Agent class, I am trying:

private void assignPosition(DiffCeram state) {
        pointMoveTo.setCoordinate(new
Coordinate(state.random.nextInt(100), state.random.nextInt(100)));
        location.getGeometry().apply(pointMoveTo);
        getGeometry().geometry.geometryChanged();
    }

but agents are not displayed. I am afraid that there could be
something I am missing between the coordinate I am giving and the
coordinate of the world...

Any hint will be very much appreciated.

Best regards,
Simone

-- 
-----------------------------------------------------------------

Simone Gabbriellini, PhD

Post-doctoral Researcher
ANR founded research project "DIFFCERAM"
GEMASS, CNRS & Paris-Sorbonne.

mobile: +39 340 39 75 626
email: [log in to unmask]