I just learned how to use Julia 3 weeks ago. I used to use AIMMS to solve MIP problems. The considered MIP problem is about vehicle route problem. It involves over 50,000 binary variable. Without giving initial solution, the solver cannot even find an initial solution. I have a method to find a feasible solution. I also find a way to check the feasibility of the initial solution. Now the problem is how to feed the initial solution to the model. I use the following simple example to learn whether the initial solution is accepted by the solver or not. However, it seems that it doesn’t work. It will be great if some one can help me or point me to some direction that I can learn how to do that.
using JuMP
using MathOptInterface
using Gurobi
myModel=Model(with_optimizer(Gurobi.Optimizer))
@variable(myModel, x, Int)
@variable(myModel, y, Int)
@variable(myModel, z>=0)
@variable(myModel, e[1:3], Bin)
@constraint(myModel,con1, 2x+3y<=10)
@constraint(myModel,con2, 3x+2y<=12)
@constraint(myModel,con3, z==2x+4y)
@constraint(myModel,con4, x>=y)
@constraint(myModel, con5, sum(e)==1)
@objective(myModel, Max,z)
@show myModel
vars=all_variables(myModel)
vals=[2,2,12,1,0,0]
set_start_value.(vars,vals)
optimize!(myModel)
@show termination_status(myModel) == MOI.OPTIMAL
@show primal_status(myModel) == MOI.FEASIBLE_POINT
has_values(myModel)
value.(vars)