the engine log shows "Infeasibility row 'id943': 0 <= -15."
can we find the row of "id943", how to do that, thanks.
the engine log shows "Infeasibility row 'id943': 0 <= -15."
can we find the row of "id943", how to do that, thanks.
Hi,
you should label your constraints.
Let me give you an example:
dvar int x;
dvar int y;
subject to
{
x<=4;
y>=5;
x>=y;
}
gives
Infeasibility row 'c3': 0 >= 1.
which is good but not very helpful, so I label my constraints and write
dvar int x;
dvar int y;
subject to
{
ct1:x<=4;
ct2:y>=5;
ct3:x>=y;
}
and then I get
[-Infinity,4] [-Infinity,5] ct1
which means that if I change ct1 from x<=4; to x<=5; then it will be better.
Regards
- AlexFleischer
- 2013-07-30T13:23:46Z
Hi,
you should label your constraints.
Let me give you an example:
dvar int x;
dvar int y;
subject to
{
x<=4;
y>=5;
x>=y;
}
gives
Infeasibility row 'c3': 0 >= 1.
which is good but not very helpful, so I label my constraints and write
dvar int x;
dvar int y;
subject to
{
ct1:x<=4;
ct2:y>=5;
ct3:x>=y;
}
and then I get
[-Infinity,4] [-Infinity,5] ct1which means that if I change ct1 from x<=4; to x<=5; then it will be better.
Regards
I've all of my constraints labelled, but I still get:
infeasibility row 'id70426': 0 = 1.
Presolve time = 0.84
I'm using OPL 12.2
Am I not getting the constraint name because it is during presolve?
- JaneM
- 2014-10-07T21:19:42Z
I've all of my constraints labelled, but I still get:
infeasibility row 'id70426': 0 = 1.
Presolve time = 0.84
I'm using OPL 12.2
Am I not getting the constraint name because it is during presolve?
Hi,
can you attach your model so that other people in this forum may have a look ?
regards
- AlexFleischer
- 2014-10-08T06:25:13Z
Hi,
can you attach your model so that other people in this forum may have a look ?
regards
My model is quite long and proprietary, so I don't want to attach the whole thing, but I will attach some sections below.
On this issue, I reviewed some of the examples and it looks like I need to declare my constraint names before the minimize statement, then use those constraint names when I specify the constraints. (See format below.)
Eliminating presolve did not provide any further information on which constraints are problems.
By process of elimination, I did find that AsPGLoc1 as an integer rather than float was causing the problem, but I also have other problems related to switching to a sparse, tuple specification - will ask in separate forum thread.
Here is part of my model:
dvar booleanAsPGLoc1[Assign][TimeE];
dvar float+ZPGShLoc1[Assign][TimeE] in 0..1;
minimize sum . . . .;
// Assign all workers
ctAssignAll: forall (g in PlGroups, t in TimeE)
sum(<g,l> in Assign)ZPGShLoc1[<g,l>][t] == 1;
// Count locations for planning groups
ctCountPGLoc1: forall (gl in Assign, t in TimeE)
ZPGShLoc1[gl][t] <= AsPGLoc1[gl][t];
// Limit locations for each planning group
ctLimitNLoc1: forall (g in PlGroups, t in TimeE)
sum(<g,l> in Assign) AsPGLoc1[<g,l>][t] <= MaxLoc1[g] + 1 ;
It looks like I should add the following before my minimize statement:
constraint ctAssignAll[Assign][TimeE];
constraint ctCountPGLoc1[Assign][TimeE];
constraint ctLimitNLoc1[Assign][TimeE];
- JaneM
- 2014-10-08T16:29:15Z
My model is quite long and proprietary, so I don't want to attach the whole thing, but I will attach some sections below.
On this issue, I reviewed some of the examples and it looks like I need to declare my constraint names before the minimize statement, then use those constraint names when I specify the constraints. (See format below.)
Eliminating presolve did not provide any further information on which constraints are problems.
By process of elimination, I did find that AsPGLoc1 as an integer rather than float was causing the problem, but I also have other problems related to switching to a sparse, tuple specification - will ask in separate forum thread.
Here is part of my model:
dvar booleanAsPGLoc1[Assign][TimeE];
dvar float+ZPGShLoc1[Assign][TimeE] in 0..1;
minimize sum . . . .;
// Assign all workers
ctAssignAll: forall (g in PlGroups, t in TimeE)
sum(<g,l> in Assign)ZPGShLoc1[<g,l>][t] == 1;
// Count locations for planning groups
ctCountPGLoc1: forall (gl in Assign, t in TimeE)
ZPGShLoc1[gl][t] <= AsPGLoc1[gl][t];
// Limit locations for each planning group
ctLimitNLoc1: forall (g in PlGroups, t in TimeE)
sum(<g,l> in Assign) AsPGLoc1[<g,l>][t] <= MaxLoc1[g] + 1 ;
It looks like I should add the following before my minimize statement:
constraint ctAssignAll[Assign][TimeE];
constraint ctCountPGLoc1[Assign][TimeE];
constraint ctLimitNLoc1[Assign][TimeE];
Hi,
can you first try to rewrite constraints like
ctAssignAll: forall (g in PlGroups, t in TimeE)
sum(<g,l> in Assign)ZPGShLoc1[<g,l>][t] == 1;
into
forall (g in PlGroups, t in TimeE)
ctAssignAll:
sum(<g,l> in Assign)ZPGShLoc1[<g,l>][t] == 1;
regards
- AlexFleischer
- 2014-10-09T15:28:43Z
Hi,
can you first try to rewrite constraints like
ctAssignAll: forall (g in PlGroups, t in TimeE)
sum(<g,l> in Assign)ZPGShLoc1[<g,l>][t] == 1;
into
forall (g in PlGroups, t in TimeE)
ctAssignAll:
sum(<g,l> in Assign)ZPGShLoc1[<g,l>][t] == 1;
regards
Thank you!
I did get the following infeasibility notification with just this change. I did not need to add the additional constraint statement before the objective function.
Infeasibility row 'ctAssignAll#16#0': 0 = 1.
Just to be sure, the variables in the second index "t in TimeE" are defined from 1 to 5, so I am assuming the #0 refers to the first number in the index, thus 1.
Regarding the <g,l> index, it the same numbering applies, I'm actually looking for the 17th entry in this list.
Jane
- JaneM
- 2014-10-11T19:27:03Z
Thank you!
I did get the following infeasibility notification with just this change. I did not need to add the additional constraint statement before the objective function.
Infeasibility row 'ctAssignAll#16#0': 0 = 1.
Just to be sure, the variables in the second index "t in TimeE" are defined from 1 to 5, so I am assuming the #0 refers to the first number in the index, thus 1.
Regarding the <g,l> index, it the same numbering applies, I'm actually looking for the 17th entry in this list.
Jane
Also, can I add additional constraints for this forall statement, with brackets { . . .}, as follows:
forall (g in PlGroups, t in TimeE) {
ctAssignAll:
sum(<g,l> in Assign)ZPGShLoc1[<g,l>][t] == 1;
ct2: . . . .;
}
- JaneM
- 2014-10-11T19:30:26Z
Also, can I add additional constraints for this forall statement, with brackets { . . .}, as follows:
forall (g in PlGroups, t in TimeE) {
ctAssignAll:
sum(<g,l> in Assign)ZPGShLoc1[<g,l>][t] == 1;
ct2: . . . .;
}
Rereading my constraint, should I be looking at the 17th index in g in PlGroups rather than the 17th entry in <g,l> in Assign?
Also, I've been reading the section online In "IDE and OPL" . . ."Relaxing infeasible models."
It shows conflict information on the conflicts tab, showing the specific names for the indices. In my model, I only see the conflicts in the engine log, with just the index number, as noted above.
How can I get the conflicts to show on the conflict tab?
Here's where identify the g in PlGroups.
// Read Feasible Locations as Sparse Data Set
tuple Pairs {
key string PGLevel2ID;
key string Loc1Name;
};
setof(Pairs) Assign = ...;
// Planning Groups
setof(string) PlGroups =
{g | <g,l> in Assign};
// Detailed Locations
setof(string) LOC1F =
{l | <g,l> in Assign};
- JaneM
- 2014-10-11T19:27:03Z
Thank you!
I did get the following infeasibility notification with just this change. I did not need to add the additional constraint statement before the objective function.
Infeasibility row 'ctAssignAll#16#0': 0 = 1.
Just to be sure, the variables in the second index "t in TimeE" are defined from 1 to 5, so I am assuming the #0 refers to the first number in the index, thus 1.
Regarding the <g,l> index, it the same numbering applies, I'm actually looking for the 17th entry in this list.
Jane
Hi
I think you should have a look at
http://www-01.ibm.com/support/docview.wss?uid=swg21584507
regards
- AlexFleischer
- 2014-10-12T08:14:59Z
Hi
I think you should have a look at
http://www-01.ibm.com/support/docview.wss?uid=swg21584507
regards
Thank you. That worked.
Jane
Hello,
I'm setting some variables in Concert/CPLEX, but it appears to solve "Infeasibility row 'id53': 0 = 1". The variables are declared as unrestricted in sign.
Here is part of my model:
bool solve_inv(DAT& d, CPX_DAT &mono, INV_CPX_DAT &inv) {
IloEnv env = inv.cplex.getEnv();
inv._of = 0.0;
inv.cplex.solve();
inv._of = inv.cplex.getObjValue();
if (inv.cplex.getStatus() != IloAlgorithm::Optimal){
cout << inv.cplex.getStatus() << endl;
// exit(1);
}
for (int k = 1; k <= d.n; k++){
if (d.d1[k] != 0 && d.d2[k] !=0){
mono.r11_p[k] = inv.cplex.getValue(inv.r11[k]);
mono.r12_p[k] = inv.cplex.getValue(inv.r12[k]);
mono.r21_p[k] = inv.cplex.getValue(inv.r21[k]);
mono.r22_p[k] = inv.cplex.getValue(inv.r22[k]);
}
}
return (inv._of);
}
Can you help me, please?
Thank you.
- Karolliny
- 2015-05-21T19:46:52Z
Hello,
I'm setting some variables in Concert/CPLEX, but it appears to solve "Infeasibility row 'id53': 0 = 1". The variables are declared as unrestricted in sign.
Here is part of my model:
bool solve_inv(DAT& d, CPX_DAT &mono, INV_CPX_DAT &inv) {
IloEnv env = inv.cplex.getEnv();
inv._of = 0.0;
inv.cplex.solve();
inv._of = inv.cplex.getObjValue();
if (inv.cplex.getStatus() != IloAlgorithm::Optimal){
cout << inv.cplex.getStatus() << endl;
// exit(1);
}
for (int k = 1; k <= d.n; k++){
if (d.d1[k] != 0 && d.d2[k] !=0){
mono.r11_p[k] = inv.cplex.getValue(inv.r11[k]);
mono.r12_p[k] = inv.cplex.getValue(inv.r12[k]);
mono.r21_p[k] = inv.cplex.getValue(inv.r21[k]);
mono.r22_p[k] = inv.cplex.getValue(inv.r22[k]);
}
}return (inv._of);
}
Can you help me, please?
Thank you.
Hi,
this is not an OPL question so you should post your question at https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000002059
regards