/
core.jl
48 lines (37 loc) · 1.04 KB
/
core.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
mutable struct BLProblem <: Metaheuristics.AbstractProblem
ul::Metaheuristics.Problem
ll::Metaheuristics.Problem
end
"""
BLInformation(ul, ll)
`BLInformation` stores information `Information` about problems at each level (upper
and lower level).
"""
struct BLInformation
ul::Metaheuristics.Information
ll::Metaheuristics.Information
end
function Base.show(io::IO, blinfo::BLInformation)
println(io, "Upper-level information:")
Base.show(io, blinfo.ul)
println(io, "\nLower-level information:")
Base.show(io, blinfo.ll)
end
"""
BLOptions(ul, ll)
`BLOptions` stores common settings `Options` for metaheuristics at each level (upper
and lower level).
"""
struct BLOptions
ul::Metaheuristics.Options
ll::Metaheuristics.Options
end
function Base.show(io::IO, bloptions::BLOptions)
println(io, "Upper-level options:")
Base.show(io, bloptions.ul)
println(io, "\nLower-level options:")
Base.show(io, bloptions.ll)
end
include("BLIndividual.jl")
include("BLState.jl")
include("BLAlgorithm.jl")