7ossam81 / EvoloPy

EvoloPy toolbox provides classical and recent nature-inspired metaheuristic for the global optimization.
Apache License 2.0
446 stars 222 forks source link

User defined-MILP #67

Closed LeonXiang closed 3 years ago

LeonXiang commented 3 years ago

Hi, I have skimmed most of the codes in EvoloPy, and I think it outstanding from my perspective as a freshman. However, I wanna to solve a Mixed-Integer Linear Programming problem with binary variants which have over 4 subscripts. If so could you please tell me if MILP is proper here or kindly explain how that could be done? Thank you very much.

RaneemQaddoura commented 3 years ago

Thank you for your interest in EvoloPy Yes, EvoloPy is the proper framework to do it. You need to add a new function to the code as follows: You just need to do the following:

    • Add your function to the 'benchmark.py' file
    • Add the function (name, lower bound, upper bound, and dimension) to 'getFunctionDetails' function at the 'benchmark.py' file
    • Add the function name to the 'objectivefunc' list at 'example.py' file

Hope this helps

RaneemQaddoura commented 3 years ago

Please watch this video for an illustration of how to add a function to the framework: https://www.youtube.com/watch?v=CGFRbbR4vvI