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