help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] implementing constraints in Scala


From: Andrew Makhorin
Subject: Re: [Help-glpk] implementing constraints in Scala
Date: Mon, 08 Aug 2011 21:34:01 +0400

> I have this problem
> 
> \* Problem: Unknown *\
> 
> Minimize
>  objective: + x_1 + x_2 + x_3 + x_4 + x_5
> 
> Subject To
>  constraint1: + 5 x_1 >= 48
>  constraint2: + 2 x_2 >= 35
>  constraint3: + 2 x_3 >= 24
>  constraint4: + 2 x_4 >= 10
>  constraint5: + x_5 >= 8
> 
> End
> 
> After solving I got this
> 
>    No.   Row name   St Activity  Lower bound Upper bound Marginal
>   ------ ------------ -- --------- ----------- ----------- --------
>      1 constraint1  NL        48          48                  0.2
>      2 constraint2  NL        35          35                  0.5
>      3 constraint3  NL        24          24                  0.5
>      4 constraint4  NL        10          10                  0.5
>      5 constraint5  NL         8           8                    1
> 
> 
> then I pass to dual with
> 
>  GLPK.glp_get_row_dual(lp,rowId+1) (which give all 0)
> 
> 
> I got error when I try to make bounds with
> GLPK.glp_set_col_bnds(lp, colId+1, GLPKConstants.GLP_DB, low, up)

Your question is unclear. Please formulate it more precisely.




reply via email to

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