Benoît Legat
Benoît Legat
Maybe now with https://github.com/odow/SymbolicAD.jl it makes more sense to care about it ?
You can do this by extending the `@variable` macro as follows ```julia using JuMP using Unitful m = Model() function unitvar(vref::JuMP.VariableRef, u::Unitful.FreeUnits) JuMP.GenericAffExpr(0.0 * u, vref => 1.0 * u)...
I checked the implementation of UnitJuMP.jl, it looks very good. About MutableArithmetics, implementing its interface is optional. It should work without it but be slower. So in the long term,...
> I want to allow for using different units (of same dimension) in the same constraint What do you mean ? How would it make sense to add affine expressions...
Sounds good, just wanted to give some advice but feel free to experiment in any direction!
This looks a lot like https://github.com/jump-dev/MathOptInterface.jl/pull/1901 Maybe we should have something similar for AD backends?
Another option is to define ```julia function MOI.set(model, ::ObjectiveFunction, func::AbstractVectorFunction) for i in 1:MOI.output_dimension(func) MOI.set(model, MultiObjectiveFunction(i), func[i]) end end ``` so that both syntax works for the user
> a discussion about how to pass the resolution method to invoke (and possibly the required parameters) is needed. vOpt would can either create * one MOI optimizer per resolution...
One way to go for this is to parametrize the JuMP model with the coefficient type. `Model()` would give a `JuMP.Model{Float64}` and `Model{T}()` would give a `JuMP.Model{T}()`. `JuMP.VariableRef` will also...
`CDDLib.Optimizer{Rational{BigInt}}` and `Polyhedra.VRepOptimizer{Rational{BigInt}}` should work with `Rational{BigInt}`.