@@ -2710,55 +2710,6 @@ function attribute_value_type(::ConstraintConflictStatus)
27102710 return ConflictParticipationStatusCode
27112711end
27122712
2713- """
2714- ListOfConstraintIndicesInConflict(conflict_index::Int = 1)
2715-
2716- An [`AbstractModelAttribute`](@ref) for the `Vector{ConstraintIndex}` of all
2717- constraints that participate in the conflict with index `conflict_index`.
2718-
2719- The `conflict_index` is 1 by default, but it can be set to any value between
2720- 1 and the number of conflicts found by the solver, as indicated by
2721- [`ConflictCount`](@ref).
2722-
2723- ## Implementation
2724- Optimizers may implement the following methods:
2725- ```julia
2726- MOI.get(
2727- ::Optimizer,
2728- ::MOI.ListOfConstraintIndicesInConflict,
2729- )::Vector{MOI.ConstraintIndex}
2730- ```
2731- A ineficient fallback is available for `get`.
2732- They should not implement [`set`](@ref) or [`supports`](@ref).
2733- """
2734- struct ListOfConstraintIndicesInConflict <: MOI.AbstractModelAttribute
2735- conflict_index:: Int
2736- ListOfConstraintIndicesInConflict (conflict_index = 1 ) = new (conflict_index)
2737- end
2738-
2739- function attribute_value_type (:: ListOfConstraintIndicesInConflict )
2740- return Vector{ConstraintIndex}
2741- end
2742-
2743- function get (
2744- model:: ModelLike ,
2745- attr:: ListOfConstraintIndicesInConflict ,
2746- ):: Vector{ConstraintIndex}
2747- result = Vector {ConstraintIndex} ()
2748- conflict_index = attr. conflict_index
2749- constraint_types = get (model, ListOfConstraintTypesPresent ())
2750- for (F, S) in constraint_types
2751- constraints = MOI. get (model, ListOfConstraintIndices {F,S} ())
2752- for con in constraints
2753- status = get (model, ConstraintConflictStatus (conflict_index), con)
2754- if status == NOT_IN_CONFLICT
2755- push! (result, con)
2756- end
2757- end
2758- end
2759- return result
2760- end
2761-
27622713"""
27632714 UserDefinedFunction(name::Symbol, arity::Int) <: AbstractModelAttribute
27642715
0 commit comments