emplog1.gms : 분리 및 논리 조건 테스트

설명

이 모델은 음식 모델의 두 가지 변형 결과를 비교합니다.
EMP 없이.

기여자: Jan-H. Jagla, 2011년 1월

소형 모델 유형 :슬롯 커뮤니티


카테고리 : 슬롯 커뮤니티 테스트 라이브러리


메인 파일 : emplog1.gms

$title 테스트 분리 및 논리 조건 (EMPLOG1,SEQ=508)

$onText
이 모델은 식품 모델의 두 가지 변형 결과를 비교합니다.
EMP 없이.

기여자: Jan-H. 자글라, 2011년 1월
$offText

$call gamslib -q 음식
$if errorlevel 1 $abort gamslib에서 모델 음식을 검색할 수 없습니다.

$call emplib -q foodemp
$if errorlevel 1 $abort emplib에서 모델 foodemp를 검색할 수 없습니다.

$call 슬롯 커뮤니티 food.gms lo=2 gdx=food.gdx
$if errorlevel 1 $abort 음식 실행 실패

$call 슬롯 커뮤니티 foodemp.gms lo=2 gdx=foodemp.gdx
$if errorlevel 1 $abort foodemp 실행 실패

m 기획 기간 설정
     p 원유

변수
     induse(m,p) 월간 원유 사용량 표시
     월간 원유 사용량에 대한 induseEMP(m,p) 표시기
     이익 목적변수
     이익EMP 목적변수;

$gdxIn 음식
$load m,p,induse,이익

$gdxIn foodemp
$load induseEMP=산업,이익EMP=이익

abort$(abs(profit.l-profitEMP.l) > 1e-6) 'profit.l이 다름',profit.l,profitEMP.l;

*모델에는 여러 가지 솔루션이 있으므로 다음 테스트를 반드시 통과할 필요는 없습니다.
$exit
indusediff(m,p)를 설정합니다;
indusediff(m,p) = abs(induse.l(m,p) - induseEMP.l(m,p)) > 1e-6;
abort$card(induseDiff) 'induse.l이 다름', induseDiff, induse.l, induseEMP.l;