Last active
December 2, 2016 02:21
-
-
Save oyamad/aca7ab8c93c299041631ddd2f1552663 to your computer and use it in GitHub Desktop.
LRSLib test failure
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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"https://github.com/oyamad/LRSLib.jl/commit/cae37b5caddf3cd8855e000d575dcc03b51dce12" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
" gmp v.6.1" | |
] | |
} | |
], | |
"source": [ | |
"using LRSLib\n", | |
"using Polyhedra" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"From [Polyhedra.jl/test/board.jl](https://github.com/blegat/Polyhedra.jl/blob/master/test/board.jl):" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"A1 = -eye(Int, 9) # x >= 0;\n", | |
"b1 = zeros(Int, 9);\n", | |
"A2 = eye(Int, 9) # x <= 1;\n", | |
"b2 = ones(Int, 9);\n", | |
"A3 = zeros(Int, 9, 9);\n", | |
"b3 = 3 * ones(Int, 9);\n", | |
"i = 1;\n", | |
"for a = 1:3\n", | |
"for b = (a+1):3\n", | |
" for c = 1:3\n", | |
" for d = (c+1):3\n", | |
" ac = a + (c-1) * 3\n", | |
" ad = a + (d-1) * 3\n", | |
" bc = b + (c-1) * 3\n", | |
" bd = b + (d-1) * 3\n", | |
" A3[i, ac] = 1\n", | |
" A3[i, ad] = 1\n", | |
" A3[i, bc] = 1\n", | |
" A3[i, bd] = 1\n", | |
" i += 1\n", | |
" end\n", | |
" end\n", | |
"end\n", | |
"end;\n", | |
"A = [A1; A2; A3];\n", | |
"b = [b1; b2; b3];\n", | |
"ine = SimpleHRepresentation(A, b);" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"lib = LRSLibrary()\n", | |
"p = polyhedron(ine, lib);" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"LRSLib.LRSInequalityMatrix{9}" | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"m = LRSLib.getinem(p, :Fresh)\n", | |
"typeof(m)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"it = 1\n", | |
"output = Rational{BigInt}[1//1,0//1,0//1,0//1,0//1,0//1,0//1,0//1,0//1,0//1]\n", | |
"it = 2\n", | |
"output = nothing\n", | |
"it = 3\n", | |
"output = nothing\n", | |
"it = 4\n", | |
"output = nothing\n", | |
"it = 5\n", | |
"output = nothing\n", | |
"it = 6\n", | |
"output = nothing\n", | |
"it = 7\n", | |
"output = nothing\n", | |
"it = 8\n", | |
"output = nothing\n", | |
"it = 9\n", | |
"output = nothing\n", | |
"it = 10\n", | |
"output = nothing\n", | |
"flag = LRSLib.getnextbasis(m) = true\n", | |
"it = 11\n", | |
"output = Rational{BigInt}[1//1,1//2,1//1,1//1,1//1,1//2,0//1,1//1,1//2,1//2]\n", | |
"it = 12\n", | |
"output = nothing\n", | |
"it = 13\n", | |
"output = nothing\n", | |
"it = 14\n", | |
"output = nothing\n", | |
"it = 15\n", | |
"output = nothing\n", | |
"it = 16\n", | |
"output = nothing\n", | |
"it = 17\n", | |
"output = nothing\n", | |
"it = 18\n", | |
"output = nothing\n", | |
"it = 19\n", | |
"output = nothing\n", | |
"it = 20\n", | |
"output = nothing\n", | |
"flag = LRSLib.getnextbasis(m) = true\n", | |
"it = 21\n", | |
"output = Rational{BigInt}[1//1,1//1,1//2,1//1,1//1,1//2,0//1,1//1,1//2,0//1]\n", | |
"it = 22\n", | |
"output = nothing\n", | |
"it = 23\n", | |
"output = nothing\n", | |
"it = 24\n", | |
"output = nothing\n", | |
"it = 25\n", | |
"output = nothing\n", | |
"it = 26\n", | |
"output = nothing\n", | |
"it = 27\n", | |
"output = nothing\n", | |
"it = 28\n", | |
"output = nothing\n", | |
"it = 29\n", | |
"output = nothing\n", | |
"it = 30\n", | |
"output = nothing\n", | |
"flag = LRSLib.getnextbasis(m) = true\n", | |
"it = 31\n", | |
"output = nothing\n", | |
"it = 32\n", | |
"output = nothing\n", | |
"it = 33\n", | |
"output = nothing\n", | |
"it = 34\n", | |
"output = nothing\n", | |
"it = 35\n", | |
"output = nothing\n", | |
"it = 36\n", | |
"output = nothing\n", | |
"it = 37\n", | |
"output = nothing\n", | |
"it = 38\n", | |
"output = nothing\n", | |
"it = 39\n", | |
"output = nothing\n", | |
"it = 40\n", | |
"output = nothing\n", | |
"flag = LRSLib.getnextbasis(m) = true\n", | |
"it = 41\n", | |
"output = nothing\n", | |
"it = 42\n", | |
"output = nothing\n", | |
"it = 43\n", | |
"output = nothing\n", | |
"it = 44\n", | |
"output = nothing\n", | |
"it = 45\n", | |
"output = nothing\n", | |
"it = 46\n", | |
"output = nothing\n", | |
"it = 47\n", | |
"output = nothing\n", | |
"it = 48\n", | |
"output = nothing\n", | |
"it = 49\n", | |
"output = nothing\n", | |
"it = 50\n", | |
"output = nothing\n", | |
"flag = LRSLib.getnextbasis(m) = true\n", | |
"it = 51\n", | |
"output = nothing\n", | |
"it = 52\n", | |
"output = nothing\n", | |
"it = 53\n", | |
"output = nothing\n", | |
"it = 54\n", | |
"output = nothing\n", | |
"it = 55\n", | |
"output = nothing\n", | |
"it = 56\n", | |
"output = nothing\n", | |
"it = 57\n", | |
"output = nothing\n", | |
"it = 58\n", | |
"output = nothing\n", | |
"it = 59\n", | |
"output = nothing\n", | |
"it = 60\n", | |
"output = nothing\n", | |
"flag = LRSLib.getnextbasis(m) = true\n", | |
"it = 61\n", | |
"output = Rational{BigInt}[1//1,1//1,1//2,0//1,1//1,1//2,0//1,1//1,1//2,0//1]\n", | |
"it = 62\n", | |
"output = nothing\n", | |
"it = 63\n", | |
"output = nothing\n", | |
"it = 64\n", | |
"output = nothing\n", | |
"it = 65\n", | |
"output = nothing\n", | |
"it = 66\n", | |
"output = nothing\n", | |
"it = 67\n", | |
"output = nothing\n", | |
"it = 68\n", | |
"output = nothing\n", | |
"it = 69\n", | |
"output = nothing\n", | |
"it = 70\n", | |
"output = nothing\n", | |
"flag = LRSLib.getnextbasis(m) = true\n", | |
"it = 71\n", | |
"output = Rational{BigInt}[1//1,1//1,1//2,1//2,1//1,1//2,1//2,1//1,1//2,1//2]\n", | |
"it = 72\n", | |
"output = nothing\n", | |
"it = 73\n", | |
"output = nothing\n", | |
"it = 74\n", | |
"output = nothing\n", | |
"it = 75\n", | |
"output = nothing\n", | |
"it = 76\n", | |
"output = nothing\n", | |
"it = 77\n", | |
"output = nothing\n", | |
"it = 78\n", | |
"output = nothing\n", | |
"it = 79\n", | |
"output = nothing\n", | |
"it = 80\n", | |
"output = nothing\n", | |
"flag = LRSLib.getnextbasis(m) = false\n" | |
] | |
} | |
], | |
"source": [ | |
"it = 1\n", | |
"while true\n", | |
" for col in 0:LRSLib.getd(m)\n", | |
" @show it\n", | |
" output = LRSLib.getsolution(m, col)\n", | |
" @show output\n", | |
" #if output !== nothing\n", | |
" # produce(output)\n", | |
" #end\n", | |
" it += 1\n", | |
" end\n", | |
" @show flag = LRSLib.getnextbasis(m)\n", | |
" if !flag\n", | |
" break\n", | |
" end\n", | |
"end" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"anaconda-cloud": {}, | |
"kernelspec": { | |
"display_name": "Julia 0.5.0", | |
"language": "julia", | |
"name": "julia-0.5" | |
}, | |
"language_info": { | |
"file_extension": ".jl", | |
"mimetype": "application/julia", | |
"name": "julia", | |
"version": "0.5.0" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment