Hello everybody
In this example I put only the results of the variable r
and managed to plot the graph
using JuMP, Plots
r = [69.60, 17.39, 0, 0],[0, 8.8, 2.1, 0],[0, 0, 8.8, 1.9], [16, 3.9, 0,0]
j = sum(r)
x = T
y = j
bar(x,y)
However, in the original model there are many variables with greater results than I used in the example above so it was necessary to use the for
command.
This is the for
that I’m using, it doesn’t give an error but it doesn’t generate the graph either
for t = 4
m = sum(r)
println(m)
x = 1:4
y = m
plot(x,y)
end
Could someone help me pull the result of the sum of the variable I need to generate the graph?
Thanks!