Hello,
I just installed ODME 3.7 working with Eclipse, I'm following the step by step tutorial and I'm stuck on "task8 : Create requirements on goals views and run the completed application."
On steps :
Hello,
I just installed ODME 3.7 working with Eclipse, I'm following the step by step tutorial and I'm stuck on "task8 : Create requirements on goals views and run the completed application."
On steps :
Hi Tom,
you can only convert labelled constraints from the OPL model into requirements - could you also make sure that at least one constraint is labelled, i.e.
forall(r in Resources, t in Periods) not_exceed_resource: sum(p in Products) consumption[r][p] * inside[p][t] <= capacity[r];
where "not_exceed_resource" is the label of the constraint.
Hello !
No errors and the consttraint was uncommented ! :(
What I did is start a new project from scratch. I modelised the famous knapsack problem :
/********************************************* * OPL 12.5 Model * Author: * Creation Date: 23 avr. 2013 at 15:02:17 *********************************************/ include "knapsack_odm.mod";
// ----------- constants ------------------- int n = 8; range R = 1..n;
// ------------ decision variables ----------------- dvar int xi[R] in R;
// ------------ objective ----------------- dexpr float cost = sum(x in objIn) (x.coeff*xi[x.id]);
maximize cost; // ------------ constraints ----------------- subject to { capacity_constraint : sum(x in objIn)(x.weight*xi[x.id]) <= n; };
// ------------ postprocessing ----------------- execute UPDATE_RESULTS { for (var x in objIn) { objOut.add(x.id,x[x.id]); } }
execute DISPLAY { writeln("optim=",objOut); } |
You can see in the file attached that I have no errors nor warning in Eclipse...
And you can see that the menu is still greyed out :(
Thanks for your replies though.
Tom
Hi
but other conditions are needed to map requirements:
the labeled constraint should be a forall that iterates on a tuple set like the one in the getting started manual
regards