로드 중...
검색 중...
일치하는 항목 없음
운송 클래스 참조

#include <수송.h>

풀릭 메소드

 운송 (슬롯 나라::GAMSWorkspacews)
 교통 문제.
 
무효 실행 (슬롯 나라::GAMSCheckpoint체크포인트, std::ostream 및 출력)
 trnsport 모델을 실행합니다.
 
슬롯 나라::GAMSSet i() const
 i(i): 통조림 공장
 
슬롯 나라::GAMSSet j() const
 j(j): 시장
 
슬롯 나라::슬롯 나라매개변수 a() const
 a(i): 경우에 따라 공장 i의 용량
 
슬롯 나라::슬롯 나라매개변수 b() const
 b(i): 경우에 따라 시장 j의 수요
 
슬롯 나라::슬롯 나라매개변수 d() const
 d(i,j): 거리(천 마일)
 
슬롯 나라::슬롯 나라매개변수 f() const
 f: 천 마일당 케이스당 화물(달러)
 
슬롯 나라::슬롯 나라변수 x() const
 x(i,j): 케이스의 배송 수량
 
슬롯 나라::슬롯 나라변수 z() const
 z: 총 운송 비용(단위: 수천 달러)
 
슬롯 나라::GAMSOptions 선택() const
 trnsport 모델 실행을 위한 옵션.
 

상세 설명

라인 정의36파일수송.h.

생성자

◆ 수송()

운송::운송 ( 슬롯 나라::GAMSWorkspace ws)

교통 문제.

라인 정의35파일transport.cpp.

36: fws(ws)
37, 직업(fws.addJobFromString(getModelSource()))
38, fopt(fws.추가옵션())
39{
40fws = ws;
41fopt = ws.추가옵션();
42
43fDbIn1 = ws.추가데이터베이스("", "dbIn1");
44fDbIn2 = ws.추가데이터베이스("", "dbIn2");
45
47fopt.setAllModelTypes("복합단지");
48fopt.setDefine("dbOut1", "dbOut1");
49
50fi = fDbIn1.추가세트("나", "통조림 공장");
51fj = fDbIn1.추가세트("j", "시장");
52fa = fDbIn1.addParameter("a", "케이스에 있는 식물 i의 용량", fi);
53fb = fDbIn1.addParameter("b", "경우에 따라 시장 j의 수요", fj);
54fd = fDbIn1.addParameter("d", "수천 마일 단위의 거리", fi, fj);
55ff = fDbIn2.addParameter("f", "1,000마일당 케이스당 화물(달러)");
56
57직업 = ws.addJobFromString(getModelSource());
58}
GAMSSet addSet(const std::string &name, const int 차원, const std::string &explanatoryText="", GAMSEnum::SetType setType=GAMSEnum::SetType::Multi)
GAMSParameter addParameter(const std::string &name, const int 차원, const std::string &explanatoryText="")
void setAllModelTypes(const std::string &solver)
void setDefine(const std::string &key, const std::string &value)
void setSolveLink(const GAMSOptions::ESolveLink::ESolveLinkEnum value)
GAMSJob addJobFromString(const std::string &gamsSource, const std::string &jobName="")
GAMSDatabase addDatabase(const std::string &databaseName="", const std::string &inModelName="")

방법

◆ a()

슬롯 나라::슬롯 나라매개변수교통수단::a ( ) const
인라인

a(i): 경우에 따라 플랜트 i의 용량

라인 정의58파일수송.h.

59{
60 반환파;
61}

참조자메인().

◆ b()

슬롯 나라::슬롯 나라매개변수운송::b ( ) const
인라인

b(i): 경우에 따라 시장 j의 수요

라인 정의64파일수송.h.

65{
66 반환fb;
67}

참조자메인().

◆ d()

슬롯 나라::슬롯 나라매개변수운송::d ( ) const
인라인

d(i,j): 거리(천 마일)

라인 정의70파일수송.h.

71{
72 반환fd;
73}

참조자메인().

◆ f()

슬롯 나라::GAMSParameter운송::f ( ) const
인라인

f: 천 마일당 케이스당 화물(달러)

라인 정의76파일수송.h.

77{
78 반환ff;
79}

참조자메인().

◆ i()

슬롯 나라::GAMSSet운송::i ( ) const
인라인

i(i): 통조림 공장

라인 정의46파일수송.h.

47{
48 반환fi;
49}

참조자메인().

◆ j()

슬롯 나라::GAMSSet교통수단::j ( ) const
인라인

j(j): 시장

라인 정의52파일수송.h.

53{
54 반환fj;
55}

참조자메인().

◆ 선택()

슬롯 나라::GAMSOptions운송::opt ( ) const
인라인

trnsport 모델 실행을 위한 옵션.

라인 정의94파일수송.h.

95{
96 반환fopt;
97}

참조자메인().

◆ 실행()

void Transport::run ( 슬롯 나라::GAMSCheckpoint 체크포인트,
std::ostream & 출력 )

trnsport 모델을 실행합니다.

라인 정의60파일수송.cpp.

61{
62 if(!fDbIn1.checkDomains())
63 던지기 슬롯 나라예외("데이터베이스 1의 도메인 오류");
64 if(!fDbIn2.checkDomains())
65 던지기 슬롯 나라예외("데이터베이스 2의 도메인 오류");
66
67벡터<GAMSDatabase> dbs fDbIn1, fDbIn2;
68직업.실행(fopt, 체크포인트, 출력,거짓, DBS);
69
70fDbOut1 = fws.addDatabaseFromGDX(fopt.getDefine("dbOut1") +".gdx");
71fx = fDbOut1.get변수("x");
72fz = fDbOut1.get변수("z");
73}
GAMSVariable getVariable(const std::string &name)
std::string getDefine(const std::string &key)
GAMSDatabase addDatabaseFromGDX(const std::string &gdxFileName, const std::string &databaseName, const std::string &inModelName)

참조자메인().

◆ x()

슬롯 나라::슬롯 나라변수운송::x ( ) const
인라인

x(i,j): 케이스의 배송 수량

라인 정의82파일수송.h.

83{
84 반환fx;
85}

참조자메인().

◆ z()

슬롯 나라::슬롯 나라변수운송::z ( ) const
인라인

z: 총 운송 비용(천 달러)

라인 정의88파일수송.h.

89{
90 반환fz;
91}

참조자메인().


이 클래스에 대한 문서는 다음 파일에서 생성되었습니다: