This talk will present the package UnitJuMP that allows the user to include units when modelling optimization problems in JuMP. Both variables and constraints can have specified units, as well as parameters involved in objective and constraints. If different units are combined, functionality in Unitful is used to check for compatibility and perform automatic conversions.
When setting up complex optimization models involving real world problems, this will often involve parameters and variables that represent physical quantitities with specified units. To ensure correctness of the optimization model, considerable care has to be taken to avoid errors due to inconsistent use of units. An example is investment models in the energy sector where multiyear investments measured in GW can be combined with operational decisions on hour or minute basis with parameters being provided in a wide range of units (kWh, MJ, kcal, MMBTU).
The package UnitJuMP is an extension to the JuMP package that handles modeling of units within JuMP models.
The implementation is based on use of the Unitful package for generic handling of physical units.
The package is still in an early stage of development, and currently only supports the use of units in combination with linear and mixed integer linear optimization problems.
The package is available for download and testing at https://github.com/trulsf/UnitJuMP.jl.