From 934cd4768596ed2e745f0f03830ac9030a974fa5 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Thu, 20 Aug 2026 11:01:33 -0400 Subject: [PATCH] Add PrecompileTools workload Co-Authored-By: Chris Rackauckas --- Project.toml | 2 ++ src/OptimalUncertaintyQuantification.jl | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/Project.toml b/Project.toml index 135e938..9f83f9a 100644 --- a/Project.toml +++ b/Project.toml @@ -7,6 +7,7 @@ version = "0.1.0" CanonicalMoments = "58d2c334-1a3c-4862-bb37-9012b9e58a38" DiscreteMeasures = "7766d772-2108-41ee-a4bd-11c51440a39b" OUQBase = "01930cae-99d2-7439-8f4f-ace2ece9f1b9" +PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" Reexport = "189a3867-3050-52da-a836-e630ba90ab69" [sources] @@ -20,6 +21,7 @@ CanonicalMoments = "0.1" DiscreteMeasures = "0.1" OUQBase = "0.1" Pkg = "1.10" +PrecompileTools = "1.2" Reexport = "1.2.2" SafeTestsets = "0.1" Test = "1.10" diff --git a/src/OptimalUncertaintyQuantification.jl b/src/OptimalUncertaintyQuantification.jl index faf717f..bc5b3ad 100644 --- a/src/OptimalUncertaintyQuantification.jl +++ b/src/OptimalUncertaintyQuantification.jl @@ -3,4 +3,20 @@ module OptimalUncertaintyQuantification using Reexport: @reexport @reexport using OUQBase +using PrecompileTools: @compile_workload, @setup_workload + +@setup_workload begin + @compile_workload begin + random_vars = @random_variables begin + Independent(Q, bounds = (0.0, 1.0)) + end + admissible_set = AdmissibleSet(random_vars, [𝔼(Q) ~ 0.5]) + OUQSystem( + objective = 𝔼(Q), + admissible_set, + reduction_alg = WinklerExtremalMeasures(), + ) + end +end + end # module