|
5 | 5 | # in the LICENSE.md file or at https://opensource.org/licenses/MIT. |
6 | 6 |
|
7 | 7 | function precompile_constraint(model, F, S) |
8 | | - Base.precompile(get, (model, ListOfConstraintIndices{F,S})) |
9 | | - Base.precompile(get, (model, ListOfConstraintAttributesSet{F,S})) |
10 | | - Base.precompile(get, (model, ConstraintSet, ConstraintIndex{F,S})) |
11 | | - Base.precompile(get, (model, ConstraintSet, Vector{ConstraintIndex{F,S}})) |
12 | | - Base.precompile(set, (model, ConstraintSet, ConstraintIndex{F,S}, S)) |
13 | | - |
14 | | - Base.precompile(get, (model, ConstraintFunction, ConstraintIndex{F,S})) |
15 | | - Base.precompile(set, (model, ConstraintFunction, ConstraintIndex{F,S}, F)) |
16 | | - Base.precompile( |
17 | | - get, |
18 | | - (model, ConstraintFunction, Vector{ConstraintIndex{F,S}}), |
19 | | - ) |
20 | | - |
21 | | - Base.precompile(get, (model, ConstraintDual, ConstraintIndex{F,S})) |
22 | | - Base.precompile(get, (model, ConstraintPrimal, ConstraintIndex{F,S})) |
23 | | - |
24 | | - Base.precompile( |
25 | | - get, |
26 | | - (model, AbstractConstraintAttribute, ConstraintIndex{F,S}), |
27 | | - ) |
28 | | - Base.precompile( |
29 | | - get, |
30 | | - (model, AbstractConstraintAttribute, Vector{ConstraintIndex{F,S}}), |
31 | | - ) |
32 | | - |
33 | | - Base.precompile(add_constraint, (model, F, S)) |
34 | | - Base.precompile(add_constraints, (model, Vector{F}, Vector{S})) |
35 | | - Base.precompile(delete, (model, ConstraintIndex{F,S})) |
36 | | - Base.precompile(is_valid, (model, ConstraintIndex{F,S})) |
37 | | - Base.precompile(get, (model, ConstraintName, ConstraintIndex{F,S})) |
38 | | - return Base.precompile( |
39 | | - set, |
40 | | - (model, ConstraintName, ConstraintIndex{F,S}, String), |
41 | | - ) |
| 8 | + @warn("This function is deprecated. Use PrecompileTools.jl instead") |
| 9 | + return |
42 | 10 | end |
43 | 11 |
|
44 | 12 | function precompile_variables(model) |
45 | | - Base.precompile(delete, (model, VariableIndex)) |
46 | | - Base.precompile(delete, (model, Vector{VariableIndex})) |
47 | | - Base.precompile(get, (model, AbstractVariableAttribute, VariableIndex)) |
48 | | - Base.precompile( |
49 | | - get, |
50 | | - (model, AbstractVariableAttribute, Vector{VariableIndex}), |
51 | | - ) |
52 | | - Base.precompile(get, (model, VariableName, VariableIndex)) |
53 | | - Base.precompile(set, (model, VariableName, VariableIndex, String)) |
54 | | - Base.precompile(get, (model, VariablePrimalStart, VariableIndex)) |
55 | | - Base.precompile(set, (model, VariablePrimalStart, VariableIndex, Float64)) |
56 | | - Base.precompile(get, (model, VariablePrimalStart, Vector{VariableIndex})) |
57 | | - Base.precompile( |
58 | | - set, |
59 | | - (model, VariablePrimalStart, Vector{VariableIndex}, Vector{Float64}), |
60 | | - ) |
61 | | - Base.precompile(get, (model, VariablePrimal, VariableIndex)) |
62 | | - Base.precompile(get, (model, VariablePrimal, Vector{VariableIndex})) |
63 | | - return Base.precompile(add_constrained_variables, (model, Reals)) |
| 13 | + @warn("This function is deprecated. Use PrecompileTools.jl instead") |
| 14 | + return |
64 | 15 | end |
65 | 16 |
|
66 | 17 | function precompile_model(model, constraints) |
67 | | - Base.precompile(empty!, (model,)) |
68 | | - Base.precompile(is_empty, (model,)) |
69 | | - Base.precompile(get, (model, ListOfConstraintTypesPresent)) |
70 | | - Base.precompile(optimize!, (model,)) |
71 | | - Base.precompile(add_variable, (model,)) |
72 | | - Base.precompile(add_variables, (model, Int)) |
73 | | - for attr in ( |
74 | | - ListOfVariableIndices, |
75 | | - ListOfVariableAttributesSet, |
76 | | - TerminationStatus, |
77 | | - DualStatus, |
78 | | - PrimalStatus, |
79 | | - ObjectiveValue, |
80 | | - Silent, |
81 | | - TimeLimitSec, |
82 | | - NumberOfVariables, |
83 | | - ) |
84 | | - Base.precompile(get, (model, attr)) |
85 | | - end |
86 | | - |
87 | | - precompile_variables(model) |
88 | | - for (F, S) in constraints |
89 | | - precompile_constraint(model, F, S) |
90 | | - end |
91 | | - return Base.precompile(Tuple{typeof(add_constrained_variables),model,Reals}) |
92 | | -end |
93 | | - |
94 | | -function _precompile_() |
95 | | - return Base.precompile( |
96 | | - Tuple{ |
97 | | - Core.kwftype(typeof(instantiate)), |
98 | | - NamedTuple{(:with_bridge_type,),Tuple{DataType}}, |
99 | | - typeof(instantiate), |
100 | | - Type, |
101 | | - }, |
102 | | - ) # time: 0.481656 |
| 18 | + @warn("This function is deprecated. Use PrecompileTools.jl instead") |
| 19 | + return |
103 | 20 | end |
0 commit comments