설명
이 테스트는 비동기식 해결이 저장점을 생성하는지 확인합니다. 뿐만 아니라. 기고자: Lutz Westermann, 2021년 6월
소형 모델 유형 :슬롯 머신
카테고리 : 슬롯 머신 테스트 라이브러리
메인 파일 : savep2.gms
$title 비동기 해결을 사용한 테스트 저장점(SAVEP2,SEQ=864)
$onText
이 테스트는 비동기식 해결이 저장점을 생성하는지 확인합니다.
뿐만 아니라.
기고자: Lutz Westermann, 2021년 6월
$offText
$onEchoV > trans.gms
세트
i '통조림 식물' / 시애틀, 샌디에이고 /
j 'markets' / 뉴욕, 시카고, 토피카 /;
매개변수
a(i) '경우에 따라 식물 i의 용량'
/시애틀 350
샌디에이고 600 /
b(j) '경우에 따라 시장 j의 수요'
/ 뉴욕 325
시카고 300
토피카 275 /;
테이블 d(i,j) '거리(천 마일)'
뉴욕 시카고 토피카
시애틀 2.5 1.7 1.8
샌디에고 2.5 1.8 1.4;
스칼라 f '1,000마일당 케이스당 운임(달러)' / 90 /;
매개변수 c(i,j) '케이스당 운송 비용(단위: 수천 달러)';
c(i,j) = f*d(i,j)/1000;
변수
x(i,j) '케이스의 선적 수량'
z '총 운송 비용(천 달러)';
양수 변수 x;
방정식
비용 '목적 함수 정의'
Supply(i) '공장 i의 공급 제한을 준수합니다.'
수요(j) '시장 j의 수요를 충족';
비용.. z =e= sum((i,j), c(i,j)*x(i,j));
공급(i).. sum(j, x(i,j)) =l= a(i);
수요(j)..sum(i, x(i,j)) =g= b(j);
모델 전송%슬롯 머신solveLink% / 모두 /;
z를 최소화하는 lp를 사용하여 Transport%슬롯 머신solveLink%를 해결합니다.
x.lo(i,j) = 100;
z를 최소화하는 lp를 사용하여 Transport%슬롯 머신solveLink%를 해결합니다.
$offEcho
$call.checkErrorLevel 슬롯 머신 trans.gms sl=4 savePoint=1 lo=%슬롯 머신lo%
$call.checkErrorLevel 슬롯 머신 trans.gms sl=5 savePoint=1 lo=%슬롯 머신lo%
$call.checkErrorLevel 슬롯 머신 trans.gms sl=7 savePoint=1 lo=%슬롯 머신lo%
$call.checkErrorLevel gdxdiff Transport4_p.gdx Transport5_p.gdx > %system.nullfile%
$call.checkErrorLevel gdxdiff Transport7_p.gdx Transport5_p.gdx > %system.nullfile%
$call.checkErrorLevel 슬롯 머신 trans.gms sl=4 savePoint=2 lo=%슬롯 머신lo%
$call.checkErrorLevel 슬롯 머신 trans.gms sl=5 savePoint=2 lo=%슬롯 머신lo%
$call.checkErrorLevel 슬롯 머신 trans.gms sl=7 savePoint=2 lo=%슬롯 머신lo%
$call.checkErrorLevel gdxdiff Transport4_p1.gdx Transport5_p1.gdx > %system.nullfile%
$call.checkErrorLevel gdxdiff Transport7_p1.gdx Transport5_p1.gdx > %system.nullfile%
$call.checkErrorLevel gdxdiff Transport4_p2.gdx Transport5_p2.gdx > %system.nullfile%
$call.checkErrorLevel gdxdiff Transport7_p2.gdx Transport5_p2.gdx > %system.nullfile%