Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Symbolics.ShardedForm by default #31

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions src/parametric_problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ Note, this constructor uses `Symbolics.jl` to compile the relevant low-level fun
where that is strictly infeasible, you can still use the low-level constructor to generate a
`ParametricMCP`. In general, however, the use of this convenience construtor is advised.
"""
function ParametricMCP(
f,
lower_bounds,
upper_bounds,
parameter_dimension;
kwargs...,
)
function ParametricMCP(f, lower_bounds, upper_bounds, parameter_dimension; kwargs...)
# TODO
length(lower_bounds) == length(upper_bounds) ||
throw(ArgumentError("lower_bounds and upper_bounds have inconsistent lenghts."))
Expand All @@ -61,14 +55,7 @@ function ParametricMCP(

f_symbolic = f(z_symbolic, θ_symbolic)

ParametricMCP(
f_symbolic,
z_symbolic,
θ_symbolic,
lower_bounds,
upper_bounds;
kwargs...,
)
ParametricMCP(f_symbolic, z_symbolic, θ_symbolic, lower_bounds, upper_bounds; kwargs...)
end

"""
Expand All @@ -81,7 +68,7 @@ function ParametricMCP(
lower_bounds,
upper_bounds;
compute_sensitivities = true,
parallel = nothing,
parallel = Symbolics.ShardedForm(),
)
length(lower_bounds) == length(upper_bounds) ||
throw(ArgumentError("lower_bounds and upper_bounds have inconsistent lenghts."))
Expand Down
Loading