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": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": false | |
}, | |
"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 | |
}, | |
"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": null, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"# Kernel dies\n", | |
"for output in Task(() -> generatorproducer(m))\n", | |
" println(output)\n", | |
"end" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"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