• 4 replies
  • Latest Post - ‏2013-04-28T12:48:56Z by AlexFleischer
2 Posts

Pinned topic Tutorial ODM 3.7 : Adding Requirements

‏2013-04-18T08:26:39Z |



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 :


  1. Click the Requirements tab. -> Done, no elements under it !

  2. Right-click the Requirements element and choose New Group. -> I can do it but on the "new group" folder that I'm creating, I cannot choose the "add new requirements", the button is in grey and unclickable :(

Thans for your help !


    1 Post

    Re: Tutorial ODM 3.7 : Adding Requirements


    Hi Tom, can you check if the opl model has any error message? Or check for any issue reported in the issue panel.

  • SebastianFink
    2 Posts

    Re: Tutorial ODM 3.7 : Adding Requirements


    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.

    Updated on 2013-04-24T08:01:21Z at 2013-04-24T08:01:21Z by SebastianFink
  • 6BWF_Thomas_PIERRARD
    2 Posts

    Re: Tutorial ODM 3.7 : Adding Requirements



    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)



    maximize cost;

    // ------------ constraints -----------------

    subject to {

       capacity_constraint : sum(x in objIn)(x.weight*xi[]) <= n;



    // ------------ postprocessing -----------------

    execute UPDATE_RESULTS {

        for (var x in objIn) {





    execute DISPLAY {



    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.




  • AlexFleischer
    46 Posts

    Re: Tutorial ODM 3.7 : Adding Requirements




    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