PSR

PSR Used Julia for Energy Analytics and Optimization

PSR

PSR Used Julia for Energy Analytics and Optimization

Date Published

Jan 2, 2023

Jan 2, 2023

Industry

Energy

Share

Share

Date Published

Jan 2, 2023

Industry

Energy

Share

Use Case

PSR is a global electricity and natural gas consulting, analytics and technology firm with a presence in more than 70 countries around the world. They develop and license analytical tools for planning and energy market simulation using multistage stochastic optimization techniques.

PSR Optimization Engineer Joaquim Dias Garcia explains:

Each country in which we operate has its own regulations and demands, and each organization we work with has its own customization requirement, so our ability to be nimble and faster to market gives us a distinct competitive advantage. Our ability to add new solutions and new methodologies using Julia, with rapid testing, provides the fastest time to value for PSR and our customers.

PSR has been using Julia since 2015, before Julia v0.4. Our most frequent use of Julia is for optimization models. We use Julia’s JuMP optimization package for our commercial models, including optimizing power system operation with the stochastic dual dynamic programming algorithm (SDDP model), expansion planning using large-scale decomposition models (OPTGEN model) and optimal power flow software with non-linear programming (OPTFLOW model). We use Julia for daily tasks, research and software development, including probabilistic tools relying on Monte Carlo simulations, Fourier Analysis and GPUs.

Julia with JuMP allows us to use a high-level, high performance language for numerical computing and daily tasks. With Julia + JuMP, sketching an optimization model and bringing it to production is a single task which solves a lot of our ‘two-language’ problem. Because many stochastic programming algorithms and probabilistic methods used by PSR are suitable for parallelization, we took advantage of Julia’s inherent parallelism. The good interface with MPI and GPUs provide a lot of possibilities and flexibility.

Currently we deploy on AWS. Julia fits very well in this framework. We usually develop code on Windows with serial processing and test and deploy on Linux with parallel processing.

Historically, we have used Fortran, C/C++, Python, R and Mosel, so the good interoperability between Julia, C and Fortran lets us use a lot of legacy code and increases our productivity.

Julia makes it surprisingly easy to write simple and transparent code. Most of the time the code is so clear that writing explanatory comments is completely unnecessary.

Our investment optimization model originally built in Fortran had around 40 thousand lines of code. In Julia, there are only 4 thousand lines of code – a 90% reduction in code. Our SDDP model was reduced 88% from 120 thousand to 14 thousand lines of code.

Julia enables very fast development of optimization models. Many new ideas that used to take days or weeks to test are now tested in a few hours. In future, we expect to use features like programming GPUs and migrate more of our code to Julia.

What’s more, PSR isn’t just a Julia user – they are also contributors active in the JuliaOpt (Julia optimization) community. PSR developed the wrapper Xpress.jl, and has contributed to KNITRO.jl, MathProgBase.jl, Gurobi.jl, GLPKMathProgInterface.jl, JuMP.jl and MathOptInterface.jl, from design to programming.

Tags

Tags

Tags

Authors

JuliaHub, formerly Julia Computing, was founded in 2015 by the four co-creators of Julia (Dr. Viral Shah, Prof. Alan Edelman, Dr. Jeff Bezanson and Stefan Karpinski) together with Deepak Vinchhi and Keno Fischer. Julia is the fastest and easiest high productivity language for scientific computing. Julia is used by over 10,000 companies and over 1,500 universities. Julia’s creators won the prestigious James H. Wilkinson Prize for Numerical Software and the Sidney Fernbach Award.

Authors

JuliaHub, formerly Julia Computing, was founded in 2015 by the four co-creators of Julia (Dr. Viral Shah, Prof. Alan Edelman, Dr. Jeff Bezanson and Stefan Karpinski) together with Deepak Vinchhi and Keno Fischer. Julia is the fastest and easiest high productivity language for scientific computing. Julia is used by over 10,000 companies and over 1,500 universities. Julia’s creators won the prestigious James H. Wilkinson Prize for Numerical Software and the Sidney Fernbach Award.

Authors

JuliaHub, formerly Julia Computing, was founded in 2015 by the four co-creators of Julia (Dr. Viral Shah, Prof. Alan Edelman, Dr. Jeff Bezanson and Stefan Karpinski) together with Deepak Vinchhi and Keno Fischer. Julia is the fastest and easiest high productivity language for scientific computing. Julia is used by over 10,000 companies and over 1,500 universities. Julia’s creators won the prestigious James H. Wilkinson Prize for Numerical Software and the Sidney Fernbach Award.

Contact Us

Want to get enterprise support, schedule a demo, or learn about how we can help build a custom solution? We are here to help.

Contact Us

Want to get enterprise support, schedule a demo, or learn about how we can help build a custom solution? We are here to help.

Contact Sales

Learn about our products, pricing, implementation, and how JuliaHub can help your business

We’ll use your information to respond to your inquiry and, if applicable, classify your interest for relevant follow-up regarding our products. If you'd like to receive our newsletter and product updates, please check the box above. You can unsubscribe at any time. Learn more in our Privacy Policy.

Get a Demo

Discover how Dyad, JuliaHub, and Pumas can improve your modeling and simulation workflows.

Enterprise Support

Leverage our developers, engineers and data scientists to help you build new solutions.

Custom Solutions

Have a complex setup that needs a custom solution? We are here to help.

Contact Sales

Learn about our products, pricing, implementation, and how JuliaHub can help your business

We’ll use your information to respond to your inquiry and, if applicable, classify your interest for relevant follow-up regarding our products. If you'd like to receive our newsletter and product updates, please check the box above. You can unsubscribe at any time. Learn more in our Privacy Policy.

Contact Sales

Learn about our products, pricing, implementation, and how JuliaHub can help your business

We’ll use your information to respond to your inquiry and, if applicable, classify your interest for relevant follow-up regarding our products. If you'd like to receive our newsletter and product updates, please check the box above. You can unsubscribe at any time. Learn more in our Privacy Policy.

Get a Demo

Discover how Dyad, JuliaHub, and Pumas can improve your modeling and simulation workflows.

Enterprise Support

Leverage our developers, engineers and data scientists to help you build new solutions.

Custom Solutions

Have a complex setup that needs a custom solution? We are here to help.

/

/

PSR Used Julia for Energy Analytics and Optimization

/

/

PSR Used Julia for Energy Analytics and Optimization