taxdata icon indicating copy to clipboard operation
taxdata copied to clipboard

Rewrite Stage 2 in Julia

Open chusloj opened this issue 4 years ago • 2 comments

There is a replicability issue using the CVXOPT solver in Python to calculate the PUF and CPS weights - the md5 hash for the weight file changes every time the solver is run. Because most of the commonly used LP solvers do not have clean APIs for Python, the stage2 and solve_lp_for_year scripts should be re-written in Julia. The language has a clean optimization & modeling interface called JuMP that can be used for any ~~LP~~ optimization model that has a Julia implementation.

There are a few reasons why using Julia would be advantageous to Python for the solver stage:

  1. Julia has a pandas interface, so refactoring the data processing portions of the code shouldn't be too time consuming.
  2. Using JuMP, any new solver can be used with the same code because JuMP is model-agnostic.
  3. Julia is a compiled language, so it might have a speed advantage over Python.

Coding the Julia version of the code should take substantially less time than finding the md5 replicability bug.

chusloj avatar Jul 30 '20 17:07 chusloj