Skip to content

Overview

epanet-js contains two classes, Workspace & Project. A Workspace represents a virtual file system where you can store and read files that are consumed by the tool kit, such as INP Files or generated by it, such as RPT files or OUT files.

A Project is a single instance of the EN_Project wrapper object and a singleton with all 122 toolkit methods attached. A full list of all methods can be found on the wiki. All method names have been converted to camelCase to keep with javascript convention.

Create a Project object by instancing the Project class with a Workspace object.

import { Project, Workspace } from `epanet-js`

const ws = new Workspace()
const model = new Project(ws)

If you are not familiar with the OWA-EPANET Toolkit API or EPANET it is worthwhile reading the OWA-EPANET Toolkit API documentation and OWA-EPANET wiki.

List of Classes

Class Description
Workspace A virtual file system where you can store and read files that are consumed by the tool kit
Project A single instance of the EN_Project wrapper object and a singleton with all 122 toolkit methods