From cdd551f984fc657bcce1fc224c3b855d15e31a1d Mon Sep 17 00:00:00 2001 From: TimSlendebroek <32385057+TimSlendebroek@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:36:41 -0700 Subject: [PATCH] Surrogate i.o Surogate --- Project.toml | 2 +- data/tests_generate_hypercube.jl | 4 ++-- src/BalanceOfPlantSurogate.jl | 6 +++--- src/model.jl | 2 +- test/runtests.jl | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Project.toml b/Project.toml index 8b34a0a..7ccd3a8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,4 +1,4 @@ -name = "BalanceOfPlantSurogate" +name = "BalanceOfPlantSurrogate" uuid = "001e48cb-5a1e-4e3c-a5d4-cdc3aa14f3de" authors = ["TimSlendebroek <32385057+TimSlendebroek@users.noreply.github.com>"] version = "2.0.0" diff --git a/data/tests_generate_hypercube.jl b/data/tests_generate_hypercube.jl index b56f653..c7ad886 100644 --- a/data/tests_generate_hypercube.jl +++ b/data/tests_generate_hypercube.jl @@ -1,10 +1,10 @@ using Test using Pkg -using BalanceOfPlantSurogate +using BalanceOfPlantSurrogate using Pkg.activate(@__DIR__) -@testset "BalanceOfPlantSurogate Tests" begin +@testset "BalanceOfPlantSurrogate Tests" begin include(joinpath(@__DIR__,"generate_hypercube.jl")) hyper_cube = generate_hypercube() @assert !isempty(hyper_cube.cases) diff --git a/src/BalanceOfPlantSurogate.jl b/src/BalanceOfPlantSurogate.jl index 09cc5c3..0d12528 100644 --- a/src/BalanceOfPlantSurogate.jl +++ b/src/BalanceOfPlantSurogate.jl @@ -1,7 +1,7 @@ -module BalanceOfPlantSurogate +module BalanceOfPlantSurrogate -const __BalanceOfPlantSurogate__ = abspath(joinpath(@__DIR__, "..")) +const __BalanceOfPlantSurrogate__ = abspath(joinpath(@__DIR__, "..")) include("model.jl") -end # module BalanceOfPlantSurogate +end # module BalanceOfPlantSurrogate diff --git a/src/model.jl b/src/model.jl index 74fc1e4..c356b7d 100644 --- a/src/model.jl +++ b/src/model.jl @@ -8,7 +8,7 @@ mutable struct BOPSurogate end function BOPSurogate(cycle_type::Symbol; data::String="BalanceOfPlantHypercubeN=10000.csv") - df = DataFrames.DataFrame(CSV.File(joinpath(BalanceOfPlantSurogate.__BalanceOfPlantSurogate__, "data", data))) + df = DataFrames.DataFrame(CSV.File(joinpath(BalanceOfPlantSurrogate.__BalanceOfPlantSurrogate__, "data", data))) df = filter(row -> row.cycle_type == string(cycle_type), df) sort!(df, [:diverter_heatload, :breeder_heat_load, :total_power]) diff --git a/test/runtests.jl b/test/runtests.jl index 021924e..b730653 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,9 +1,9 @@ using Test -using BalanceOfPlantSurogate +using BalanceOfPlantSurrogate -@testset "BalanceOfPlantSurogate" begin +@testset "BalanceOfPlantSurrogate" begin for cycle in [:rankine, :brayton] - BOPSur = BalanceOfPlantSurogate.BOPSurogate(cycle) - @assert !isnan(BalanceOfPlantSurogate.predict_thermal_efficiency(BOPSur,1e7,0.9,0.1)) + BOPSur = BalanceOfPlantSurrogate.BOPSurogate(cycle) + @assert !isnan(BalanceOfPlantSurrogate.predict_thermal_efficiency(BOPSur,1e7,0.9,0.1)) end end