Regarding the issue of inconsistent output fonts and slow startup using Jupyter in Vscode

Viewed 33

I changed the font in Vscode. The fonts output in the ji file to the terminal are normal, but the fonts output in juypter are mixed with each other, but after multiple runs, the output results will be consistent. In addition, running julia for the first time in Vscode is too slow. Is there a way to improve the running speed?

This is the first run, 17 seconds, and the fonts are not the same. enter image description here After several runs, the font is the same. enter image description here

using JuMP,GLPK
m=Model(GLPK.Optimizer)
c=[1;2;5] 
A=[-1 1 3;1 3 -7]
b=[-5;10]
@variable(m,x[1:3]>=0)
@objective(m,Max,sum( c[i]*x[i] for i in 1:3))
@constraint(m,constraint[j in 1:2],sum(A[j,i]*x[i] for i in 1:3)<=b[j])
@constraint(m,bound,x[1] <= 10)
JuMP.optimize!(m)
println(m)
println("Optimal Solutions:")
for i in 1:3
    println("x[$i]=",JuMP.value(x[i]))
end
println("Dual variables:")
for j in 1:2
    println("dual[$j]=",JuMP.shadow_price(constraint[j]))
end
0 Answers
Related