Hi everyone!
I'm trying to calibrate a PMP model trough the Ward Method but I can't. I would liketo represent the irrigated crop pattern of an irrigated area in Southern Italy.
The equation system is characterized by: GM maximization subject to LAND constraint, WATER constraint and LABOUR constraint.
The model roughly calibrate without LABOUR constraint but when I add it the model tell me:
Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK
0 0 1.5115316315E+06 (Input point)
** An equation is inconsistent with other equations in the
pretriangular part of the model.
I attached the the model at the end of this message.
Anyone has any suggestion?
Thank you so much
Laura
PMP (Ward method) applied to agricultural systems

 User
 Posts: 4
 Joined: 1 week ago
Re: PMP (Ward method) applied to agricultural systems
Laura,
Please also share the data files which are required to run your code.
It may also be helpful to search for th eerror message you are getting in the conopt manual.
Best,
Fred
Please also share the data files which are required to run your code.
It may also be helpful to search for th eerror message you are getting in the conopt manual.
Best,
Fred

 User
 Posts: 4
 Joined: 1 week ago
Re: PMP (Ward method) applied to agricultural systems
Hi everyone!
I'm trying to calibrate a PMP model trough the Ward Method but I can't. I would liketo represent the irrigated crop pattern of an irrigated area in Southern Italy.
The equation system is characterized by: GM maximization subject to LAND constraint, WATER constraint and LABOUR constraint.
The model roughly calibrate without LABOUR constraint but when I add it the model tell me:
Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK
0 0 1.5115316315E+06 (Input point)
** An equation is inconsistent with other equations in the
pretriangular part of the model.
I attached the the model and the DATA FILE at the end of this message.
Anyone has any suggestion?
Thank you so much
Laura
I'm trying to calibrate a PMP model trough the Ward Method but I can't. I would liketo represent the irrigated crop pattern of an irrigated area in Southern Italy.
The equation system is characterized by: GM maximization subject to LAND constraint, WATER constraint and LABOUR constraint.
The model roughly calibrate without LABOUR constraint but when I add it the model tell me:
Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK
0 0 1.5115316315E+06 (Input point)
** An equation is inconsistent with other equations in the
pretriangular part of the model.
I attached the the model and the DATA FILE at the end of this message.
Anyone has any suggestion?
Thank you so much
Laura
Re: PMP (Ward method) applied to agricultural systems
in the lst file, you can find which equation conopt finds problematic during presolve.
Looking at your code I see equation EQ_klav uses variable totlav which is defined through equation Eq_totlav.
I do not understand the model in depth but equation Eq_totlav looks wrong to me. You are generating 12 constraints through this equation that basically would cause aqlav(sallab,<month>) being identical for all month:
I guess what you want might be something like this:
where totlav is the sum of aqlav over all months:
This is just a guess... I hope this helps!
Fred
Code: Select all
**** ERRORS/WARNINGS IN EQUATION Eq_klav
1 error(s): Inconsistency in pretriangular part of model.
Code: Select all
Eq_totlav ('sallab',m).. totlav('sallab') =e= aqlav ('sallab',m);
Eq_klav.. klav =e= sum (ltype, totlav(ltype)*lab_wage(ltype));
Code: Select all
 Eq_totlav =E= labour requirements for each cluster and each farmtype
Eq_totlav(sallab,GEN)..  aqlav(sallab,GEN) + totlav(sallab) =E= 0 ; (LHS = 0)
Eq_totlav(sallab,FEB)..  aqlav(sallab,FEB) + totlav(sallab) =E= 0 ; (LHS = 0)
Eq_totlav(sallab,MAR)..  aqlav(sallab,MAR) + totlav(sallab) =E= 0 ; (LHS = 0)
Eq_totlav(sallab,APR)..  aqlav(sallab,APR) + totlav(sallab) =E= 0 ; (LHS = 0)
Eq_totlav(sallab,MAG)..  aqlav(sallab,MAG) + totlav(sallab) =E= 0 ; (LHS = 0)
Eq_totlav(sallab,GIU)..  aqlav(sallab,GIU) + totlav(sallab) =E= 0 ; (LHS = 0)
Eq_totlav(sallab,LUG)..  aqlav(sallab,LUG) + totlav(sallab) =E= 0 ; (LHS = 0)
Eq_totlav(sallab,AGO)..  aqlav(sallab,AGO) + totlav(sallab) =E= 0 ; (LHS = 0)
Eq_totlav(sallab,SET)..  aqlav(sallab,SET) + totlav(sallab) =E= 0 ; (LHS = 0)
Eq_totlav(sallab,OTT)..  aqlav(sallab,OTT) + totlav(sallab) =E= 0 ; (LHS = 0)
Eq_totlav(sallab,NOV)..  aqlav(sallab,NOV) + totlav(sallab) =E= 0 ; (LHS = 0)
Eq_totlav(sallab,DIC)..  aqlav(sallab,DIC) + totlav(sallab) =E= 0 ; (LHS = 0)
I guess what you want might be something like this:
Code: Select all
Eq_totlav ('sallab').. totlav('sallab') =e= sum(m, aqlav ('sallab',m));
Code: Select all
 Eq_totlav =E= labour requirements for each cluster and each farmtype
Eq_totlav(sallab)..  aqlav(sallab,GEN)  aqlav(sallab,FEB)  aqlav(sallab,MAR)  aqlav(sallab,APR)  aqlav(sallab,MAG)  aqlav(sallab,GIU)  aqlav(sallab,LUG)  aqlav(sallab,AGO)  aqlav(sallab,SET)  aqlav(sallab,OTT)  aqlav(sallab,NOV)  aqlav(sallab,DIC) + totlav(sallab) =E= 0 ; (LHS = 0)
Fred

 User
 Posts: 4
 Joined: 1 week ago
Re: PMP (Ward method) applied to agricultural systems
Dear Fred,
Thank you so much for your help!
Actually, following your suggestion the problem of inconsistence disappear and the calibration improved! However, another problem rise up, now GAMS tell me:
** Optimal solution. Reduced gradient less than tolerance.
"The solution is a locally optimal interior solution. The largest component of the reduced gradient is less than the tolerance rtredg with default value 1.e7. The value of the objective function is very accurate while the values of the variables are less accurate due to a flat objective function in the interior of the feasible area."
Any suggestion to solve this problem?
Thank you
Laura
Thank you so much for your help!
Actually, following your suggestion the problem of inconsistence disappear and the calibration improved! However, another problem rise up, now GAMS tell me:
** Optimal solution. Reduced gradient less than tolerance.
"The solution is a locally optimal interior solution. The largest component of the reduced gradient is less than the tolerance rtredg with default value 1.e7. The value of the objective function is very accurate while the values of the variables are less accurate due to a flat objective function in the interior of the feasible area."
Any suggestion to solve this problem?
Thank you
Laura
Re: PMP (Ward method) applied to agricultural systems
Not sure if I would call this a problem. Solvers work with finite precision arithmetics and the solution you get is locally optimal subject to these tolerances.
Fred
Fred

 User
 Posts: 4
 Joined: 1 week ago
Re: PMP (Ward method) applied to agricultural systems
Thank you,
so it's just a matter of precision but model can find the solution.
I've just noticed that the tolerance was not the only " porblem" in the lst. file GAMS report also:
** Warning ** The value of LFITER is out of range.
LFITER is decreased from 2147483647 to 1000000000.
Pretriangular equations: 26
Posttriangular equations: 3
Is this a problem? Maybe data are wrong or it coulb be about the equation syntax?
Thanks in advance
Laura
so it's just a matter of precision but model can find the solution.
I've just noticed that the tolerance was not the only " porblem" in the lst. file GAMS report also:
** Warning ** The value of LFITER is out of range.
LFITER is decreased from 2147483647 to 1000000000.
Pretriangular equations: 26
Posttriangular equations: 3
Is this a problem? Maybe data are wrong or it coulb be about the equation syntax?
Thanks in advance
Laura
Re: PMP (Ward method) applied to agricultural systems
This is not a problem. The GAMS default iteration limit iterlim is ~2.1e9 but conopt allows a max limit of 1.0e9, so it resets the iteration limit. Your model is very very very far from coming close to the iteration limit.
Fred
Fred