Truls Flatberg

Results 11 comments of Truls Flatberg

I have been playing around with the above ideas to combine JuMP and Unitful. My primary goal was to use units in combination with the ```@variable``` and ```@constraint``` macros for...

Thanks for the good feedback. My initial attempts was focused on using ```GenericAffExpr{Quantity{U},VariableRef}```, but I quickly ran into problems with the operators (like ```Base.:+()```) only being defined for arguments of...

I want e..g. to combine variables of different units in the same constraint (there may e.g. be more natural units for different variables, typicially for our use is different scaling...

Thanks for the feedback! In my view I think the introduction of units should both be a correctness and convenience measure. While the Pyomo solution seems to go for only...

There is already optional support for this through using `unit` as a keyword argument. ```julia max_speed = 1u"km/h" @constraint(model, 2x + y

Thanks for the tip! Worked as a charm. I'll update with the new syntax option.

Seems like a good solution. I am currently trying to add support for quadratic expressions into UnitJuMP and a rudimentary first version is available in the 'quadratic' branch. The approach...

That is a pretty old version of Xpress to support. But is it not possible to have code that checks the version of Xpress available and adjusts accordingly? With the...

The approach seems to work ok for constraints, but I can not see how to extend it to the objective function(s). I am not familiar with the use of shapes,...

I now have a working version with a constraint bridge (LessThan) and an objective bridge that strips off units at https://github.com/trulsf/UnitJuMP.jl/tree/tf/units_in_affexpr Still a bit simplistic and primitive, but at least...