modeling error with MOSEK

Problems with modeling
Post Reply
Abhi140
User
User
Posts: 29
Joined: 3 years ago

modeling error with MOSEK

Post by Abhi140 »

Dear All,

Could you please help me out with the following error?
error - 'No conic reformulation recognized for equation eq21(45)'
Solver - MOSEK
Problem type- MINLP (minimization)

Also, if I am using =c= operator for MOSEK, the following error appears
mosekgms.c:3323: MSK_GAMS_readtask: Coefficients in =C= equations must be 1 or -1.

The LINDOGLOBAL solver successfully solves the problem. However, MOSEK unable to reformulate the constraint (eq21) into a cone. Please find the portion of the code.

Set
i 'network buses' / 1*56 /
slack(i) 'Substation bus' / 1 /
t / t1*t1 /
mn /Pd,Qd,Qc,Pg,Qg/
mp /r,x,b,Limit/
PVcap(i) / 45 /;

Parameter Simax(i) / 45 2.5/
Cv(i) /45 0.5/
Cr(i) /45 0.25/;

Variables OF, Pij(i,j), Qij(i,j), Pg(i), Qg(i), hij(i,j), Ppv(i), ti(i), Qpv(i);

Positive variable v(i), Lij(i,j), Sij(i,j), S(i);

Binary variables bQc(i);


...
eq21(i)$PVcap(i)..
S(i) =g= sqrt[sqr(Ppv(i)) + sqr[Qpv(i)]];

eq22(i)$PVcap(i)..
ti(i) =g= sqr(Ppv(i)) + sqr(Qpv(i));

eq23(i)$PVcap(i)..
Qpv(i) =l= sqrt(power((Simax(i)),2)-power(Ppv(i),2));

*eq23(i)$PVcap(i)..
* Qpv(i) =l= 1.5;
****************************************************************************

eq24..
OF =g= sum((i,j)$cx(i,j), Lij(i,j)*LN(i,j,'r')) + sum(i$PVcap(i), Cv(i)*S(i) + Cr(i)*ti(i));

Pg.lo(i)$(slack(i)) = -5;
Pg.up(i)$(slack(i)) = 5;
Qg.lo(i)$(slack(i)) = 0.3287*Pg.lo(i);
Qg.up(i)$(slack(i)) = 0.3287*Pg.up(i);
Qpv.lo(i)$(PVcap(i)) = 0;

S.lo(i)$(PVcap(i)) = 0;
Ppv.fx(i)$(PVcap(i)) = 2;

Please let me know if I could help you with other information.
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: modeling error with MOSEK

Post by bussieck »

Make up some data and provide a executable model that reproduces the issue. MOSEK is very strict in the requirements of the cone. For example, making S a positive variable already breaks the requirements.

-Michael
Abhi140
User
User
Posts: 29
Joined: 3 years ago

Re: modeling error with MOSEK

Post by Abhi140 »

Dear Bussieck,

The error is same even if I remove the bound on variable S.

I can share my attachments on your email or otherwise. Sharing on public platform might be problematic for me. Later the solution of the error we can share for public use.
Hope it's fine with you.
Abhi140
User
User
Posts: 29
Joined: 3 years ago

Re: modeling error with MOSEK

Post by Abhi140 »

systemdata.xlsx
(17.54 KiB) Downloaded 216 times
work1.gms
(6.11 KiB) Downloaded 215 times
Dear Bussieck,

Please have look at the attachments which are giving the same error. Please let me know if I could help you with more information.
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: modeling error with MOSEK

Post by bussieck »

You seek free advice, so please share the model with everyone or get professional help. -Michael
Abhi140
User
User
Posts: 29
Joined: 3 years ago

Re: modeling error with MOSEK

Post by Abhi140 »

Dear,

Don't be rude. Immediately, I have shared my files.
Well, I don't know what GAMS cover in their license. Mistake on my part, well accepted.
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: modeling error with MOSEK

Post by bussieck »

No rudeness implied. Just repeating the rules of the forum.

To the issue. As I mentioned you have to follow the Mosek requirements precisely. Mosek (or the GAMS/MOSEK link) is not the greatest help to debug. Basically, you have two choices for SOCP with Mosek: 2*r*s =g= sum(i, sqr(x(i)) or sqr(r) =g= sum(i, sqr(x(i)) with r,s>=0 and x free (forget about the =c= constraints, they are deprecated). Moreover, the cones need to be disjoint (I had to create duplicates of your Qpv and Ppv to accomplish this). You can't mix regular quadratic constraints with SOCP constraints (eq22 was a regular quadratic constraint). I reformulated this as a rotated SOCP constraint, introducing a variable "half" that is fixed to 0.5. No shortcuts, you can't use any constants in a (MOSEK) SOCP constraint (other than the required "2" in the rotated SOCP constraint). The latter also applied to SiMax in eq23 (I also introduced a fixed variable vSiMax). I have attached the modified problem. Cplex und Gurobi are less demanding on the user side to specify the SOCP precisely and do some internal reformulations to get it into the required shape.

-Michael
work1_mrb.gms
(6.61 KiB) Downloaded 196 times
Post Reply