/OpenStudio-PAT

The Parametric Analysis Tool (PAT) is part of the OpenStudio collection of software tools.

Primary LanguageRubyOtherNOASSERTION

Parametric Analysis Tool (PAT)

The Parametric Analysis Tool (PAT) is part of the OpenStudio collection of software tools. It is an electron app.

For more information and documentation on OpenStudio, visit the OpenStudio website or the OpenStudio GitHub repo. User support is available via the community moderated question and answer resource unmethours.com.

If you find a bug, you can help us by submitting an issue. Guidelines for issue submission and prioritization can be found on the OpenStudio wiki.


Testing

Playwright Tests

PAT uses playwright to conduct automated E2E testing. For more information, please see the TESTING.md file.


Development

Getting started

  1. Install node v18.7.0 and npm v8 if you don't have them already. You can use these commands to check if they are installed. If you don't have them, you can download them with a Node version manager (recommended), an OS-compatible package manager, or a pre-built installer.

  2. Use the following commands to clone the PAT repo and install all dependencies:

    git clone https://github.com/NREL/OpenStudio-PAT.git
    npm install
    npx gulp installDeps
    
  3. Start the PAT application in develop mode:

    npm run start
    

Building PAT Executable (MacOS / Windows)

  1. Run the build script.
    npm run build
    
  2. Copy the folders under ./depend to the following directory.
    • MacOS: ./tmp/ParametricAnalysisTool.app/Contents/Resources
    • Windows: ./tmp/pat
  3. The executable should now be ready to use.
    • MacOS: ./tmp/ParametricAnalysisTool.app
    • Windows: ./tmp/pat/ParametricAnalysisTool.exe

Building PAT Installer Package (MacOS / Windows / Linux)

We tested our Linux-specific instructions on Ubuntu 22.04, but they should also work for other Debian-based distributions.

  1. Install the IDE/compiler for your operating system, if you don't have it already.

  2. Install CMake if you don't have it already. We tested with v3.24.0.

  3. For MacOS / Windows only, install and configure the Qt Installer Framework (QtIFW).

    • Download QtIFW using the official installer if you don't have it already. We tested with v4.4.1.
    • Configure your PATH variable. If you installed a version other than 4.4.1, replace 4.4.1 with the version you installed.
      • MacOS: Add the following lines to ~/.zshrc or similar (shell-dependent):
         export PATH="$HOME/Qt/QtIFW-4.4.1/bin:$PATH"
        
      • Windows: Search for and select "View advanced system settings" from the start menu. Click the "Environment variables..." button, edit the "Path" variable, and add the following path:
         C:\Qt\Qt-4.4.1\bin
        
  4. Generate the cmake files.

    • Open a terminal window and cd to the OpenStudio-PAT project root.
    • Run the following commands to create a new "build" folder and cd into it.
       mkdir build
       cd build
      
    • Run the appropriate command to generate the files.
      • MacOS:
         cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=11 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_BUILD_TYPE=Release ../
        
      • Windows:
         cmake -G "Visual Studio 17 2022" -A x64 ../
        
      • Linux (ignore any QtIFW not found in PATH warning):
         cmake -DCPACK_BINARY_DEB=ON \
         	-DCPACK_BINARY_IFW=OFF \
         	-DCPACK_BINARY_TGZ=OFF \
         	-DCPACK_BINARY_TZ=OFF \
         	-DCPACK_BINARY_STGZ=OFF \
         	-DCPACK_BINARY_TBZ2=OFF \
         	-DCMAKE_BUILD_TYPE=Release \
         	../
        
  5. Run the appropriate command to build PAT. The -j option sets the maximum number of processes to use.

    • MacOS:
       make -j 8 package
      
    • Windows:
       cmake --build . --target package -j 8 --config Release
      
    • Linux:
       cmake --build . --target package -j 8
      
  6. The installer package should now be ready to use.

    • MacOS: ./build/ParametricAnalysisTool-x.x.x-Darwin.dmg
    • Windows: ./build/ParametricAnalysisTool-x.x.x-Windows.exe
    • Linux: ./build/ParametricAnalysisTool-x.x.x-Linux.deb