# is it possible to improve the solution process of an MILP?

I am trying to optimize a charging station for EVs in matlab with intlinprog, which is connected to a PV-Modul, to an system storage systeme and to the network grid. I am using different Storage technologies (Lithium, Lead acid and flywheel). I have issues to simulate for some charging scenarios with time resolution of 15 minutes (PV and load data). The charging scenarios are 350kW with 3 Charging points (total energy demand for a year 665 MWh); 150 kW with 12 Charging points (allover 253.58 MWh)and 11kW with 25 Charging points (for a whole year 83.8 MWh). When the demanded energy is lower, the model runs slower, and when there is higher self-discharge, the model also slows down. The simulation varies 3h30 for Li and first scenario (so lowest self discharge and highest Demand) to nearly a day for Flywheel and 11 kW. Can someone help me, explain to me why?

• If your problem is a mathematical or modeling problem, I suggest you write the mathematical problem/model explicitely, rather than the code which is much less readable. Jul 12 at 15:30
• the optimization problem is to min{Cost}=min{C_buy+C_batt,var+C_peak+C_charger-R_sell-R_EV} such that the power balance is fulfilled: p_sell/eff_grid - eff_grid * p_buy = eff_pv * p_pv - p_load / eff_load + eff_dch * p_dch - p_ch / eff_ch; the Energie balance too E(t+1)=E(t) + P_chdelta_t - P_dchdelta_t - self_dicharge_Rate*E(t) and other constraints like the max charging power of the battery the maximun and minimum stored energies also there are some integer defined to deny the system from charging and discharging the energy storage at the same time, to buy and sell Energy simultanously Jul 12 at 15:45
• intlinprog is usually not the fastest MILP solver. Gurobi, Xpress or CPLEX might be considerably faster (although the most recent version of CPLEX runnable in MATLAB is 12.10.0, which is not the latest CPLEX version. Jul 12 at 15:51
• So, if I want to use one of these solvers, I presume I have to change/ translate my entire code? Jul 12 at 15:56
• Some changes would be needed. If you use YALMIP, you can switch between solvers by just changing which solver is specified, plus specifying the solver-specific options you want. Jul 12 at 18:25