I have the problem that I have to divide in an equation by a positive variable (Batt_Kap_ges):
Eta_ges =e= sum(Set_Batt, Anz_Batt(Set_Batt) * Batt_Kap(Set_Batt) * eta(Set_Batt)) / Batt_Kap_ges;
The equation triggers the error message "Endogenous operands for / not allowed in linear models".
In my understanding, the error is triggered because the variable Batt_Kap_ges can also be 0. Therefore I have inserted the following equation to exclude the 0 solution:
Unfortunately this does not change the error message. Does anyone have a hint how to set the lower bound of the variable to 1 or how else to fix the problem?
Edit: I've also tried to fix the lower bound to 1 with the following lines but it didn't work:
Batt_Kap_ges.LO = 1.0;
Batt_Kap_ges.L = 1.0;
Problems with modeling
2 posts • Page 1 of 1
You misinterpreted the error message. It reads "Endogenous operands for / not allowed in linear models". This means you can't use / where the denominator is a variable in a linear model (LP/MIP). This is not linear anymore. Change the model type to NLP or MINLP and you will be fine. Be aware that this most likely becomes a non-convex model with many local optima. Pay attention to the starting point or use a global solver (like Antigone, Baron, ...).