Originally posted by: felycite28
Hello everyone ,
I have a small question and I need your advice . I coded my MIP model on python and solving it Cplex . So far , everything is perfect. Now , I am developing a heuristic algorithm for it . Firtsly I have to solve the problem partially , let me explain shortly my Python code and model .
#here is the data
T=5;
x=[7, 19, 9, 12, 11];
y=[8, 8, 7, 9, 6];
c=cplex.Cplex()
def setupproblem(c):
#variables and constraints are here
def objective (c):
#code of objective funct;
model.solve() everything is perfect so far.
Here I started to code my heuristc and said :
def myheuristic()
My time period was T=5, solve the above math model for time period T=2 (so all the indices of variables and data must be 2, basically take
x=[7, 19];
y=[8, 8];
and solve the same model and give me the result.
How can I do that easily ?
I would be very happy if you can give me an small example
Thank you so much in advance
#CPLEXOptimizers#DecisionOptimization