Commit 5d1265cc authored by Rémi's avatar Rémi
Browse files

Add some vhd files

parent 2026272f
......@@ -23,6 +23,7 @@ benchmarks/filtergeneration/solutions/wcpg/lowest_mcm/svg/*.svg
benchmarks/results/plots/*.tex
benchmarks/results/plots/*.pdf
vhdl/*.vhd
*.vhd
*.ods
*.ods#
......
using Gurobi
using CPLEX
using MATLAB
using Polynomials
using JuMP
......@@ -32,7 +32,7 @@ function one_step_method(instance; verbose::Bool=true)
fbands = [passband, stopband]
abands = [(1-deltapass, 1+deltapass), (0.0, deltastop)]
model = Model(Gurobi.Optimizer)
model = Model(CPLEX.Optimizer)
set_silent(model)
if wordlength >= 10
if wordlength >= 12
......@@ -155,10 +155,10 @@ function truncate_all(b0_init::Float64, b1_init::Float64, b2_init::Float64,
println("MCM for $instancename -- $wordlength")
@time begin
model = Model(Gurobi.Optimizer)
model = Model(CPLEX.Optimizer)
set_silent(model)
solution_b = mcm(model, [b0, b1, b2], wordlength=wordlength, use_nlp=false, ilp=1, use_big_m=true, avoid_internal_shifts = true)
model = Model(Gurobi.Optimizer)
model = Model(CPLEX.Optimizer)
set_silent(model)
solution_a = mcm(model, [a1, a2], wordlength=wordlength, use_nlp=false, ilp=1, use_big_m=true, avoid_internal_shifts = true)
end # @time begin
......@@ -282,10 +282,10 @@ function truncate(b0_init::Float64, b1_init::Float64, b2_init::Float64,
println("MCM for $instancename -- $wordlength --- varepsilon: $varepsilon")
@time begin
model = Model(Gurobi.Optimizer)
model = Model(CPLEX.Optimizer)
set_silent(model)
solution_b = mcm(model, [b0, b1, b2], wordlength=wordlength, use_nlp=false, ilp=1, use_big_m=true, avoid_internal_shifts = true)
model = Model(Gurobi.Optimizer)
model = Model(CPLEX.Optimizer)
set_silent(model)
solution_a = mcm(model, [a1, a2], wordlength=wordlength, use_nlp=false, ilp=1, use_big_m=true, avoid_internal_shifts = true)
end # @time begin
......@@ -601,7 +601,7 @@ function get_all_solutions()
fbands = [passband, stopband]
abands = [(1-deltapass, 1+deltapass), (0.0, deltastop)]
model = Model(Gurobi.Optimizer)
model = Model(CPLEX.Optimizer)
set_silent(model)
if wordlength >= 10
if wordlength >= 12
......@@ -830,9 +830,9 @@ function compute_all_mcm()
for solution in solutions
coefs_a = sort(collect(solution[1]))
coefs_b = sort(collect(solution[2]))
model = Model(Gurobi.Optimizer)
model = Model(CPLEX.Optimizer)
mcma = get!(mcm_values, (0, coefs_a[1], coefs_a[2]), length(mcm(model, coefs_a, avoid_internal_shifts=true)))
model = Model(Gurobi.Optimizer)
model = Model(CPLEX.Optimizer)
mcmb = get!(mcm_values, (coefs_b[1], coefs_b[2], coefs_b[3]), length(mcm(model, coefs_b, avoid_internal_shifts=true)))
write(io, "$(solution[1][1]);$(solution[1][2]);$(solution[2][1]);$(solution[2][2]);$(solution[2][3]);$(solution[3]);$(solution[4]);$(mcma);$(mcmb)\n")
end
......@@ -932,7 +932,7 @@ function plot_wcpg()
fbands = [passband, stopband]
abands = [(1-deltapass, 1+deltapass), (0.0, deltastop)]
for wordlength in wordlengths
model = Model(Gurobi.Optimizer)
model = Model(CPLEX.Optimizer)
set_silent(model)
if wordlength >= 10
if wordlength >= 12
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment