Skip to content

Commit 018a04c

Browse files
committed
FZN: add fallback for copying models.
1 parent b5b69a8 commit 018a04c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/FlatZinc/model.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ function _create_constraint(
152152
return index
153153
end
154154

155+
# Fallback for copying operations.
156+
function MOI.copy_to(dest::Optimizer, src::MOI.ModelLike; kwargs...)
157+
return MOUI.automatic_copy_to(dest, src; kwargs...)
158+
end
159+
160+
function MOIU.supports_default_copy_to(::Optimizer, ::Bool)
161+
return true
162+
end
163+
155164
# Names.
156165
# No support for constraint names in fzn, hence no ConstraintName.
157166

0 commit comments

Comments
 (0)