I am trying to do my first MINLP problem using PYOMO and CPLEX - although I am not committed to using CPLEX, but it was recommended to me. To my understanding you need to formulate your problem in terms of matricies. However, In my own problem I have an exponential term which is a function of three other variables - the equation is a type of growth function for context:
$$I^{(i,j)}_{\,t+1,pre} \!= R_t I^{(i,j)}_{\,t,pre}\;e^{-\beta\bigl(J^{(i,j)}_{\,t+1}+I^{(i,j)}_{t}+I^{(i,j)}_{\,t-1}\bigr)}$$
In PYOMO I could probably code the constraint something like the following:
# Define the index sets for the grid and time horizons.
# Defining the maximum value that the index can take. e.g. j = {1, 2, 3, ... , model.Jmax}
model.Imax = Param(within=NonNegativeIntegers) # Value = 10
model.Jmax = Param(within=NonNegativeIntegers) # Value = 10
model.Tmax = Param(within=NonNegativeIntegers) # Value = 7
# Constructing the actual indicies used for the problem.
model.Iset = RangeSet(1, model.Imax) #e.g i = {1, 2, 3, ... , model.Imax=10}
model.Jset = RangeSet(1, model.Jmax)
model.Tset = RangeSet(1, model.Tmax)
# Constraint
def Ipre_Recruitment(model):
return model.Ipre == model.R * exp([EXPRESSION])
model.Ipre_constraint = Constraint(rule = Ipre_Recruitment)
While the code is not by any means accurate, the idea is that I could more easily code up the constraint as it is in contrast to figuring out how to generate a matrix formulation.
The question I have then is if I am able to keep coding my MINLP in PYOMO in the manner that I have shown above, would you need to use a different solver to code it in this way, or do I need to restart somehow?