Hello All,
New to Optimization & JuMP. Trying to do sensitivity analysis for this example, and wondering how to get reduced costs, objective coefficients, allowable increase/decrease, shadow prices, and final values for given constraints. They are very easy to get on excel solver. Read through the documentation here, Expressions and Constraints — JuMP -- Julia for Mathematical Optimization 0.18 documentation, but not helpful.
Please advice.
#Initialise values
n=4;r=[.1;.15;.16; 0.08]
A = [1 1 1 1]
b = 80
D = [.5 .3 .25 .6; .3 .1 .4 .2; .2 .6 .35 .2]
d = [28; 24; 12]
using JuMP
using Gurobi
#Define Model
model = Model(solver=GurobiSolver(Presolve=0))
#Define variables
@variable(model, x[1:4])
#Define Objective
@objective(model, Max, r'*x)
#Define constraints
@constraints model begin
x .>= zeros(1,4)
A*x .== b
D*x .>= d
end
status = solve(model)
getvalue(x) # Giving correct final values
println(getdual(x)) # The duals are shown as zeros