We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d228f97 commit af3795fCopy full SHA for af3795f
src/Chuffed.jl
@@ -13,6 +13,15 @@ module FZN
13
include("FlatZincOptimizer.jl")
14
end
15
16
+function run_chuffed(args)
17
+ io = IOBuffer()
18
+ Chuffed_jll.fznchuffed() do exe
19
+ return run(pipeline(`$(exe) $(args)`; stdout = io))
20
+ end
21
+ seekstart(io)
22
+ return String(take!(io))
23
+end
24
+
25
function Optimizer(; stdin::IO=stdin, stdout::IO=stdout)
26
return FZN.Optimizer(Chuffed_jll.run_chuffed; stdin=stdin, stdout=stdout)
27
test/parsing.jl
@@ -1,3 +1,8 @@
1
@testset "Parsing FlatZinc output format" begin
2
-
+ @testset "puzzle.fzn" begin
3
+ in_file_name = @__DIR__() * "/assets/puzzle.fzn"
4
+ out_string = Chuffed.run_chuffed(in_file_name)
5
+ @show out_string
6
+ @show Chuffed.FZN._parse_to_fznresults(out_string)
7
8
0 commit comments