From 90eefdba739a9478f5e58796b2f1d075386c742f Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 29 Sep 2024 18:35:05 -0400 Subject: [PATCH] update deps --- Project.toml | 7 ++++--- README.md | 4 ++-- docs/Project.toml | 2 +- docs/src/examples/GaussianProcesses.md | 4 ++-- docs/src/examples/Nonconvex.md | 4 ++-- docs/src/examples/Optim.md | 4 ++-- .../PowerModelsMarkets/BilevelJuMP/Project.toml | 2 +- src/PowerModelsMarkets/case_modifiers.jl | 4 ++-- test/powermodelsmarkets.jl | 14 ++++++++------ test/runtests.jl | 2 +- 10 files changed, 25 insertions(+), 22 deletions(-) diff --git a/Project.toml b/Project.toml index 16b6ecaf..f005bfd2 100644 --- a/Project.toml +++ b/Project.toml @@ -10,15 +10,16 @@ PowerModels = "c36e90e8-916a-50a6-bd94-075b64ef4655" Reexport = "189a3867-3050-52da-a836-e630ba90ab69" [compat] -ChainRulesCore = "~1.14" +ChainRulesCore = "~1.25" JuMP = "~1" PowerModels = "~0.19, 0.21" Reexport = "~1.2" julia = "^1.6" +NonconvexBayesian = "^v0.1.5" [extras] ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a" -Clp = "e2554f3b-3117-50c0-817c-e040a3ddf72d" +HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" Nonconvex = "01bcebdf-4d21-426d-b5c4-6132c1619978" NonconvexBayesian = "fb352abc-de7b-48de-9ebd-665b54b5d9b3" @@ -26,4 +27,4 @@ NonconvexIpopt = "bf347577-a06d-49ad-a669-8c0e005493b8" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "Clp", "Nonconvex", "NonconvexBayesian", "NonconvexIpopt", "ChainRulesTestUtils", "Downloads"] +test = ["Test", "HiGHS", "Nonconvex", "NonconvexBayesian", "NonconvexIpopt", "ChainRulesTestUtils", "Downloads"] diff --git a/README.md b/README.md index dab65cde..b8d00ba0 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ In order to exemplify some of the functionalities available, let's use the inter ```julia using OptimalBids using OptimalBids.PowerModelsMarkets -using Clp # Market Clearing Solver +using HiGHS # Market Clearing Solver using Plots # For some evaluation plots at the end #= @@ -66,7 +66,7 @@ market = build_market( PowerModelsMarket, network_data, generator_indexes, - Clp.Optimizer, + HiGHS.Optimizer, ) # New generators are added with 0.0 max capacity (a.k.a bid/offer), so lets change their volume offers: diff --git a/docs/Project.toml b/docs/Project.toml index bddf3e28..c9595b14 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,7 +1,7 @@ [deps] AbstractGPs = "99985d1d-32ba-4be9-9821-2ec096f28918" BilevelJuMP = "485130c0-026e-11ea-0f1a-6992cd14145c" -Clp = "e2554f3b-3117-50c0-817c-e040a3ddf72d" +HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9" diff --git a/docs/src/examples/GaussianProcesses.md b/docs/src/examples/GaussianProcesses.md index 82c6a5bc..d062678e 100644 --- a/docs/src/examples/GaussianProcesses.md +++ b/docs/src/examples/GaussianProcesses.md @@ -13,7 +13,7 @@ This a example on how to use [AbstractGPs.jl](https://github.com/JuliaGaussianPr ```@example AbstractGPs using OptimalBids using OptimalBids.PowerModelsMarkets -using Clp # Market Clearing Solver +using HiGHS # Market Clearing Solver using JuMP: optimizer_with_attributes using AbstractGPs @@ -72,7 +72,7 @@ market = build_market( PowerModelsMarket, network_data, generator_indexes, - optimizer_with_attributes(Clp.Optimizer, "LogLevel" => 0), + optimizer_with_attributes(HiGHS.Optimizer, "LogLevel" => 0), ) # Relative distribution of offers are sometimes predefined and cannot be changed at bidding time. diff --git a/docs/src/examples/Nonconvex.md b/docs/src/examples/Nonconvex.md index ed6bab6c..747f4155 100644 --- a/docs/src/examples/Nonconvex.md +++ b/docs/src/examples/Nonconvex.md @@ -11,7 +11,7 @@ This a example on how to use [Nonconvex.jl](https://github.com/JuliaNonconvex/No ```@example Nonconvex using OptimalBids using OptimalBids.PowerModelsMarkets -using Clp # Market Clearing Solver +using HiGHS # Market Clearing Solver using JuMP: optimizer_with_attributes using Nonconvex @@ -70,7 +70,7 @@ market = build_market( PowerModelsMarket, network_data, generator_indexes, - optimizer_with_attributes(Clp.Optimizer, "LogLevel" => 0), + optimizer_with_attributes(HiGHS.Optimizer, "LogLevel" => 0), ) # Relative distribution of offers are sometimes predefined and cannot be changed at bidding time. diff --git a/docs/src/examples/Optim.md b/docs/src/examples/Optim.md index cf5a5e35..2e9f4583 100644 --- a/docs/src/examples/Optim.md +++ b/docs/src/examples/Optim.md @@ -11,7 +11,7 @@ This a example on how to use [Optim.jl](https://github.com/JuliaNLSolvers/Optim. ```@example Optim using OptimalBids using OptimalBids.PowerModelsMarkets -using Clp # Market Clearing Solver +using HiGHS # Market Clearing Solver using JuMP: optimizer_with_attributes using Optim @@ -61,7 +61,7 @@ market = build_market( PowerModelsMarket, network_data, generator_indexes, - optimizer_with_attributes(Clp.Optimizer, "LogLevel" => 0), + optimizer_with_attributes(HiGHS.Optimizer, "LogLevel" => 0), ) # Relative distribution of offers are sometimes predefined and cannot be changed at bidding time. diff --git a/examples/PowerModelsMarkets/BilevelJuMP/Project.toml b/examples/PowerModelsMarkets/BilevelJuMP/Project.toml index 3cf07826..9265d3b1 100644 --- a/examples/PowerModelsMarkets/BilevelJuMP/Project.toml +++ b/examples/PowerModelsMarkets/BilevelJuMP/Project.toml @@ -1,7 +1,7 @@ [deps] AbstractGPs = "99985d1d-32ba-4be9-9821-2ec096f28918" BilevelJuMP = "485130c0-026e-11ea-0f1a-6992cd14145c" -Clp = "e2554f3b-3117-50c0-817c-e040a3ddf72d" +HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" Gurobi = "2e9cd046-0924-5485-92f1-d5272153d98b" diff --git a/src/PowerModelsMarkets/case_modifiers.jl b/src/PowerModelsMarkets/case_modifiers.jl index a949d032..d5eb8ec0 100644 --- a/src/PowerModelsMarkets/case_modifiers.jl +++ b/src/PowerModelsMarkets/case_modifiers.jl @@ -12,7 +12,7 @@ function add_generator(nw_data::Dict, bus_index::Int) error("crazy generator indexes") nw_data["gen"][string(gen_idx)] = Dict( - "ncost" => 1, + "ncost" => 2, "qc1max" => 0.0, "pg" => 0.0, "model" => 2, @@ -29,7 +29,7 @@ function add_generator(nw_data::Dict, bus_index::Int) "source_id" => Any["gen", gen_idx], "pc2" => 0.0, "index" => gen_idx, - "cost" => 0.0, + "cost" => [0.0; 0.0], "qmax" => 0.0, "gen_status" => 1, "qmin" => 0.00, diff --git a/test/powermodelsmarkets.jl b/test/powermodelsmarkets.jl index 7820c331..ce96e50f 100644 --- a/test/powermodelsmarkets.jl +++ b/test/powermodelsmarkets.jl @@ -30,27 +30,28 @@ # test PowerModelsMarket functions market = nothing + solver = optimizer_with_attributes(HiGHS.Optimizer, "output_flag" => false) @testset "build_market" begin @test_throws MethodError build_market( PowerModelsMarket, network_data, collect(1:num_strategic_buses), collect(1:num_strategic_buses), - Clp.Optimizer, + solver, ) @test_throws BoundsError build_market( PowerModelsMarket, network_data, generator_indexes, bus_indexes[1:(end - 1)], - Clp.Optimizer, + solver, ) @test_throws DomainError build_market( PowerModelsMarket, network_data, generator_indexes, [bus_indexes[1:(end - 1)]; "44"], - Clp.Optimizer, + solver, ) sg_aux = @@ -59,11 +60,11 @@ network_data, generator_indexes, bus_indexes, - Clp.Optimizer, + solver, ).strategic_generators market = build_market( - PowerModelsMarket, network_data, generator_indexes, Clp.Optimizer + PowerModelsMarket, network_data, generator_indexes, solver ) @test all(market.strategic_generators .== sg_aux) end @@ -125,7 +126,8 @@ model = Model() set_objective!(model, profit_function; flags=[:expensive]) addvar!(model, [min_total_volume], [max_total_volume]) - add_ineq_constraint!(model, x -> -1) # Errors when no inequality is added! + # add_ineq_constraint!(model, x -> -10.0) # Errors when no inequality is added! + # add_ineq_constraint!(model, x -> -10.0) # Errors when no inequality is added! alg = BayesOptAlg(IpoptAlg()) options = BayesOptOptions(; diff --git a/test/runtests.jl b/test/runtests.jl index 9c0bc45a..092f2724 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,4 @@ -using Clp +using HiGHS using OptimalBids using OptimalBids.PowerModelsMarkets using Test