필터 지우기
필터 지우기

unexpected end of file; missing end statement inserted: out of domain MathProg model processing error

조회 수: 2 (최근 30일)
I am optimizing the problem (e.g., minimizing cost) in GLPK. To minimize the cost either we try to minizme the hardware or to use shortest path between source and distination. i am trying to build K-shortest path which is represented by 6*6*3 matrix. i have define some sets, variables, parameters for the objectives and constraints.
#Set and parameters
set N;
/* Set of LAY-2 nodes */
set P;
/* Set of LAY-2 path */
set F;
/*set of all flows*/
param h{u in N, v in N,p in P};
/* set of hop count of the light path (u, v) */
#variables
var k{i in F,u in N,v in N,p in P}, binary;
/* equals to 1, if the p-th path is used (u,v) , otherwise equals to 0; */
#objective
minimize cost: sum{u in N,v in N,i in F,p in P}(k[i,u,v,p]*h[u,v,p]* Bitrate[i]/100);
when i run the code it show me an erro:
Encryption.mod:113: h[1,1,0] out of domain
MathProg model processing error

답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by