Skip to content

Commit 2cf7a27

Browse files
authored
Format .jl files
1 parent 16a2443 commit 2cf7a27

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

docs/src/guide.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,17 @@ constraint(
6060
c,
6161
3x[i+1]^3 + 2 * x[i+2] - 5 + sin(x[i+1] - x[i+2])sin(x[i+1] + x[i+2]) + 4x[i+1] -
6262
x[i]exp(x[i] - x[i+1]) - 3 for i = 1:(N-2);
63-
lcon = -1.0, ucon = 1.0
63+
lcon = -1.0,
64+
ucon = 1.0,
6465
)
6566

6667
# If you want to create a single-bounded constraint, you can set `lcon` to `-Inf` or `ucon` to `Inf`. For example, if we wanted to set the lower bound of the constraint to -1 and the upper bound to infinity, we could do it as follows:
6768
constraint(
6869
c,
6970
3x[i+1]^3 + 2 * x[i+2] - 5 + sin(x[i+1] - x[i+2])sin(x[i+1] + x[i+2]) + 4x[i+1] -
7071
x[i]exp(x[i] - x[i+1]) - 3 for i = 1:(N-2);
71-
lcon = -1.0, ucon = Inf
72+
lcon = -1.0,
73+
ucon = Inf,
7274
)
7375

7476
# ## ExaModel

ext/ExaModelsMOI.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,12 @@ function _exafy(i::R, var_to_idx, p) where {R<:Real}
445445
end
446446

447447
function _exafy(e::MOI.ScalarNonlinearFunction, var_to_idx, p = ())
448-
return op(e.head)((begin
449-
c, p = _exafy(e, var_to_idx, p)
450-
c
451-
end for e in e.args)...), p
448+
return op(e.head)((
449+
begin
450+
c, p = _exafy(e, var_to_idx, p)
451+
c
452+
end for e in e.args
453+
)...), p
452454
end
453455

454456
function _exafy(e::MOI.ScalarAffineFunction{T}, var_to_idx, p = ()) where {T}

0 commit comments

Comments
 (0)