@@ -406,16 +406,16 @@ function MOI.supports(
406406 return MOI. supports (b. model, attr)
407407end
408408
409- function MOIU . pass_nonvariable_constraints (
409+ function MOI . Utilities . pass_nonvariable_constraints (
410410 dest:: AbstractBridgeOptimizer ,
411411 src:: MOI.ModelLike ,
412- idxmap:: MOIU .IndexMap ,
412+ idxmap:: MOI.Utilities .IndexMap ,
413413 constraint_types,
414414)
415415 if Variable. has_bridges (Variable. bridges (dest))
416416 # The functions may contained bridged variables which needs to be
417417 # substituted so we use the fallback.
418- return MOIU . pass_nonvariable_constraints_fallback (
418+ return MOI . Utilities . pass_nonvariable_constraints_fallback (
419419 dest,
420420 src,
421421 idxmap,
@@ -431,29 +431,30 @@ function MOIU.pass_nonvariable_constraints(
431431 push! (not_bridged_types, (F, S))
432432 end
433433 end
434- MOIU . pass_nonvariable_constraints (
434+ MOI . Utilities . pass_nonvariable_constraints (
435435 dest. model,
436436 src,
437437 idxmap,
438438 not_bridged_types,
439439 )
440- MOIU. pass_nonvariable_constraints_fallback (dest, src, idxmap, bridged_types)
440+ MOI. Utilities. pass_nonvariable_constraints_fallback (
441+ dest,
442+ src,
443+ idxmap,
444+ bridged_types,
445+ )
441446 return
442447end
443448
444- function MOI. copy_to (
445- dest:: AbstractBridgeOptimizer ,
446- src:: MOI.ModelLike ;
447- kwargs... ,
448- )
449- return MOIU. default_copy_to (dest, src; kwargs... )
449+ function MOI. copy_to (dest:: AbstractBridgeOptimizer , src:: MOI.ModelLike )
450+ return MOI. Utilities. default_copy_to (dest, src)
450451end
451452
452453function MOI. supports_incremental_interface (b:: AbstractBridgeOptimizer )
453454 return MOI. supports_incremental_interface (b. model)
454455end
455- function MOIU . final_touch (uf:: AbstractBridgeOptimizer , index_map)
456- return MOIU . final_touch (uf. model, index_map)
456+ function MOI . Utilities . final_touch (uf:: AbstractBridgeOptimizer , index_map)
457+ return MOI . Utilities . final_touch (uf. model, index_map)
457458end
458459
459460# References
@@ -498,7 +499,7 @@ function _delete_variables_in_vector_of_variables_constraint(
498499 if MOI. supports_dimension_update (S)
499500 call_in_context (MOI. delete, b, ci, IndexInVector (i))
500501 else
501- MOIU . throw_delete_variable_in_vov (vi)
502+ MOI . Utilities . throw_delete_variable_in_vov (vi)
502503 end
503504 end
504505 end
@@ -576,7 +577,7 @@ function MOI.delete(b::AbstractBridgeOptimizer, vi::MOI.VariableIndex)
576577 )
577578 call_in_context (MOI. delete, b, vi, _index (b, vi)... )
578579 else
579- MOIU . throw_delete_variable_in_vov (vi)
580+ MOI . Utilities . throw_delete_variable_in_vov (vi)
580581 end
581582 else
582583 call_in_context (MOI. delete, b, vi)
@@ -657,7 +658,7 @@ function reduce_bridged(
657658 operate_variable_bridges!:: Function ,
658659 operate_constraint_bridges!:: Function ,
659660):: T where {T}
660- variable_function = F == MOIU . variable_function_type (S)
661+ variable_function = F == MOI . Utilities . variable_function_type (S)
661662 # A `F`-in-`S` could be added to the model either if it this constraint
662663 # is not bridged or if variables constrained on creations to `S` are not
663664 # bridged and `F` is `VariableIndex` or `VectorOfVariables`.
@@ -1308,7 +1309,7 @@ function MOI.get(
13081309 func = MOI. get (b. model, MOI. ConstraintFunction (), ci)
13091310 end
13101311 f = unbridged_function (b, func)
1311- set = MOIU . shift_constant (set, - MOI. constant (f))
1312+ set = MOI . Utilities . shift_constant (set, - MOI. constant (f))
13121313 end
13131314 return set
13141315end
@@ -1394,7 +1395,7 @@ function MOI.get(
13941395 vi:: MOI.VariableIndex ,
13951396)
13961397 if is_bridged (b, vi)
1397- return get (b. var_to_name, vi, MOIU . EMPTYSTRING)
1398+ return get (b. var_to_name, vi, MOI . Utilities . EMPTYSTRING)
13981399 else
13991400 return MOI. get (b. model, attr, vi)
14001401 end
@@ -1421,7 +1422,7 @@ function MOI.get(
14211422 constraint_index:: MOI.ConstraintIndex ,
14221423)
14231424 if is_bridged (b, constraint_index)
1424- return get (b. con_to_name, constraint_index, MOIU . EMPTYSTRING)
1425+ return get (b. con_to_name, constraint_index, MOI . Utilities . EMPTYSTRING)
14251426 else
14261427 return MOI. get (b. model, attr, constraint_index)
14271428 end
@@ -1478,11 +1479,11 @@ function MOI.get(
14781479 return vi
14791480 end
14801481 if b. name_to_var === nothing
1481- b. name_to_var = MOIU . build_name_to_var_map (b. var_to_name)
1482+ b. name_to_var = MOI . Utilities . build_name_to_var_map (b. var_to_name)
14821483 end
14831484 vi_bridged = get (b. name_to_var, name, nothing )
1484- MOIU . throw_if_multiple_with_name (vi_bridged, name)
1485- return MOIU . check_type_and_multiple_names (
1485+ MOI . Utilities . throw_if_multiple_with_name (vi_bridged, name)
1486+ return MOI . Utilities . check_type_and_multiple_names (
14861487 MOI. VariableIndex,
14871488 vi_bridged,
14881489 vi,
@@ -1501,7 +1502,7 @@ function MOI.get(
15011502 return MOI. get (b. model, IdxT, name)
15021503 end
15031504 if b. name_to_con === nothing
1504- b. name_to_con = MOIU . build_name_to_con_map (b. con_to_name)
1505+ b. name_to_con = MOI . Utilities . build_name_to_con_map (b. con_to_name)
15051506 end
15061507 if is_bridged (b, F, S)
15071508 # There is no `F`-in-`S` constraint in `b.model`, `ci` is only got
@@ -1511,8 +1512,13 @@ function MOI.get(
15111512 ci = MOI. get (b. model, IdxT, name)
15121513 end
15131514 ci_bridged = get (b. name_to_con, name, nothing )
1514- MOIU. throw_if_multiple_with_name (ci_bridged, name)
1515- return MOIU. check_type_and_multiple_names (IdxT, ci_bridged, ci, name)
1515+ MOI. Utilities. throw_if_multiple_with_name (ci_bridged, name)
1516+ return MOI. Utilities. check_type_and_multiple_names (
1517+ IdxT,
1518+ ci_bridged,
1519+ ci,
1520+ name,
1521+ )
15161522end
15171523
15181524function MOI. get (
@@ -1526,11 +1532,11 @@ function MOI.get(
15261532 return MOI. get (b. model, IdxT, name)
15271533 end
15281534 if b. name_to_con === nothing
1529- b. name_to_con = MOIU . build_name_to_con_map (b. con_to_name)
1535+ b. name_to_con = MOI . Utilities . build_name_to_con_map (b. con_to_name)
15301536 end
15311537 ci_bridged = get (b. name_to_con, name, nothing )
1532- MOIU . throw_if_multiple_with_name (ci_bridged, name)
1533- return MOIU . check_type_and_multiple_names (
1538+ MOI . Utilities . throw_if_multiple_with_name (ci_bridged, name)
1539+ return MOI . Utilities . check_type_and_multiple_names (
15341540 IdxT,
15351541 ci_bridged,
15361542 MOI. get (b. model, IdxT, name),
@@ -1910,7 +1916,7 @@ function bridged_function(bridge::AbstractBridgeOptimizer, value)
19101916 # We assume that the type of `value` is not altered. This restricts
19111917 # variable bridges to only return `ScalarAffineFunction` but otherwise,
19121918 # the peformance would be bad.
1913- return MOIU . substitute_variables (
1919+ return MOI . Utilities . substitute_variables (
19141920 vi -> bridged_variable_function (bridge, vi),
19151921 value,
19161922 ):: typeof (value)
@@ -1929,7 +1935,7 @@ end
19291935# Shortcut to avoid `Variable.throw_if_cannot_unbridge(Variable.bridges(b))`
19301936function bridge_function (
19311937 :: AbstractBridgeOptimizer ,
1932- value:: MOIU .ObjectOrTupleOrArrayWithoutIndex ,
1938+ value:: MOI.Utilities .ObjectOrTupleOrArrayWithoutIndex ,
19331939)
19341940 return value
19351941end
@@ -1974,7 +1980,7 @@ function unbridged_function(b::AbstractBridgeOptimizer, value)
19741980 # `unbridged_variable_function` hence it might silently return an incorrect
19751981 # value so we call `throw_if_cannot_unbridge` here.
19761982 Variable. throw_if_cannot_unbridge (Variable. bridges (b))
1977- return MOIU . substitute_variables (
1983+ return MOI . Utilities . substitute_variables (
19781984 vi -> unbridged_variable_function (b, vi),
19791985 value,
19801986 ):: typeof (value)
@@ -1990,7 +1996,7 @@ end
19901996# Shortcut to avoid `Variable.throw_if_cannot_unbridge(Variable.bridges(b))`
19911997function unbridged_function (
19921998 :: AbstractBridgeOptimizer ,
1993- value:: MOIU .ObjectOrTupleOrArrayWithoutIndex ,
1999+ value:: MOI.Utilities .ObjectOrTupleOrArrayWithoutIndex ,
19942000)
19952001 return value
19962002end
@@ -2028,7 +2034,7 @@ function bridged_constraint_function(
20282034 # `MOI.ConstraintSet`. See `unbridged_constraint_function`.
20292035 MOI. throw_if_scalar_and_constant_not_zero (func, typeof (set))
20302036 f = bridged_function (b, func):: typeof (func)
2031- return MOIU . normalize_constant (f, set)
2037+ return MOI . Utilities . normalize_constant (f, set)
20322038end
20332039
20342040function bridged_constraint_function (
0 commit comments