Help with Infeasibility Issue in Optimization Model (YALMIP & CPLEX)

Hi everyone,
I am currently working on an optimization model using YALMIP and CPLEX to solve a problem involving prosumers, consumers, and battery and photovoltaic (PV) systems. The model includes various constraints related to energy consumption, energy storage, and power generation. However, I am encountering an issue where the model becomes infeasible when adding specific constraints related to the network consumption variables (qw_p(t) and qw_c(t)), as well as complementary slackness conditions.
Problem Description:
I have a set of constraints for my optimization model, including:
  1. Network consumption variables for both prosumers and consumers (qw_p(t) and qw_c(t)).
  2. Complementary slackness conditions involving binary variables (r_e_p(t) and r_e_c(t)).
When I include these two lines of constraints, the optimization problem becomes infeasible:
constraints = [constraints, qw_p(t) <= M_e_p * (1 - r_e_p(t)), WDT * (EBP + vnt * alpha) + u_a_p(t) + lambda_a_p(t) <= M_e_p * r_e_p(t)];
constraints = [constraints, qw_c(t) <= M_e_c * (1 - r_e_c(t)), WDT * (EBP + vnt * alpha) + u_a_c(t) + lambda_a_c(t) <= M_e_c * r_e_c(t)];
The model works fine when these two constraints are removed, but when they are added back in, the solver (CPLEX) returns an infeasible solution. I’ve tried to debug by commenting out other constraints, but the issue only seems to occur when these two lines are included. I’m attaching my codes for context.
What I've tried:
  1. Checking the values of M_e_p and M_e_c: I’ve tried different values for the constants M_e_p and M_e_c, but the problem persists.
  2. Isolating the problem: I found that when I remove these two specific constraints, the model becomes feasible again.
Questions:
  1. Is there something wrong with how I’m using the complementary slackness conditions in the optimization model?
  2. How can I modify or debug this part of the model to avoid infeasibility?
Thank you in advice for the answer. Any reference is also very appreciated.
Kind regards
Amy

Respuestas (0)

Preguntada:

el 13 de Nov. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by