Genetic algorithm overly restrictive for integer problems
Show older comments
I am trying to use MATLAB's ga function to solve a mixed-integer linear programming problem. I first specified the task in the problem-based framework, then used prob2struct to convert this to the solver-based framework. I was able to find a feasible solution for a small problem using intlinprog, but this became infeasible for all but the smallest problems. I am now trying to find a solution with ga, but am struggling as it has not yet successfully satisfied the constraints.
I have three DV vectors (concatenated together):
- X: binary variable representing replacement of an asset
- A: age of an asset
- C: condition of an asset
over three dimensions:
- n: assets
- c: condition ratingss
- t: time (discrete, in years)
and have specified constraints in order to ensure that age and condition in consecutive time periods are correct based on whether or not the asset is replaced.
Based on my understanding of genetic algorithms, the way I would implement a solution would be to apply the genetic operations to the X vector, then update the A and C vectors appropriately and check if other constraints are satisfied. However, for the integer ga solver, MATLAB does not allow custom creation, mutation, crossover or selection functions. What am I missing here? It seems to me like genetic algorithms are a natural fit for combanitoric problems with binary DVs, but the blanket ban on customisation is making the inbuilt ga function all but unusable.
Accepted Answer
More Answers (0)
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!