unexpected end of file; missing end statement inserted: out of domain MathProg model processing error
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with Optimization Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!