Created
August 17, 2016 02:30
-
-
Save mlubin/6bc8d916d44e9766056bb582dea4b5da to your computer and use it in GitHub Desktop.
Optimal problem declared dual infeasible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ECOS, ConicIP | |
c = [0.163973846,0.533179677,1.09407106,0.182902458,0.554139215,0.567489093,0.731063981,0.149004507,1.64458497,0.14275369,8137.86778,2852.37715,7957.49463,11317.1837,22038.7814,9512.84638,32448.222,4601.27644,12316.0304,2771.71585,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0] | |
b = [-16670.1538,0.0,0.0,1.41421356,0.0,0.0,1.41421356,0.0,0.0,1.41421356,0.0,0.0,1.41421356,0.0,0.0,1.41421356,0.0,0.0,1.41421356,0.0,0.0,1.41421356,0.0,0.0,1.41421356,0.0,0.0,1.41421356,0.0,0.0,1.41421356,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0] | |
con_cones = [(:NonPos,[1]),(:Zero,[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]),(:SOC,[32,33,34]),(:SOC,[35,36,37]),(:SOC,[38,39,40]),(:SOC,[41,42,43]),(:SOC,[44,45,46]),(:SOC,[47,48,49]),(:SOC,[50,51,52]),(:SOC,[53,54,55]),(:SOC,[56,57,58]),(:SOC,[59,60,61])] | |
var_cones = [(:NonNeg,[1,2,3,4,5,6,7,8,9,10]),(:Free,[11,12,13,14,15,16,17,18,19,20]),(:Free,[21,22,23]),(:Free,[24,25,26]),(:Free,[27,28,29]),(:Free,[30,31,32]),(:Free,[33,34,35]),(:Free,[36,37,38]),(:Free,[39,40,41]),(:Free,[42,43,44]),(:Free,[45,46,47]),(:Free,[48,49,50])] | |
I = [1,2,1,5,1,8,11,1,14,1,17,1,20,1,23,1,26,1,29,3,6,9,12,15,18,21,24,27,30,2,32,33,3,32,33,4,34,5,35,36,6,35,36,7,37,8,38,39,9,38,39,10,40,11,41,42,12,41,42,13,43,14,44,45,15,44,45,16,46,17,47,48,18,47,48,19,49,20,50,51,21,50,51,22,52,23,53,54,24,53,54,25,55,26,56,57,27,56,57,28,58,29,59,60,30,59,60,31,61] | |
J = [1,1,2,2,3,3,4,5,5,6,6,7,7,8,8,9,9,10,10,11,12,13,14,15,16,17,18,19,20,21,21,21,22,22,22,23,23,24,24,24,25,25,25,26,26,27,27,27,28,28,28,29,29,30,30,30,31,31,31,32,32,33,33,33,34,34,34,35,35,36,36,36,37,37,37,38,38,39,39,39,40,40,40,41,41,42,42,42,43,43,43,44,44,45,45,45,46,46,46,47,47,48,48,48,49,49,49,50,50] | |
V = [-0.230769231,-1.0,-0.692307692,-1.0,-0.692307692,-1.0,-1.0,-0.384615385,-1.0,-0.230769231,-1.0,-0.846153846,-1.0,-0.0769230769,-1.0,-1.0,-1.0,-0.230769231,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,1.0,-1.0,-1.0,1.0,-1.0,1.0,1.0,-1.4142135623730951,1.0,-1.0,-1.0,1.0,-1.0,1.0,1.0,-1.4142135623730951,1.0,-1.0,-1.0,1.0,-1.0,1.0,1.0,-1.4142135623730951,1.0,-1.0,-1.0,1.0,-1.0,1.0,1.0,-1.4142135623730951,1.0,-1.0,-1.0,1.0,-1.0,1.0,1.0,-1.4142135623730951,1.0,-1.0,-1.0,1.0,-1.0,1.0,1.0,-1.4142135623730951,1.0,-1.0,-1.0,1.0,-1.0,1.0,1.0,-1.4142135623730951,1.0,-1.0,-1.0,1.0,-1.0,1.0,1.0,-1.4142135623730951,1.0,-1.0,-1.0,1.0,-1.0,1.0,1.0,-1.4142135623730951,1.0,-1.0,-1.0,1.0,-1.0,1.0,1.0,-1.4142135623730951] | |
A = sparse(I,J,V,length(b),length(c)) | |
for solver in (ECOSSolver(),ConicIPSolver(verbose=true)) | |
m = MathProgBase.ConicModel(solver) | |
MathProgBase.loadproblem!(m, c, A, b, con_cones, var_cones) | |
MathProgBase.optimize!(m) | |
@show MathProgBase.status(m) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment