Home Forums Urban Modeling and Simulation Moved: distances, plot size, land use colors

Viewing 2 reply threads
  • Author
    Posts
    • #9561

      Dear Reinhard,

      I already solved the errors from my previous comment! Thank you! Now I have more questions, maybe they are too many to ask here, but here it goes:

      1- How do I include specific distance constraints in my code? e.g. commercial nodes in an average walking distance of 150 m from housing units;

      2- How to see the preview color using only one color swatch instead of the gradient? keeping all the parameters inputs, of course. In a way that the visualization would actually show the landuse map result, not the attractivity range simulation;

      3- How can I select the distribution of my landuse bound by plot sizes? e.g. how to assign my housing plots to plots in between 300m2 and 600m2;

      I somehow tried to solve this issues in my definition but I do not think I got very far. Thank you very much for your help!

      My files are attached.

      Best,

      Luisa

    • #9565
      Reinhard Koenig
      Keymaster

      Dear Luisa,

      Concerning question 2: You need to create separate groups of land uses. I adapted my example to show it with two land uses:

      Since the results from my example simulation return a mix of uses for each block/plot, I need to decide which one I take (here I used the one with the highest value).

      Best regards

      Reinhard

    • #9584
      Reinhard Koenig
      Keymaster

      Dear Luisa,

      Concerning question 3: You need to add this code block in the C#_Attractivity component before the normalization part:

      //=======================================================
      // — check sizes for functions —
      for(int i = 0; i < nrLocations; i++)
      {
      double minPlotSize = 3000;
      double maxPlotSize = 6000;
      double curPlotSize = PlotSizes[i];
      if ((curPlotSize < minPlotSize) || (curPlotSize > maxPlotSize))
      {
      attractPop[i] = 0;
      }
      }

      Please, adjust the min and max plot size to your needs!

      In addition you need to link the plot sizes to the input of this component – see attached GH file.

      Best regards

      Reinhard

      Attachments:
      You must be logged in to view attached files.
    • #9562

      Again the GH file.

      Attachments:
      You must be logged in to view attached files.
    • #9564
      Reinhard Koenig
      Keymaster

      Dear Luisa,

      concerning your question 1:

      In the DistanceMatrix resp. the Distances data tree you find all distances from each plot to each other plot. Please, look at the example code at the top of the C#_Attractivity component. If you need the distances from a plot with index = 0 to all other plots you can use:

      Distances.Branch(0)[i]

      In a for loop with i as an iterator. Looks like this if your print the distances:

      You can set the attractivity of places further away than 150m to 0.

      There is another method to distribute functions (e.g. 10 commercial usages) that are closest to the population without overlapping their catchment area. Please ask the group with Artem, how to do this.

      I’ll look into your other questions later.

      Best regards

      Reinhard

Viewing 2 reply threads
  • You must be logged in to reply to this topic.