5wsInfo = 크레이지 슬롯control.WorkspaceInfo();
6wsInfo.systemDirectory = varargin1;
7ws = 크레이지 슬롯control.Workspace(wsInfo);
9ws = 크레이지 슬롯control.Workspace();
12% 작업 생성
't1'에서
'trn스포츠'크레이지 슬롯 모델 라이브러리의 모델
13t1 = ws.addJobFromGamsLib(
'trn스포츠');
17% 변수 검색
'x'욥으로부터
의 출력 데이터베이스
18fprintf('기본값으로 실행:\n
');
19for x = t1.outDB.getVariable('x
').기록
20fprintf('x(%s,%s): 레벨=%g 한계=%g\n
', x1.keys:, x1.level, x1.marginal);
27opt1 = ws.addOptions();
28%는 '의 모든 모델 유형을 설정했습니다.선택1
' '에 대해익스프레스
'
29opt1.setAllModelTypes('익스프레스
');
33%는 변수 '를 검색합니다.x
' 욥에게서's 출력 데이터베이스
34fprintf(
'\nXPRESS로 실행:\n');
35 forx = t1.outDB.getVariable(
'x').기록
36fprintf(
'x(%s,%s): 레벨=%g 한계=%g\n', x1.keys:, x1.level, x1.marginal);
43% 파일 쓰기
'xpress.opt'작업공간 아래
의 작업 디렉토리
44fid = fopen(fullfile(ws.workingDirectory, 'xpress.opt
'), 'w
');
45fprintf(fid, '알고리즘=장벽
');
49opt2 = ws.addOptions();
50%는 '의 모든 모델 유형을 설정했습니다.opt2
' '에 대해익스프레스
'
51opt2.setAllModelTypes('익스프레스
');
5231063_31080opt2
', '를 사용하세요xpress.opt
' 해결사로's 옵션 파일
55% 작업 실행
't2'옵션 포함
'opt2'그리고 로그인을 캡처
'transport1_xpress.log'.
56출력 = 크레이지 슬롯control.PrintStream(fullfile(ws.workingDirectory,
'transport1_xpress.log'));
60% 검색 변수
'x'욥으로부터
의 출력 데이터베이스
61fprintf('\n비-를 사용하여 XPRESS를 사용하여 실행했습니다.
기본값옵션:\n
');
62for x = t1.outDB.getVariable('x
').기록
63fprintf('x(%s,%s): 레벨=%g 한계=%g\n
', x1.keys:, x1.level, x1.marginal);
71rmdir(ws.workingDirectory, 's
');