Complete step-by-step installation instructions for setting up KPG Run on your system.
OS | Status | Notes |
|---|---|---|
macOS | Supported | 10.15 (Catalina) or later |
Windows | Supported | 10 or later |
Linux | Planned | Future release |
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)
Visit julialang.org/downloads and follow the installation instructions:
For macOS:
Open the Terminal app on macOS and run the following command:
# Download the latest stable version for macOS
$ curl -fsSL https://install.julialang.org | sh
At the following prompt, select the appropriate option:
# Prompts
Do you want to install with these default configuration choices?
# Options
> Proceed with installation
> Customize installation
> Cancel installation
To verify that Julia is installed, open Terminal and run the following command:
# Open Terminal and type below
$ julia
Run julia in Terminal.
$ julia
From the Julia REPL, press ] to enter the Pkg REPL.
# Enter package mode (press ])
julia> ]
To add a package, use the add command:
# Add packages
pkg> add JuMP
pkg> add Gurobi
pkg> add Ipopt
pkg> add KNITRO
pkg> add HiGHS
pkg> add PowerModels
pkg> add JSON
pkg> add JSON3
pkg> add CSV
pkg> add DataFrames
pkg> add MAT
pkg> add OrderedCollections
pkg> add StringEncodings
# Optionally, install multiple packages in a single command
pkg> add JuMP Gurobi Ipopt KNITRO HiGHS PowerModels JSON JSON3 CSV DataFrames MAT OrderedCollections StringEncodings
# Press Backspace to return to the Julia REPL
Verify that the packages have been installed by running the following:
# Test installations
julia> 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 first
pkg> registry update
# If specific package fails, try:
pkg> add PackageName@<version>
# Example:
pkg> add JuMP@1.29.3
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)?.
# Prompts
In which directory would you like to store the Gurobi license file?
[hit Enter to store it in the <home directory>]:
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 --license in Terminal. If the license file is not configured correctly, this command will report error 10009. Troubleshooting: If you get Error 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 key
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.
Download the installer KPG Run_<version>.dmg file from the KPG Run release page.
Open the installer and drag KPG Run.app into your Applications folder.
Download KPG 193 data from project website
Extract the .zip to a folder of your choice
For more detailed information, refer to KPG Test System Documentation.
Open KPG Run.
Select DC-OPF as the problem type.
Choose the data source folder (e.g. KPG193_ver1_5).
Set Day to 200.
Click Solve.
The optimization should terminate with an optimal status. If the run completes successfully, review the solution in the Results tab.
ERROR: LoadError: ArgumentError: Package JuMP not found
Indicates 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 REPL
pkg> add JuMP Gurobi Ipopt
ERROR: Gurobi Error 10009: Failed to obtain a valid license
Occurs 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 --license
Permission denied: /Applications/Julia-<version>.app
Indicates 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>.app
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.
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 REPL
pkg> update
# Or update specific package
pkg> update JuMP Gurobi
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/results
If you no longer plan to use KPG Run, remove the related Julia packages from your current environment.
# From the Julia REPL
julia> import Pkg
julia> Pkg.rm(["JuMP", "Gurobi", "Ipopt", "KNITRO", "HiGHS", "PowerModels", "JSON", "JSON3", "CSV", "DataFrames", "MAT", "OrderedCollections", "StringEncodings"])
# Optional: remove specific package
julia> 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 ~/.julia
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 ~/.zshrc
Start using: Getting Started Guide →
Learn interface: User Interface Guide →
Understand models: Formulations →
See examples: Complete Workflows →
If problems persist:
Collect error messages
Note KPG Run/Julia/Solvers versions
Check GitHub issues or contact support
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