인 경우 모델에 익숙하지만 GAMS가 제약 조건을 위반한다고 생각하기 때문에 결과에 대해 불편합니다. 내가 GAMS에 말하고 싶은 것은 :GAMS의 기능이
는 "처음 수요를 확인 -> 당시 주식 확인 ->을 충분히 주식은 현재 주식에서 판매하고있다 경우 ->하지 충분한 주식이 경우 먼저 구매 (생산) 한 다음 판매하십시오. "
GAMS는 어떤 요구 (판매)를 따르지 않으며 모든 최소값을 구매하지 않고 모든 것을 판매한다고 생각합니다.
모델은 이하입니다 :
Sets
i items /s,p,b/
t time in quarters /1,2,3/
Parameters
price(i) selling price per unit i per quarter in euros /s 6.34, p 6.46, b 5.93/
inistock(i) initial stock in units /s 320000, p 296199, b 104208/
cap(i) capacity limit for each unit /s 400000, p 350000, b 150000/
c cost of holding 1 unit of i /s 10, p 15, b 12/
Scalars
tcap total capacity of warehouse /650000/
Variables
stock(i,t) stock stored at time t
sell(i,t) stock sold at time t
buy(i,t) stock bought at time t
cost total cost
Positive Variables stock,sell,buy
Equations
cst total cost occurs
stck(i,t) stock balance of unit i at time t;
cst.. cost=e=sum((i,t),price(i)*(buy(i,t)-sell(i,t))+c(i)*stock(i,t));
stck(i,t).. stock(i,t)=e=inistock(i)+stock(i,t-1)+buy(i,t)-sell(i,t);
stck.up(i,t)=tcap;
Option LP=Cplex ;
Option optcr=0;
Model TWH The Warehouse Problem/all /;
Solve TWH minimizing cost using lp;
당신의 지원을위한 미리 감사합니다!