Skip to content

Commit

Permalink
Integrate Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromxavier committed Nov 26, 2023
1 parent 6896b56 commit f4b072a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 25 deletions.
3 changes: 0 additions & 3 deletions src/compiler/constraints.jl
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ function constraint(

return g^2 + h
end
<<<<<<< HEAD

function constraint(
model::Virtual.Model{T},
Expand Down Expand Up @@ -619,5 +618,3 @@ function encoding_constraints!(model::Virtual.Model{T}, ::AbstractArchitecture)

return nothing
end
=======
>>>>>>> origin/master
3 changes: 0 additions & 3 deletions src/compiler/error.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ end

function compilation_error(msg::Union{Nothing,String} = nothing)
throw(CompilationError(msg))
<<<<<<< HEAD
=======

return nothing
end
Expand All @@ -36,5 +34,4 @@ function compilation_error!(model::Virtual.Model, msg::Union{Nothing,String} = n
compilation_error(msg)

return nothing
>>>>>>> origin/master
end
15 changes: 0 additions & 15 deletions src/compiler/variables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,9 @@ function variable_𝔹!(model::Virtual.Model{T}, i::Union{VI,CI}) where {T}
return Encoding.encode!(model, i, Encoding.Mirror{T}())
end

<<<<<<< HEAD
function variable_ℤ!(model::Virtual.Model{T}, x::VI, (a, b)::Tuple{A,B}) where {T,A<:Union{T,Nothing},B<:Union{T,Nothing}}
if !isnothing(a) && !isnothing(b)
let e = Attributes.variable_encoding_method(model, x)
=======
function variable_ℤ!(model::Virtual.Model{T}, vi::VI, (a, b)::Tuple{T,T}) where {T}
if isnothing(a) || isnothing(b)
error("Unbounded variable $(vi) ∈ ℤ")
else
let e = Attributes.variable_encoding_method(model, vi)
>>>>>>> origin/master
S = (a, b)

return Encoding.encode!(model, vi, e, S)
Expand All @@ -134,15 +126,8 @@ function variable_ℤ!(model::Virtual.Model{T}, ci::CI, (a, b)::Tuple{T,T}) wher
end
end

<<<<<<< HEAD
function variable_ℝ!(model::Virtual.Model{T}, x::VI, (a, b)::Tuple{A,B}) where {T,A<:Union{T,Nothing},B<:Union{T,Nothing}}
if !isnothing(a) && !isnothing(b)
=======
function variable_ℝ!(model::Virtual.Model{T}, vi::VI, (a, b)::Tuple{T,T}) where {T}
if isnothing(a) || isnothing(b)
error("Unbounded variable $(vi) ∈ ℝ")
else
>>>>>>> origin/master
# TODO: Solve this bit-guessing magic??? (DONE)
# IDEA:
# Let x̂ ~ U[a, b], K = 2ᴺ, γ = [a, b]
Expand Down
4 changes: 0 additions & 4 deletions src/encoding/variables/interval/binary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,10 @@ function encode(var::Function, e::Binary{T}, S::Tuple{T,T}; tol::Union{T,Nothing
a, b = integer_interval(S)

if a == b
<<<<<<< HEAD
return (VI[], PBO.PBF{VI,T}(a), nothing)
=======
y = VI[]
ξ = PBO.PBF{VI,T}(a)

return (y, ξ, nothing)
>>>>>>> origin/master
end

M = trunc(Int, b - a)
Expand Down

0 comments on commit f4b072a

Please sign in to comment.