Commit 4f65eeed authored by Rémi's avatar Rémi
Browse files

Typo + Symbreak

parent dcd3e484
......@@ -108,8 +108,8 @@ function iir_ilp1!(model::Model,
subtraction = [value(model[:cai_right_shsg][i]) < 0, value(model[:cai_left_sg][i]) < 0]
push_node!(solution.addergraph_a,
AdderNode(round(Int, value(model[:ca][i])),
[InputEdge(get_addernode_by_value(addergraph, round(Int, value(model[:cai][i,1]))), input_shift+node_shift, subtraction[1]),
InputEdge(get_addernode_by_value(addergraph, round(Int, value(model[:cai][i,2]))), node_shift, subtraction[2])]
[InputEdge(get_addernode_by_value(solution.addergraph_a, round(Int, value(model[:cai][i,1]))), input_shift+node_shift, subtraction[1]),
InputEdge(get_addernode_by_value(solution.addergraph_a, round(Int, value(model[:cai][i,2]))), node_shift, subtraction[2])]
))
end
end
......@@ -133,8 +133,8 @@ function iir_ilp1!(model::Model,
subtraction = [value(model[:cai_right_shsg][i]) < 0, value(model[:cai_left_sg][i]) < 0]
push_node!(solution.addergraph_b,
AdderNode(round(Int, value(model[:ca][i])),
[InputEdge(get_addernode_by_value(addergraph, round(Int, value(model[:cai][i,1]))), input_shift+node_shift, subtraction[1]),
InputEdge(get_addernode_by_value(addergraph, round(Int, value(model[:cai][i,2]))), node_shift, subtraction[2])]
[InputEdge(get_addernode_by_value(solution.addergraph_b, round(Int, value(model[:cai][i,1]))), input_shift+node_shift, subtraction[1]),
InputEdge(get_addernode_by_value(solution.addergraph_b, round(Int, value(model[:cai][i,2]))), node_shift, subtraction[2])]
))
end
end
......
......@@ -44,6 +44,7 @@ function mcm_ilp_odd!(model::Model, C::Tuple{Vector{VariableRef}, Vector{Variabl
fix(samemcm[0,i], 1, force=true)
end
@constraint(model, [i in 1:NA], mcma[i] + mcmb[i] == 1)
@constraint(model, [i in 1:(NA-1)], mcma[i+1] <= mcma[a])
@constraint(model, [k in 1:NA, l in (k+1):NA], 2*samemcm[k,l] >= mcma[k]+mcma[l]-1)
@constraint(model, [k in 1:NA, l in (k+1):NA], 2*samemcm[k,l] >= mcmb[k]+mcmb[l]-1)
@constraint(model, [k in 1:NA, l in (k+1):NA], mcma[k]+mcma[l]+1 == 2*mcmbin[k,l]+samemcm[k,l])
......
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