Request for NetLogo

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Request for NetLogo

yujeong
 Hello. I am a student of Kyunghee University in South Korea.

Recently, I am interested in evacuation simulation which is based on agent
based model such as NetLogo.

I would like to model the evacuation of people and vehicles in case of a
power plant accident on the coast.

So I am studying NetLogo program, and I need to extend the GIS to create an
evacuation model.

This is because I would like to bring the geographical data (buildings,
roads, mountains, sea, vehicles, etc.) of this area to the interface of
NetLogo program.

The manual contents are as follows;

*The extension supports vector data in the form of ESRI shapefiles. The
shapefile (.shp) format is the most common format for storing and
exchanging vector GIS data.*

I understood that each geographical information is set as layer and
converted into shapefile format.

But I did not really understand how to do.

I would like to solve this problem.  *Could I get a more detailed,
step-by-step example?*

Also, can I use ArcGIS Pro in ESRI to extend GIS?

I appreciate any feedback you may have.

Thank you.

Warmest regards,
Reply | Threaded
Open this post in threaded view
|

Re: Request for NetLogo

Czar Joseph Castillo
This is what I did:

1. I already have the gis shape files. What I did was to put them in a
folder inside the folder where I saved my netlogo program.
2. My program looks like this: (the texts in red are my comments.
--------------------------------------------------------------------------------
extensions[gis] ;;YOU NEED TO SUMMON THE GIS EXTENSION.
globals [acad_oval]
breed [nodes node] ;;I NEED THE NODES TO CREATE A ROAD NETWORK SO I MADE A
BREED TO REPRESENT THE NODES

to setup
  clear-all
  ask patches [
    set pcolor white]
  gis:load-coordinate-system  "gisdata/acad oval.prj"  ;;THIS IS HOW TO
LOAD THE GIS DATA. THE GIS FILES ARE IN A FOLDER CALLED "gisdata"... I LOADED
THE FILE CALLED "acad oval.prj"
  set acad_oval gis:load-dataset "gisdata/acad oval.shp"
  gis:set-world-envelope (gis:envelope-of acad_oval)
  gis:set-drawing-color black gis:draw acad_oval 1
  foreach gis:feature-list-of acad_oval [[vector-feature] -> ;for some
reason, this is a magic command that i do not understand but it works. This
is loads the data for nodes.
    let location gis:location-of (first(first(gis:vertex-lists-of
vector-feature)))
   if not empty? location [
    create-nodes 1 [
     set xcor item 0 location
     set ycor item 1 location
     set shape "circle"
     set size 0.5
    ]]]

  ask node 92[
    create-link-to (node 136)
  ]

end
-----------------------------------------------------------------------------

My program is not done yet. But this should give you an idea how to load
shape files.


On Thu, Jun 21, 2018 at 9:03 AM, 황유정 [hidden email] [netlogo-users] <
[hidden email]> wrote:

>
>
> Hello. I am a student of Kyunghee University in South Korea.
>
> Recently, I am interested in evacuation simulation which is based on agent
> based model such as NetLogo.
>
> I would like to model the evacuation of people and vehicles in case of a
> power plant accident on the coast.
>
> So I am studying NetLogo program, and I need to extend the GIS to create
> an evacuation model.
>
> This is because I would like to bring the geographical data (buildings,
> roads, mountains, sea, vehicles, etc.) of this area to the interface of
> NetLogo program.
>
> The manual contents are as follows;
>
> *The extension supports vector data in the form of ESRI shapefiles. The
> shapefile (.shp) format is the most common format for storing and
> exchanging vector GIS data.*
>
> I understood that each geographical information is set as layer and
> converted into shapefile format.
>
> But I did not really understand how to do.
>
> I would like to solve this problem.  *Could I get a more detailed,
> step-by-step example?*
>
> Also, can I use ArcGIS Pro in ESRI to extend GIS?
>
> I appreciate any feedback you may have.
>
> Thank you.
>
> Warmest regards,
>
>
>