Originally posted by: Cagri
As you know, there are some changes between OPL 3 and OPL 4 commands. Now, I am trying to convert a mixed integer linear programming model coded by OPL 3 to OPL 4 or higher code structure. But, I have a problem about "initialize" command used in OPL 3. Please help me to convert commands as below.
// .......mod file command......
tuple PG {
string PGroup;
string Production_Line;
float majorTime; //Use the types float+ and int+ for decision variables only.
float majorCost; //Use the types float+ and int+ for decision variables only.
}
{PG} PGs=...;
tuple JL {
string PGroup;
string Production_Line;
}
{JL} JLs = {<j,l>|<j,l,MTT,MSC> in PGs};
float MT
JLs; //Use the types float+ and int+ for decision variables only.
float MC
JLs; //Use the types float+ and int+ for decision variables only.
//!!!!!!!!!how to change the code below to OPL4!!!!!!!!!!!!!!
initialize forall(<j,l,MTT,MSC> in PGs){ MT<j,l>=MTT; MC<j,l>=MSC; }; // .......data file command......
PGs from DBread (db, "select Product_Group, Line_Name, majorTime, majorCost from P_Group");
JILs from DBread (db, "select Product_Group, Product_Name, Line_Name from JILS");
#DecisionOptimization#MathematicalProgramming-General