Skip to content

Commit

Permalink
Fixed bug when selecting several infill points
Browse files Browse the repository at this point in the history
  • Loading branch information
MrUrq committed Feb 17, 2020
1 parent ec0bc0c commit d5fb159
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 44 deletions.
90 changes: 51 additions & 39 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# This file is machine-generated - editing it directly is not advised

[[Arpack]]
deps = ["BinaryProvider", "Libdl", "LinearAlgebra"]
git-tree-sha1 = "07a2c077bdd4b6d23a40342a8a108e2ee5e58ab6"
deps = ["Arpack_jll", "Libdl", "LinearAlgebra"]
git-tree-sha1 = "2ff92b71ba1747c5fdd541f8fc87736d82f40ec9"
uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97"
version = "0.3.1"
version = "0.4.0"

[[Arpack_jll]]
deps = ["Libdl", "OpenBLAS_jll", "Pkg"]
git-tree-sha1 = "68a90a692ddc0eb72d69a6993ca26e2a923bf195"
uuid = "68821587-b530-5797-8361-c406ea357684"
version = "3.5.0+2"

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[BinDeps]]
deps = ["Compat", "Libdl", "SHA", "URIParser"]
git-tree-sha1 = "12093ca6cdd0ee547c39b1870e0c9c3f154d9ca9"
uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
version = "0.8.10"

[[BinaryProvider]]
deps = ["Libdl", "SHA"]
git-tree-sha1 = "5b08ed6036d9d3f0ee6369410b830f8873d4024c"
Expand All @@ -33,16 +33,16 @@ uuid = "a9c8d775-2e2e-55fc-8582-045d282d599e"
version = "1.0.0"

[[Combinatorics]]
deps = ["LinearAlgebra", "Polynomials", "Test"]
git-tree-sha1 = "50b3ae4d643dc27eaff69fb6be06ee094d5500c9"
deps = ["Polynomials"]
git-tree-sha1 = "140cc833258df8e5aafabdb068875ac0c256be23"
uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
version = "0.7.0"
version = "1.0.0"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "ed2c4abadf84c53d9e58510b5fc48912c2336fbb"
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "a4839bd26e3e7f4869a4cf6c31f9f93f47aac7c5"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "2.2.0"
version = "3.5.0"

[[DataAPI]]
git-tree-sha1 = "674b67f344687a88310213ddfa8a2b3c76cc4252"
Expand All @@ -51,9 +51,9 @@ version = "1.1.0"

[[DataStructures]]
deps = ["InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "1fe8fad5fc84686dcbc674aa255bc867a64f8132"
git-tree-sha1 = "b7720de347734f4716d1815b00ce5664ed6bbfd4"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.17.5"
version = "0.17.9"

[[Dates]]
deps = ["Printf"]
Expand All @@ -74,10 +74,16 @@ deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[Distributions]]
deps = ["LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"]
git-tree-sha1 = "ce189b71fac635d6ec9582dc0f208887db25e6d3"
deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"]
git-tree-sha1 = "6b19601c0e98de3a8964ed33ad73e130c7165b1d"
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
version = "0.21.8"
version = "0.22.4"

[[FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays"]
git-tree-sha1 = "fec413d4fc547992eb62a5c544cedb6d7853c1f5"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "0.8.4"

[[InteractiveUtils]]
deps = ["Markdown"]
Expand Down Expand Up @@ -121,6 +127,18 @@ git-tree-sha1 = "f47c5d97cf9a8caefa47e9fa9d99d8fda1a65154"
uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce"
version = "0.4.3"

[[OpenBLAS_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "e2551d7c25d52f35b76d86a50917a3ba8988f519"
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.7+5"

[[OpenSpecFun_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "65f672edebf3f4e613ddf37db9dcbd7a407e5e90"
uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
version = "0.5.3+1"

[[OrderedCollections]]
deps = ["Random", "Serialization", "Test"]
git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1"
Expand All @@ -129,9 +147,9 @@ version = "1.1.0"

[[PDMats]]
deps = ["Arpack", "LinearAlgebra", "SparseArrays", "SuiteSparse", "Test"]
git-tree-sha1 = "035f8d60ba2a22cb1d2580b1e0e5ce0cb05e4563"
git-tree-sha1 = "5f303510529486bb02ac4d70da8295da38302194"
uuid = "90014a1f-27ba-587c-ab20-58faa44d9150"
version = "0.9.10"
version = "0.9.11"

[[Parameters]]
deps = ["OrderedCollections"]
Expand All @@ -140,7 +158,7 @@ uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a"
version = "0.12.0"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Test", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Polynomials]]
Expand All @@ -155,9 +173,9 @@ uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[QuadGK]]
deps = ["DataStructures", "LinearAlgebra"]
git-tree-sha1 = "1af46bf083b9630a5b27d4fd94f496c5fca642a8"
git-tree-sha1 = "dc84e810393cfc6294248c9032a9cdacc14a3db4"
uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
version = "2.1.1"
version = "2.3.1"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
Expand All @@ -174,9 +192,9 @@ version = "0.7.0"

[[Rmath]]
deps = ["BinaryProvider", "Libdl", "Random", "Statistics"]
git-tree-sha1 = "9825383d3453f4606d77f0a5722495f38001c09e"
git-tree-sha1 = "2bbddcb984a1d08612d0c4abb5b4774883f6fa98"
uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa"
version = "0.5.1"
version = "0.6.0"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
Expand Down Expand Up @@ -214,10 +232,10 @@ uuid = "d4ead438-fe20-5cc5-a293-4fd39a41b74c"
version = "0.1.2"

[[SpecialFunctions]]
deps = ["BinDeps", "BinaryProvider", "Libdl"]
git-tree-sha1 = "3bdd374b6fd78faf0119b8c5d538788dbf910c6e"
deps = ["OpenSpecFun_jll"]
git-tree-sha1 = "e19b98acb182567bcb7b75bb5d9eedf3a3b5ec6c"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "0.8.0"
version = "0.10.0"

[[StaticArrays]]
deps = ["LinearAlgebra", "Random", "Statistics"]
Expand All @@ -237,12 +255,12 @@ version = "0.32.0"

[[StatsFuns]]
deps = ["Rmath", "SpecialFunctions"]
git-tree-sha1 = "67745a79d8e83a83737a7e17a383c54720a97f41"
git-tree-sha1 = "f290ddd5fdedeadd10e961eb3f4d3340f09d030a"
uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
version = "0.9.0"
version = "0.9.4"

[[SuiteSparse]]
deps = ["Libdl", "LinearAlgebra", "SparseArrays"]
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"

[[Test]]
Expand All @@ -255,12 +273,6 @@ git-tree-sha1 = "311765af81bbb48d7bad01fb016d9c328c6ede03"
uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
version = "0.5.3"

[[URIParser]]
deps = ["Test", "Unicode"]
git-tree-sha1 = "6ddf8244220dfda2f17539fa8c9de20d6c575b69"
uuid = "30578b45-9adc-5946-b283-645ec420af67"
version = "0.4.0"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
Expand Down
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SurrogateModelOptim"
uuid = "dc3f66f6-feed-11e8-2006-85573fddfdbc"
authors = ["Magnus Urquhart <[email protected]>"]
version = "0.4.1"
version = "0.4.2"

[deps]
BlackBoxOptim = "a134a8b2-14d6-55f6-9291-3336d3ab0209"
Expand All @@ -16,6 +16,7 @@ ScatteredInterpolation = "3f865c0f-6dca-5f4d-999b-29fe1e7e3c92"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"

[compat]
Expand Down
11 changes: 7 additions & 4 deletions src/model_infill_utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,13 @@ function infill_opt(search_range,infill_iterations,num_infill_points,infill_obj_
infill_obj_funs = Iterators.take(Base.Iterators.cycle(1:length(infill_funcs[1:num_infill_points])), num_infill_points)

for i in infill_obj_funs
# pf = pareto_frontier(res_bboptim)
# best_obj1, idx_obj1 = findmin(map(elm -> fitness(elm)[i], pf))
# bo1_solution = BlackBoxOptim.params(pf[idx_obj1]) # get the solution candidate itself...
bo1_solution = best_candidate(res_bboptim)
if length(infill_obj_funs) > 1
pf = pareto_frontier(res_bboptim)
best_obj1, idx_obj1 = findmin(map(elm -> fitness(elm)[i], pf))
bo1_solution = BlackBoxOptim.params(pf[idx_obj1]) # get the solution candidate itself...
else
bo1_solution = best_candidate(res_bboptim)
end

# Add the infill point if it does not exist in the plan or infill_plan
v = copy(permutedims(bo1_solution'))
Expand Down

2 comments on commit d5fb159

@MrUrq
Copy link
Owner Author

@MrUrq MrUrq commented on d5fb159 Feb 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/9633

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.2 -m "<description of version>" d5fb1594dd33b64fa647730878f213e2f5c8ed76
git push origin v0.4.2

Please sign in to comment.