Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Apr 26 04:33

    github-actions[bot] on v0.3.4

    (compare)

  • Apr 26 04:33
    JuliaTagBot commented #99
  • Apr 26 04:13
    JuliaRegistrator commented on dec396a
  • Apr 26 04:12
    joaquimg commented on dec396a
  • Apr 19 13:39
    matbesancon commented #103
  • Mar 26 01:49

    blegat on gh-pages

    build based on dec396a (compare)

  • Mar 26 01:47

    odow on odow-patch-1

    (compare)

  • Mar 26 01:45

    guilhermebodin on master

    Stop abusing the TagBot CI (#10… (compare)

  • Mar 26 01:45
    guilhermebodin closed #104
  • Mar 26 01:43

    blegat on gh-pages

    build based on ecea018 (compare)

  • Mar 26 01:40
    guilhermebodin closed #105
  • Mar 26 01:40

    guilhermebodin on master

    Fix test in julia 1.6 (#106) (compare)

  • Mar 26 01:40
    guilhermebodin closed #106
  • Mar 26 01:38
    codecov[bot] commented #106
  • Mar 26 01:36
    codecov[bot] commented #106
  • Mar 26 01:35
    codecov[bot] commented #106
  • Mar 26 01:27
    guilhermebodin commented #104
  • Mar 26 01:26
    guilhermebodin opened #106
  • Mar 26 01:24

    guilhermebodin on fix-julia1.6-ci

    Fix test in julia 1.6 (compare)

  • Mar 25 23:49
    odow opened #105
Mathieu Besançon
@matbesancon
I'll put something out tomorrow
Guilherme Bodin
@guilhermebodin
Hey guys, I ran into this when trying to update for MOI 0.9 JuliaOpt/GLPK.jl#108
is this correct?
Also I don't think COSMO was ported yet so I was thinking of changing it to SCS, but I still need to add some cones to SCS.jl
Mathieu Besançon
@matbesancon
it may be easier to PR COSMO to update to MOI 0.9
Benoît Legat
@blegat
COSMO was just updated
Guilherme Bodin
@guilhermebodin
Nice
I am going to test against its master
it is working against GLPK master
Right now I am running into weird errors for CSDP
soc1f: Error During Test at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Test/config.jl:45
  Got exception outside of a @test
  MethodError: no method matching allocate_variables(::CSDP.Optimizer, ::Int64)
  Closest candidates are:
    allocate_variables(!Matched::MathOptInterface.Utilities.AbstractModel, ::Any) at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/model.jl:653
    allocate_variables(!Matched::MathOptInterface.Utilities.MockOptimizer, ::Any) at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/mockoptimizer.jl:472
  Stacktrace:
   [1] copy_free_variables(::CSDP.Optimizer, ::MathOptInterface.Utilities.IndexMap, ::Array{MathOptInterface.VariableIndex,1}, ::typeof(MathOptInterface.Utilities.allocate_variables)) at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/copy.jl:272
   [2] allocate_load(::CSDP.Optimizer, ::Dualization.DualizableModel{Float64}, ::Bool) at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/copy.jl:675
   [3] #automatic_copy_to#97 at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/copy.jl:17 [inlined]
   [4] #automatic_copy_to at ./none:0 [inlined]
   [5] #copy_to#19 at /home/guilhermebodin/.julia/packages/CSDP/LdybZ/src/MOI_wrapper.jl:130 [inlined]
   [6] #copy_to at ./none:0 [inlined]
   [7] attach_optimizer(::MathOptInterface.Utilities.CachingOptimizer{CSDP.Optimizer,Dualization.DualizableModel{Float64}}) at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/cachingoptimizer.jl:138
   [8] optimize!(::MathOptInterface.Utilities.CachingOptimizer{CSDP.Optimizer,Dualization.DualizableModel{Float64}}) at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/cachingoptimizer.jl:174
   [9] optimize! at /home/guilhermebodin/Documents/Github/Dualization.jl/src/MOI_wrapper.jl:95 [inlined]
Guilherme Bodin
@guilhermebodin
Well COSMO does not support acessing the DualObjectiveValue()
Benoît Legat
@blegat
CSDP does not support free variables
Are you using a bridge layer ?
Guilherme Bodin
@guilhermebodin
yes
Benoît Legat
@blegat
There error should be UnsupportedConstraint though
Guilherme Bodin
@guilhermebodin
like this
conic_config = MOIT.TestConfig(atol = 1e-4, rtol = 1e-4)
    conic_cache = MOIU.UniversalFallback(Dualization.DualizableModel{Float64}())
    conic_cached = MOIU.CachingOptimizer(conic_cache, conic_optimizer)
    conic_bridged = MOIB.full_bridge_optimizer(conic_cached, Float64)
and then I am passing the conic_bridged
Benoît Legat
@blegat
This might happen if you include the same variable in two different VectorOfVariables constraint
Then only one of the constraint will be added with add_constrained_variable
and the other will create free variables and use add_constraint
But you cannot create free variables with CSDP
Guilherme Bodin
@guilhermebodin
@blegat I am having a hard time trying to fix this error hahaha
Shouldn't this work?
conic_optimizer = DualOptimizer(CSDP.Optimizer(printlevel = 0))
    conic_config = MOIT.TestConfig(atol = 1e-4, rtol = 1e-4)
    conic_cache = MOIU.UniversalFallback(Dualization.DualizableModel{Float64}())
    conic_cached = MOIU.CachingOptimizer(conic_cache, conic_optimizer)
    conic_bridged = MOIB.full_bridge_optimizer(conic_cached, Float64)

    @testset "coninc linear, soc, rsoc and sdp test" begin
        MOIT.contconictest(conic_bridged, conic_config, ["lin3", # Feasibility problem
                                                         "lin4", # Feasibility problem
                                                         "normone2", # Feasibility problem
                                                         "norminf2", # Feasibility problem
                                                         "soc3", # Feasibility problem
                                                         "rotatedsoc2", # Feasibility problem
                                                         "exp", # Tested in exponential and power cone test
                                                         "pow", # Tested in exponential and power cone test
                                                         "rootdet", # Not yet implemented
                                                         "logdet" # Not yet implemented
                                                         ])
    end
Benoît Legat
@blegat
It should, soc1f is the only one failing ?
Guilherme Bodin
@guilhermebodin
I managed a work around
function DualOptimizer{T}(dual_optimizer::OT) where {T, OT <: MOI.ModelLike}
    dual_problem = DualProblem{T}(MOIB.full_bridge_optimizer(MOIU.CachingOptimizer(DualizableModel{T}(), dual_optimizer), T))
    # discover the type of MOIU.CachingOptimizer(DualizableModel{T}(), dual_optimizer)
    OptimizerType = typeof(dual_problem.dual_model)
    return DualOptimizer{T, OptimizerType}(dual_problem)
end
Added a bridge inside the DualOptimizer constructor
Benoît Legat
@blegat
Ah that's probably because of the free variables you have for equality constraints
DualOptimizer should say that it does not support EqualTo/Zeros constraints if the optimizer does not support free variables
You can check that with supports_constraint(optimizer, MOI.VectorOfVariables, MOI.Reals)
We need to add a Zeros bridge that bridges F-in-Zeros into F-in-Nonnegatives and F-in-Nonpositives
That will be equivalent to the FreeBridge that you apply before the optimizer in you workaround
Except that you won't need the workaround anymore
Mathieu Besançon
@matbesancon
I'll submit a PR for a dualize! method which operates in-place, this allows pre-building a JuMP Model instead of hard-coding it as JuMP.Model()
Guilherme Bodin
@guilhermebodin
Ok!
Joaquim Dias Garcia
@joaquimg
It will delete some constraints and add other? Or you want primal and dual in the same problem?
Mathieu Besançon
@matbesancon

Something like

dualize!(dual_problem::JuMP.Model, primal_problem::JuMP.Model)

exactly the same as current but without creating the model in the dualize! function

it's useful if you need to initialize dual_problem in some special way
Guilherme Bodin
@guilhermebodin
The only thing left to go to MOI 0.9
Mathieu Besançon
@matbesancon
Are you sure the same version and build of the solver is used?
Guilherme Bodin
@guilhermebodin
I will double check
same version but different julias
travis is on julia 1.0.4 and I am on julia 1.0.3
Mathieu Besançon
@matbesancon
Upgrading patches is advised, the bugs can be tricky
Mathieu Besançon
@matbesancon
Guilherme Bodin
@guilhermebodin
Oh nice, I gonna give a look in these
Benoît Legat
@blegat
We should add in the README the syntax for using DualOptimizer with a list of which solver use the primal form and which one use the dual form