I have a Gurobi model in the attached format.
My question is probably fairly simple. I am trying to expand the model and with stochastic data inputs. So I want to run the model with different data inputs (the data inputs being eg. missed_bags).
My question is - Is it possible to save the model and then load the model in another Julia file where I can run the model with different data inputs.
For iter in iterations
x_result = Run Gurobi_model(missed_bags). # get assignment
for sim in simulations
data = data + std*rand()
# compute values based on assignment result
# some stuff happens here
# Update missed_bags matrix based on simulation results
My model is made with the following syntax (this I just and extract)
Gurobi_model = Model(Gurobi.Optimizer);
variable(Gurobi_model, x[1:Fa, 1:I], Bin); # Binary variable: 1 if arriving flight fa is assigned to in-feed i
@variable(Gurobi_model, y[1:T], Bin)
# objective function: Minimise the number of missed bags
@objective(Gurobi_model, Min, sum(x[fa,i]*missed_bags[fa,i] for i=1:I, fa=1:Fa) + sum(500*y[t] for t = 1:T)+ sum(0.5*x[fa,i] for i in [2,3,5,6], fa=1:Fa))
@constraint(Gurobi_model, [fa = 1:Fa], (sum(x[fa,i] for i = 1:I) == 1))
# constraints that ensures to add penalty if loading capacity is violated
# print statement
I hope you guys can help!
Please sign in to leave a comment.