Giter VIP home page Giter VIP logo

infoworks-ruby-scripts's Introduction

Infoworks Ruby Scripts

A collection of useful Ruby scripts to help automate the building, calibrating and running of models in InfoWorks.

Have a script to share? Submit a pull request, open an issue or send me an email - [email protected]

Downloading and using scripts

placeholder

The simplest way to get all the scripts is to download the whole collection as a zip from GitHub.

Click Clone or download and then Download Zip.

To run a Ruby script in InfoWorks, click Network > Run Ruby Script in the toolbar and then select a .rb file.

Suggest a new script

If you have an idea for a script that you want developed, please open an issue or send me an email - [email protected]

List of scripts

Simple

If you are a beginner and just learning Ruby these scripts can be used as a reference to learn how to automate simple tasks.

Each of these scripts will only complete a single task and the code within will be commented to provide context for those not familiar with coding in Ruby.

Name Purpose
Modify Network Data Update pipe diameters based on information in the user text fields
Create Network Objects Create new network objects
Modify Structured Data Update structured data, these fields are displayed as tables within InfoWorks, such as depth/volume for reservoirs
Set Material Using Lookup Update material field on pipes using a Ruby hash as a lookup table
Expand Short Links Expands links to be a minimum size
Trace Network From a single pipe, use Ruby to trace a distribution network finding pipes of the same size or smaller
Validate Network Run a network validation from Ruby

Intermediate

Intermediate scripts attempt to automate realistic modelling tasks using Ruby. These scripts will contain multiple tasks that flow from each other. High-level comments are provided, though some experience with coding would be expected to modify or extend the scripts.

Config variables are generally added to the top of the script to allow some level of customisation and running the scripts directly by the end-user with minimal modification.

Name Purpose
Open Data Import Centre Automate the import multiple of shape files, including filtering assets
Demand Allocation - Exchange Allocate customer points using Exchange

Complex

Name Purpose
Convert Network to GeoJSON Converts an InfoWorks network or simulation into a GeoJSON file
Split pipes with nodes Similar to proximity trace, finds overlapping nodes or interesections and splits the pipe
Create Selection Lists from Areas Reads the area codes from within a model and create selection lists for each area.
Set elevations using Ordnance Survey NTF Calculate the elevation of point objects within Great Britain using Ordance Survey NTF files
Demand Allocation - Custom Allocate customer points to the nearest pipe
Exchange Full Model Build and Run Example Create and run a model from raw data in the command line using Infoworks Exchange.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.