I found problems when using IPOPT to solve my optimization problem. The result I obtained isn’t a feasible solution. Even after attempting to alter some parameters, the obtained solution remains infeasible. Hence, I am considering whether the constraints I have written are unable to convey my true intent to AMPL. The formulation of my optimization problem and the model code I have written are as follow:
![image](https://global.discourse-cdn.com/flex019/uploads/ampl/original/1X/74dab4e067dcc30335f001b4a4443ffd59d17fff.png)
![image](https://global.discourse-cdn.com/flex019/uploads/ampl/original/1X/857032e1956a61803c104400eaa2394da8a43546.png)
![image](https://global.discourse-cdn.com/flex019/uploads/ampl/original/1X/bce4f7e654a807bbbecceb7c75fea6ebf445750d.png)
##ExampleTwo
#set Nodes {1..2001};
#set Dimension {1..2};
param N := 2000;
param M := 100;
param delta := 0.2;
param Hight := 50;
param Vmax := 100;
param Vmin := 3;
param amax := 5;
param B := 500000;
param N0 := 1*10^(-17);
param sigma2 := 1*10^(-11);
param P := 10;
param beta0_1 := 3.23461517152694*10^(-5);
param beta0_2 := 1.20564246274771*10^(-5);
param beta0_3 := 3.53583092353553*10^(-5);
param beta0_4 := 1.90906735010188*10^(-5);
var ita; # variable for DF relay system
var q {1..2,1..N+1};
var v {1..2,1..N+1};
var a {1..2,1..N};
var m_1 {1..N+1} >=0, <=M integer; # blocklength for user 1 integer
var m_2 {1..N+1} >=0, <=M integer; # blocklength for user 2 integer
var m_3 {1..N+1} >=0, <=M integer; # blocklength for user 3 integer
var m_4 {1..N+1} >=0, <=M integer; # blocklength for user 4 integer
let {i in 1..N+1} m_1[i] := 0.25*M;
let {i in 1..N+1} m_2[i] := 0.25*M;
let {i in 1..N+1} m_3[i] := 0.25*M;
let {i in 1..N+1} m_4[i] := 0.25*M;
let {i in 1..2, j in 1..N} a[i,j] := 0.00001;
let {j in 2..N} v[1,j] := 0.497878679656440;
let {j in 2..N} v[2,j] := -0.497878679656440;
let {j in 2..N} q[1,j] := 0+21.2132034355964*0.2+0.497878679656440*(j-1);
let {j in 2..N} q[1,j] := 1000-21.2132034355964*0.2-0.497878679656440*(j-1);
maximize OBJ:ita;
subject to DFconstraint_1: sum{i in 1..N+1} (3*B*((1/log(2))*log(1+(P*beta0_1/sigma2)/((q[1,i])^2+(q[2,i])^2+Hight^2))-sqrt(1/m_1[i])*5.6120))>=ita;
subject to DFconstraint_2: sum{i in 1..N+1} (B*((1/log(2))*log(1+(P*beta0_2/sigma2)/((q[1,i]-600)^2+(q[2,i]-460)^2+Hight^2))-sqrt(1/m_2[i])*5.6120)+
B*((1/log(2))*log(1+(P*beta0_3/sigma2)/((q[1,i]-460)^2+(q[2,i]-600)^2+Hight^2))-sqrt(1/m_3[i])*5.6120)+
B*((1/log(2))*log(1+(P*beta0_4/sigma2)/((q[1,i]-160)^2+(q[2,i]-160)^2+Hight^2))-sqrt(1/m_4[i])*5.6120))>=ita;
subject to BOUNDconstraint_1: sum{i in 1..N+1} (B*((1/log(2))*log(1+(P*beta0_2/sigma2)/((q[1,i]-600)^2+(q[2,i]-460)^2+Hight^2))-sqrt(1/m_2[i])*5.6120))>=ita/4;
subject to BOUNDconstraint_2: sum{i in 1..N+1} (B*((1/log(2))*log(1+(P*beta0_3/sigma2)/((q[1,i]-460)^2+(q[2,i]-600)^2+Hight^2))-sqrt(1/m_3[i])*5.6120))>=ita/4;
subject to BOUNDconstraint_3: sum{i in 1..N+1} (B*((1/log(2))*log(1+(P*beta0_4/sigma2)/((q[1,i]-160)^2+(q[2,i]-160)^2+Hight^2))-sqrt(1/m_4[i])*5.6120))>=ita/4;
subject to InitialVelocity_1: v [1,1] = 21.2132034355964;
subject to InitialVelocity_2: v [2,1] = -21.2132034355964;
subject to FinalVelocity_1: v [1,N+1] = 21.2132034355964;
subject to FinalVelocity_2: v [2,N+1] = -21.2132034355964;
subject to InitialLocation_1: q [1,1] = 0;
subject to InitialLocation_2: q [2,1] = 1000;
subject to FinalLocation_1: q [1,N+1] = 1000;
subject to FinalLocation_2: q [2,N+1] = 0;
subject to TaylorRelation_11 {i in 1..N}:q[1,i+1] = q[1,i]+v[1,i]*delta+a[1,i]*0.5*delta^2;
subject to TaylorRelation_12 {i in 1..N}:q[2,i+1] = q[2,i]+v[2,i]*delta+a[2,i]*0.5*delta^2;
subject to TaylorRelation_21 {i in 1..N}:v[1,i+1] = v[1,i]+a[1,i]*delta;
subject to TaylorRelation_22 {i in 1..N}:v[2,i+1] = v[2,i]+a[2,i]*delta;
subject to MaximumVelocity {i in 1..N+1}:sqrt(v[1,i]^2+v[2,i]^2) <= Vmax;
subject to MinimumVelocity {i in 1..N+1}:sqrt(v[1,i]^2+v[2,i]^2) >= Vmin;
subject to MaximumAcceleration {i in 1..N}:sqrt(a[1,i]^2+a[2,i]^2) <= amax;
subject to SUMlimit {i in 1..N+1}: m_1[i]+m_2[i]+m_3[i]+m_4[i] <= M;
Below are the results of the variable ‘q,’ and it is evident that it does not comply with TaylorRelation_11.
I look forward to receiving some suggestions from someone; your assistance is greatly appreciated.