Hello community,
hello Robert,
I have a question with regards two the following error message:
C:\Users\Littl\Master Study\test.run, line 25 (offset 1111):
syntax error
context: for {u >>> in <<< ORDERS}
ampl:
and my simple test code is the following:
reset;
display "--------------------------------------------------------";
display "RESET";
model basic_model.mod;
option solver Gurobi;
problem Prob2_Knacksack_Problem :
#...following variables are included in the subset of this problem.
var_item_orientation, var_non_overlapping, var_allocation_point,
#...following objective is included in the subset of this problem.
Knacksack_Problem,
#...following constraints are included in the subset of this problem.
item_orientation_constraint_1, item_orientation_constraint_2, item_orientation_constraint_3, containtment_condition_1,
containtment_condition_2, non_overlapping_condition_1, non_overlapping_condition_2, non_overlapping_condition_3,
non_overlapping_condition_4, non_overlapping_condition_5;
let Items_Volume := 2;
let LOOPED_ORDERS := {1};
for {o in ORDERS: o < 200082526}
{
reset data AXIS_CONTAINER,AXIS_ITEM, length_halved ,item_amount,ITEMS;
display "current order:"&o ;
#data ("load_data_order_"&o&".dat");
display Items_Volume;
let LOOPED_ORDERS := LOOPED_ORDERS union {o};
display LOOPED_ORDERS;
for {u in LOOPED_ORDERS}
display "current order:"&u ;
}
Sadly AMPL does not allow me to utilize the second for loop inside the first one.
I don't know why.
Could you please provide me your guidance?
Best regards,
Pascal