Installation Guide
KPG Run Installation Guide
Complete step-by-step installation instructions for setting up KPG Run on your system.
System Requirements
Operating System
| OS | Status | Notes |
|---|---|---|
| macOS | Supported | 10.15 (Catalina) or later |
| Windows | Supported | 10 or later |
| Linux | Planned | Future release |
Hardware
Minimum:
- CPU: Dual-core processor
- RAM: 8 GB
- Storage: 2 GB available
Recommended:
- CPU: Quad-core or better (M1 or later ideal)
- RAM: 16 GB
- Storage: 5 GB (includes data and results)
Installation Overview
flowchart TB
A[Install Julia] --> B[Install Julia Packages]
B --> C[Get Gurobi]
C --> D[Install KPG Run]
D --> E[Verify Installation]
E --> F[Ready to Use!]
Step 1: Install Julia
Visit julialang.org/downloads and follow the installation instructions:
For macOS:
Install via juliaup
Open the Terminal app on macOS and run the following command:
# Download the latest stable version for macOS$ curl -fsSL https://install.julialang.org | shAt the following prompt, select the appropriate option:
# PromptsDo you want to install with these default configuration choices?
# Options> Proceed with installation> Customize installation> Cancel installationVerify installation
To verify that Julia is installed, open Terminal and run the following command:
# Open Terminal and type below$ juliaStep 2: Install Julia Packages
Launch Julia REPL
Run julia in Terminal.
$ juliaInstall Required Packages
From the Julia REPL, press ] to enter the Pkg REPL.
# Enter package mode (press ])julia> ]To add a package, use the add command:
# Add packagespkg> add JuMPpkg> add Gurobipkg> add Ipoptpkg> add KNITROpkg> add HiGHSpkg> add PowerModelspkg> add JSONpkg> add JSON3pkg> add CSVpkg> add DataFramespkg> add MATpkg> add OrderedCollectionspkg> add StringEncodings
# Optionally, install multiple packages in a single commandpkg> add JuMP Gurobi Ipopt KNITRO HiGHS PowerModels JSON JSON3 CSV DataFrames MAT OrderedCollections StringEncodings
# Press Backspace to return to the Julia REPLVerify that the packages have been installed by running the following:
# Test installationsjulia> using JuMP, Gurobi, Ipopt, KNITRO, HiGHS, PowerModels, JSON, JSON3, CSV, DataFrames, MAT, OrderedCollections, StringEncodings
julia> println("All packages loaded successfully")All packages loaded successfully
# If no error message appears, exit Julia
julia> exit()Troubleshooting:
If package installation fails:
# Update registry firstpkg> registry update
# If specific package fails, try:pkg> add PackageName@<version>
# Example:pkg> add JuMP@1.29.3Step 3: Install Gurobi Solver
Get Academic License
Note: You must meet Gurobi’s academic license eligibility requirements. If you cannot obtain a Gurobi license, skip this step and proceed with Step 4.
- Register at gurobi.com/academia
- Verify your academic email.
- Navigate to User Portal > Licenses > Request.
- Request a free academic license that matches your intended use.
- Generate a license key.
- Install the Gurobi license by following the instructions provided in the license portal.
# Copy and paste the following command in Terminal$ grbgetkey <license-key>Replace <license-key> with the key shown in the Gurobi license portal.
Select the location where you want to save your license file when prompted. It is recommended to save the license file in your home directory. If you prefer to place the license file somewhere else, refer to → Where do I place the Gurobi license file (gurobi.lic)?.
# PromptsIn which directory would you like to store the Gurobi license file?[hit Enter to store it in the <home directory>]:Install Gurobi
- Visit Gurobi Download Center
- Download the installer that matches your system (Windows, macOS, or Linux).
- Run the installer
- If the installer prompts you to install Rosetta, allow the installation to proceed.
- Test your license by running
gurobi_cl --licensein Terminal. If the license file is not configured correctly, this command will reporterror 10009. Troubleshooting: If you getError 10009, verify that your license file is correctly located in a valid Gurobi license location. For any other error messages, refer to the → Gurobi Help Center for troubleshooting guidance.
# Check license$ gurobi_cl --license
# If "No license found":# 1. Check ~/gurobi.lic exists# 2. Ensure GUROBI_HOME set correctly# 3. Re-run grbgetkey with correct keyStep 4: Verify Ipopt
Ipopt is installed in Step 2 along with the other Julia packages, but you can verify the installation with the minimal example below:
julia> using Ipopt
julia> using JuMP
julia> model = Model(Ipopt.Optimizer)A JuMP Model├ solver: Ipopt├ objective_sense: FEASIBILITY_SENSE├ num_variables: 0├ num_constraints: 0└ Names registered in the model: none
julia> @variable(model, x >= 0)x
julia> @objective(model, Min, x^2)x²
julia> @constraint(model, x >= 1)x ≥ 1
julia> optimize!(model)This is Ipopt version 3.14.19, running with linear solver MUMPS 5.8.1....EXIT: Optimal Solution Found.Step 5: Install KPG Run Application
Download the Installer (macOS)
- Download the installer
KPG Run_<version>.dmgfile from the KPG Run release page. - Open the installer and drag
KPG Run.appinto your Applications folder.
Download KPG 193 Data
- Download KPG 193 data from project website
- Extract the
.zipto a folder of your choice
For more detailed information, refer to KPG Test System Documentation.
Step 6: First Launch
Verify Functionality
- Open KPG Run.
- Select DC-OPF as the problem type.
- Choose the data source folder (e.g.
KPG193_ver1_5). - Set
Dayto 200. - Click
Solve.
The optimization should terminate with an optimal status. If the run completes successfully, review the solution in the Results tab.
Troubleshooting
Common Issues
Issue 1: Julia Packages Not Found
ERROR: LoadError: ArgumentError: Package JuMP not foundIndicates that one or more required Julia packages (e.g. JuMP) have not been installed in the current environment.
Solution: Install the required packages in the Julia REPL.
# In Julia REPLpkg> add JuMP Gurobi IpoptIssue 2: Gurobi License Error
ERROR: Gurobi Error 10009: Failed to obtain a valid licenseOccurs when Gurobi cannot find or validate a license file.
Solution: Ensure that the license file exists and reactivate the license if necessary.
# Check license file exists$ ls ~/gurobi.lic
# If not, reactivate$ cd $GUROBI_HOME/bin$ ./grbgetkey <license-key>
# Verify$ gurobi_cl --licenseIssue 3: Permission Denied
Permission denied: /Applications/Julia-<version>.appIndicates that the current user does not have sufficient permissions to access or modify the Julia application.
Solution: Adjust the permissions on the Julia application.
# Fix permissions$ sudo chmod -R 755 /Applications/Julia-<version>.appPlatform-Specific Notes
Verifying Julia Architecture on macOS
On macOS, you can check which CPU architecture Julia is using with the following command:
# Verify Julia is ARM64 version$ file "$(which julia)"Mach-O 64-bit executable arm64 # macOS (Apple Silicon)Mach-O 64-bit executable x86_64 # macOS (Intel)Performance: Native ARM64 builds generally run faster than running Julia with Rosetta.
Updating
Update Julia Packages
Use the Julia package manager to update the Julia packages required by KPG Run. You can update all installed packages, or only specific ones such as JuMP and Gurobi:
# In Julia REPLpkg> update
# Or update specific packagepkg> update JuMP GurobiUninstallation
Remove KPG Run
Delete the KPG Run application and any result files you no longer need.
# Delete application directory$ rm -rf "/Applications/KPG Run.app"
# Delete results (if desired)$ rm -rf ~/path/to/resultsUninstall Julia Packages
If you no longer plan to use KPG Run, remove the related Julia packages from your current environment.
# From the Julia REPLjulia> import Pkgjulia> Pkg.rm(["JuMP", "Gurobi", "Ipopt", "KNITRO", "HiGHS", "PowerModels", "JSON", "JSON3", "CSV", "DataFrames", "MAT", "OrderedCollections", "StringEncodings"])
# Optional: remove specific packagejulia> Pkg.rm(["KNITRO"])# If Julia was installed using juliaup$ juliaup self uninstall
# If Julia was installed via the `.dmg` file$ rm -rf /Applications/Julia-<version>.app
# Optional: Remove user packages/environments (Julia depot)$ rm -rf ~/.juliaRemove Gurobi
To fully uninstall Gurobi, remove the application files, license file, and any PATH entries you added during installation.
# Remove application# For version 13.0.0, replace <version> with 1300$ sudo rm -rf /Library/gurobi<version>
# Remove license (home directory)$ rm ~/gurobi.lic
# Remove any Gurobi-related PATH entries from ~/.zshrcNext Steps
- Start using: Getting Started Guide →
- Learn interface: User Interface Guide →
- Understand models: Formulations →
- See examples: Complete Workflows →
Getting Help
Report Issues
If problems persist:
- Collect error messages
- Note KPG Run/Julia/Solvers versions
- Check GitHub issues or contact support
Additional Resources
For more information on the tools and libraries used by KPG Run, refer to the following resources:
- Julia Documentation: docs.julialang.org
- JuMP Documentation: jump.dev
- Gurobi Support: support.gurobi.com