Skip to content

Commit c51e515

Browse files
authored
Update toint.jl
1 parent 92b46e7 commit c51e515

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/PureJuMP/toint.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function toint(args...; n::Int = default_nvar, kwargs...)
2727
for j in jmin:jmax
2828
aij = 5 * (1 + mod(i, 5) + mod(j, 5))
2929
bij = (i + j) // 10
30-
cj = (1 + j) // 10
30+
cj = 1 + j // 10
3131
s += aij * sin(bij + ci * x[i] + cj * x[j])
3232
end
3333

@@ -37,14 +37,14 @@ function toint(args...; n::Int = default_nvar, kwargs...)
3737
if 1 <= j1 <= n && (j1 < jmin || j1 > jmax)
3838
aij = 5 * (1 + mod(i, 5) + mod(j1, 5))
3939
bij = (i + j1) // 10
40-
cj = (1 + j1) // 10
40+
cj = 1 + j1 // 10
4141
s += aij * sin(bij + ci * x[i] + cj * x[j1])
4242
end
4343
j2 = i - half
4444
if 1 <= j2 <= n && j2 != j1 && (j2 < jmin || j2 > jmax)
4545
aij = 5 * (1 + mod(i, 5) + mod(j2, 5))
4646
bij = (i + j2) // 10
47-
cj = (1 + j2) // 10
47+
cj = 1 + j2 // 10
4848
s += aij * sin(bij + ci * x[i] + cj * x[j2])
4949
end
5050
end

0 commit comments

Comments
 (0)