help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] question about glpk


From: Chi-Feng Chen
Subject: [Help-glpk] question about glpk
Date: Sun, 18 Sep 2005 00:18:58 +0800

 

Dear programmers or maintainers,

 

I am Chi-Feng Chen, a PhD student from Taiwan.

I am so glad that there is the additional package of linear programming embedded in R.

In order to learn how to use this package, I tried the brief example (section 1.3) in the reference manual.

However, some syntax is not recognized by R, especially the array setting.

Could you please show me how to translate the following part to an R language?

 

s21:  ia[1] = 1, ja[1] = 1, ar[1] =  1.0; /* a[1,1] =  1 */

s22:  ia[2] = 1, ja[2] = 2, ar[2] =  1.0; /* a[1,2] =  1 */

s23:  ia[3] = 1, ja[3] = 3, ar[3] =  1.0; /* a[1,3] =  1 */

s24:  ia[4] = 2, ja[4] = 1, ar[4] = 10.0; /* a[2,1] = 10 */

s25:  ia[5] = 3, ja[5] = 1, ar[5] =  2.0; /* a[3,1] =  2 */

s26:  ia[6] = 2, ja[6] = 2, ar[6] =  4.0; /* a[2,2] =  4 */

s27:  ia[7] = 3, ja[7] = 2, ar[7] =  2.0; /* a[3,2] =  2 */

s28:  ia[8] = 2, ja[8] = 3, ar[8] =  5.0; /* a[2,3] =  5 */

s29:  ia[9] = 3, ja[9] = 3, ar[9] =  6.0; /* a[3,3] =  6 */

s30:  lpx_load_matrix(lp, 9, ia, ja, ar);

 

Thank you very much.

 

With regards,

 

Chi-Feng

 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]