Skip to content

Commit

Permalink
Format .jl files (#53)
Browse files Browse the repository at this point in the history
Co-authored-by: sshin23 <[email protected]>
  • Loading branch information
github-actions[bot] and sshin23 authored Jan 27, 2024
1 parent c25f2de commit 0abcf8c
Show file tree
Hide file tree
Showing 17 changed files with 282 additions and 339 deletions.
13 changes: 10 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@ if !(@isdefined _PAGES)
end

if !(@isdefined _JL_FILENAMES)
const _JL_FILENAMES =
["guide.jl", "jump.jl", "quad.jl", "distillation.jl", "opf.jl", "gpu.jl", "performance.jl"]
const _JL_FILENAMES = [
"guide.jl",
"jump.jl",
"quad.jl",
"distillation.jl",
"opf.jl",
"gpu.jl",
"performance.jl",
]
end

for jl_filename in _JL_FILENAMES
Expand Down Expand Up @@ -53,7 +60,7 @@ bib = CitationBibliography(joinpath(@__DIR__, "src", "refs.bib"))


makedocs(
plugins=[bib],
plugins = [bib],
sitename = "ExaModels.jl",
modules = [ExaModels],
authors = "Sungho Shin",
Expand Down
5 changes: 1 addition & 4 deletions docs/src/jump.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jm = Model()
jm,
s[i = 1:N-2],
3x[i+1]^3 + 2x[i+2] - 5 + sin(x[i+1] - x[i+2])sin(x[i+1] + x[i+2]) + 4x[i+1] -
x[i]exp(x[i] - x[i+1]) - 3 == 0.0
x[i]exp(x[i] - x[i+1]) - 3 == 0.0
)
@objective(jm, Min, sum(100(x[i-1]^2 - x[i])^2 + (x[i-1] - 1)^2 for i = 2:N))

Expand All @@ -24,6 +24,3 @@ em = ExaModel(jm)
using NLPModelsIpopt

result = ipopt(em)



5 changes: 1 addition & 4 deletions ext/ExaModelsJuMP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ module ExaModelsJuMP
import ExaModels
import JuMP

function ExaModels.ExaModel(jm::JuMP.GenericModel{T}; backend = nothing) where T
function ExaModels.ExaModel(jm::JuMP.GenericModel{T}; backend = nothing) where {T}
return ExaModels.ExaModel(jm.moi_backend; backend = backend)
end

end # module ExaModelsJuMP



Loading

0 comments on commit 0abcf8c

Please sign in to comment.