Oscar Dowson

Results 1409 comments of Oscar Dowson

It's implemented as a variable bridge: https://github.com/jump-dev/MathOptInterface.jl/blob/master/src/Bridges/Variable/bridges/ParameterToEqualToBridge.jl

So the issue is here: https://github.com/jump-dev/MathOptInterface.jl/blob/bc869ec1d53bf2d35ddc94cc24b0d35a43e808c5/src/Bridges/bridge_optimizer.jl#L1687-L1700 If the variable is bridged we don't attempt to set the variable name of the inner. I don't know that I'm strongly motivated to...

I did in #38. I'll tag a release

Hopefully by the time I finish this PR, no. It's still a WIP

```julia import MathOptInterface as MOI import MathOptSymbolicAD function _expr_to_symbolics(expr::MathOptSymbolicAD._Node) if expr.head == MathOptSymbolicAD._OP_COEFFICIENT return MOI.VariableIndex(-expr.index) elseif expr.head == MathOptSymbolicAD._OP_VARIABLE return MOI.VariableIndex(expr.index) elseif expr.head == MathOptSymbolicAD._OP_OPERATION return MOI.ScalarNonlinearFunction( expr.operation, Any[_expr_to_symbolics(c) for...

```julia using JuMP import PowerModels import MathOptSymbolicAD import Ipopt function main(case, backend) pm = PowerModels.instantiate_model( case, PowerModels.ACPPowerModel, PowerModels.build_opf, ); model = pm.model set_optimizer(model, Ipopt.Optimizer) set_attribute( model, MOI.AutomaticDifferentiationBackend(), backend, ) optimize!(model)...

Even this now works: ```Julia julia> using JuMP, Ipopt julia> import MathOptSymbolicAD: SymbolicAD julia> begin model = Model(Ipopt.Optimizer) @variable(model, x) @operator(model, op_foo, 1, x -> x^2) @objective(model, Min, op_foo(x -...

It looks like this is just a bug in the printing. The actual numeric values are correct. ```julia julia> using InfiniteOpt, Ipopt julia> model = InfiniteModel(Ipopt.Optimizer); julia> @infinite_parameter(model, q in...

So perhaps the right thing to do here is an expected value forward pass. Or just pick the middle realization from the vector. It doesn't need to be the expected...