How to formulate a multi-period binary optimization problem in Matlab with decision variables which are not part of the objective function?

3 Ansichten (letzte 30 Tage)
Hello!
I have implemented my binary optimization problem using OPL and I could solve it with CPLEX, so I am sure that it works. Now for the modelling part, I would like to replace OPL by Matlab, using the Matlab-CPLEX-Interface to solve it.
My use case is the optimization / configuration of an electrical city bus line. I have a given line with given bus stops and I want to find those stops out of them, which have to be configured as charging stops, so that one could run the electric bus always with enough loaded energy. The decision problem decides which stop has to be rebuilt as a charging stop (decision variable y = 0 or 1) by minimizing transforming costs (normal stop into charging stop). The detailed problem formulation you may find attached.
Here are my questions:
1) My optimization problem has a binary decision variable y in the objective function. Moreover it has another decision variable in its constraints which is e, the state of charge of the battery. If the solver decides to transform one bus stop into a charging stop (y_i = 1), this influences the battery’s charged energy content for the rest of the run / day, so the (new) energy content has to be saved after each bus stop i in the variable e. As far as I see, Matlab needs the formulation of all decision variables in the objective function. So how should I treat the decision variable e, which does not depend from costs?
2) For calculating the decision variable e, I use the equation e_it = e_j-1,t – c_i-1,t + x_it. This calculation has to be redone for every bus stop, in every period in the constraints. How could I get Matlab to do this, dependent from the decision for y_it = 0 or y_it = 1 in the constraint x_it <= l_it * y_i, if I have to deliver matrices like Aeq * x = beq to the solver.
3) In case that the interface to CPLEX using “cplexbilp” does not work, I have to use the Matlab “intlinprog”, right? Could you give me the solution for both ways please?
I would be very grateful if you could help me! Thanks a lot in advance for your support!

Antworten (1)

Alan Weiss
Alan Weiss am 23 Mär. 2016
I am afraid that I know nothing about CPLEX, nor its interface with MATLAB, so I cannot help you there.
If a variable does not count in the objective function, then set its corresponding coefficient to 0 in the objective vector f.
To see examples of constraints that I think are similar to yours, see the Optimal Dispatch of Power Generators example, or the rather complex factory sales allocation model.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Kategorien

Mehr zu Get Started with Optimization Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by