Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
CUBE
  • Product Communities
  • Mobility Simulation
  • CUBE
  • Cancel
CUBE
CUBE Wiki How to renumber zones or nodes in a highway network?
    • Sign In
    • Wiki
    • -CUBE
      • +Announcements
      • +CUBE CONNECT Edition
      • -Cube 6
        • +Installation
        • +Licensing for CUBE 6.1.1
        • +Licensing for CUBE 6.4.x
        • +Base
        • -Voyager
          • How to log variables and read files with user specified variables?
          • +HIGHWAY
          • +PUBLIC TRANSPORT (PT)
          • +MATRIX
          • -NETWORK
            • How to renumber zones or nodes in a highway network?
            • How to compare two networks using a standalone script with _COMPARE variable?
            • How to export a CUBE Binary NET network into a GIS layer using a Network program?
            • How to export a Geodatabase network into a shapefile using a Network program?
            • How to create a turning movements/turn penalty file using Voyager script?
            • How to access link attributes for reverse direction inside a NETWORK Program?
            • How to Build and Edit Network From a Text File in Cube?
            • How to export network Links and Nodes DBF tables with a Network program
            • How to generate centroid connectors using Voyager scripting
            • How to isolate overlapping nodes (with duplicate coordinates X and Y)
            • How to merge Highway Networks
            • How to undertake Link Consolidation using the Voyager utility function
          • +PILOT
          • Changing temp file folder location for MATRIX/HIGHWAY programs
          • +DISTRIBUTION
        • +Avenue
        • +Analyst
        • +Analyst Drive
        • +Land
        • +Cargo
        • +Cluster
      • CUBE Access (formerly Sugar Access)
      • +Learning CUBE

     
     Questions about this article, topic, or product? Click here. 

    How to renumber zones or nodes in a highway network?

    Product(s): Cube
    Version(s): 6.1 to 6.5
    Area: Network

    Occasionally, we would need to renumber the nodes for non-zonal and zonal cases after editing our network or introducing new zonal data, etc. There are various ways to do this. For this exercise, an example script was provided to show how it can be achieved via scripting.

    Solution

    ;--- creating a lookup file for node numbering

    ;--- data fields: new# old#

    COPY FILE=RENUMBER.DAT 

    101 1
    102 2
    103 3
    104 4
    105 5
    106 6
    107 7
    108 8
    109 9
    110 10

    ENDCOPY

     RUN PGM=NETWORK 

         NETI[1] = INPUT.NET

         NETO = OUTPUT.NET

         ;--- specifying input lookup file

         ;--- data fields: new# old#

         LOOKUP NAME=RENUM, FILE=RENUMBER.DAT,

         INTERPOLATE=F, FAIL=0,0,0




         ;--- modifying node numbers in nodes

         PHASE=INPUT FILEI=NI.1

              IF (RENUM(N)<>0) N=RENUM(N)

         ENDPHASE




         ;--- modifying node numbers in links

         PHASE=INPUT FILEI=LI.1

              IF (RENUM(A)<>0) A=RENUM(A)

              IF (RENUM(B)<>0) B=RENUM(B)

         ENDPHASE

    ENDRUN
    • Share
    • History
    • More
    • Cancel
    • Vu Dang Created by Bentley Colleague Vu Dang
    • When: Tue, Mar 31 2020 11:56 AM
    • Filippo Contiero Last revision by Bentley Colleague Filippo Contiero
    • When: Thu, Jan 19 2023 6:37 AM
    • Revisions: 4
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies