1
新AMPLに、以下のモデルの立地に構文エラーを取得「>>>>>; < < < < < <」問題のように:demand
パラメータがオーバーインデックスが作成されAMPL構文エラー ";"
set Types;
param demand {Types};
set Machines;
param prod_cost {Machines, Types};
param days_reqd {Machines, Types};
param days_avail {Machines};
var x {Machines, Types} >=0; # amount produced
minimize total_cost: sum {m in Machines, t in Types} prod_cost[m,t] * x[m,t] ;
subject to machine_capacity: sum {m in Machines, t in Types} x[m,t] * days_reqd[m,t] <= days_avail[m] ;
subject to satisfy_demand: sum {m in Machines, t in Types} x[m,t] >= demand ;