Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrosemberg committed Sep 29, 2024
1 parent 5debb59 commit 90eefdb
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 22 deletions.
7 changes: 4 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@ 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"
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"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

#=
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions docs/src/examples/GaussianProcesses.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/examples/Nonconvex.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/examples/Optim.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion examples/PowerModelsMarkets/BilevelJuMP/Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/PowerModelsMarkets/case_modifiers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
14 changes: 8 additions & 6 deletions test/powermodelsmarkets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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
Expand Down Expand Up @@ -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(;
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Clp
using HiGHS
using OptimalBids
using OptimalBids.PowerModelsMarkets
using Test
Expand Down

0 comments on commit 90eefdb

Please sign in to comment.