# Changeset 2379

Ignore:
Timestamp:
Feb 19, 2010 5:31:35 PM (11 years ago)
Message:

Resolving a weakness in the pmedian.py data declaration. The facility
'd' data was monotonically increasing for every facility, so only one sensor placement
was important. The current model eliminates this, which should make the results portable
to other solvers.

Location:
coopr.pyomo/trunk/coopr/pyomo/tests/examples
Files:
5 edited

Unmodified
Removed
• ## coopr.pyomo/trunk/coopr/pyomo/tests/examples/pmedian.py

 r2005 from coopr.pyomo import * import math model = Model() def d_rule(n, m, model): return n*2.33333+m*7.99999 return math.sin(n*2.33333+m*7.99999) model.d = Param(model.Locations, model.Customers, rule=d_rule, within=Reals)
• ## coopr.pyomo/trunk/coopr/pyomo/tests/examples/test1.txt

 r2253 # ---------------------------------------------------------- Problem: - Lower bound: 181.99977 - Lower bound: -5.015609 Upper bound: inf Number of objectives: 1 f: Id: 0 Value: 181.99977 Value: -5.015609 Variable: x[1,1]: Id: 0 x[3,2]: Id: 13 Value: 1 x[1,2]: Id: 1 x[3,6]: Id: 17 Value: 1 x[1,3]: Id: 2 x[4,1]: Id: 18 Value: 1 x[1,4]: Id: 3 x[4,4]: Id: 21 Value: 1 x[1,5]: Id: 4 x[4,5]: Id: 22 Value: 1 x[1,6]: Id: 5 x[5,3]: Id: 26 Value: 1 y[1]: Id: 30 y[3]: Id: 32 Value: 1 y[2]: Id: 31 y[4]: Id: 33 Value: 1 y[5]:
• ## coopr.pyomo/trunk/coopr/pyomo/tests/examples/test10.txt

 r2253 Construcing constraint num_facilities Constructing constraint index None Writing model unknown to file '/tmp/tmpb2g1nA.pyomo.lp'  with format cpxlp Writing model unknown to file '/tmp/tmpAOfXAP.pyomo.lp'  with format cpxlp # ========================================================== # ---------------------------------------------------------- Problem: - Lower bound: 181.99977 - Lower bound: -5.015609 Upper bound: inf Number of objectives: 1 f: Id: 0 Value: 181.99977 Value: -5.015609 Variable: x[1,1]: Id: 0 x[3,2]: Id: 13 Value: 1 x[1,2]: Id: 1 x[3,6]: Id: 17 Value: 1 x[1,3]: Id: 2 x[4,1]: Id: 18 Value: 1 x[1,4]: Id: 3 x[4,4]: Id: 21 Value: 1 x[1,5]: Id: 4 x[4,5]: Id: 22 Value: 1 x[1,6]: Id: 5 x[5,3]: Id: 26 Value: 1 y[1]: Id: 30 y[3]: Id: 32 Value: 1 y[2]: Id: 31 y[4]: Id: 33 Value: 1 y[5]:
• ## coopr.pyomo/trunk/coopr/pyomo/tests/examples/test11.txt

 r2253 3 d :  Size=30         Domain=Reals (1, 1) : 10.33332 (1, 2) : 18.33331 (1, 3) : 26.3333 (1, 4) : 34.33329 (1, 5) : 42.33328 (1, 6) : 50.33327 (2, 1) : 12.66665 (2, 2) : 20.66664 (2, 3) : 28.66663 (2, 4) : 36.66662 (2, 5) : 44.66661 (2, 6) : 52.6666 (3, 1) : 14.99998 (3, 2) : 22.99997 (3, 3) : 30.99996 (3, 4) : 38.99995 (3, 5) : 46.99994 (3, 6) : 54.99993 (4, 1) : 17.33331 (4, 2) : 25.3333 (4, 3) : 33.33329 (4, 4) : 41.33328 (4, 5) : 49.33327 (4, 6) : 57.33326 (5, 1) : 19.66664 (5, 2) : 27.66663 (5, 3) : 35.66662 (5, 4) : 43.66661 (5, 5) : 51.6666 (5, 6) : 59.66659 (1, 1) : -0.788608083678 (1, 2) : -0.493618782917 (1, 3) : 0.93224141556 (1, 4) : 0.222354914382 (1, 5) : -0.996942310904 (1, 6) : 0.0677356388252 (2, 1) : 0.100111402623 (2, 2) : 0.969824168356 (2, 3) : -0.382311111107 (2, 4) : -0.858579174032 (2, 5) : 0.632140719945 (2, 6) : 0.674638690066 (3, 1) : 0.650303033785 (3, 2) : -0.846204418804 (3, 3) : -0.404074234694 (3, 4) : 0.963782052933 (3, 5) : 0.123632662651 (3, 6) : -0.999756719782 (4, 1) : -0.998512495568 (4, 2) : 0.19921693281 (4, 3) : 0.940544296591 (4, 4) : -0.472896775996 (4, 5) : -0.802940660094 (4, 6) : 0.706536674445 (5, 1) : 0.729153420716 (5, 2) : 0.570983943317 (5, 3) : -0.895298488668 (5, 4) : -0.310469738009 (5, 5) : 0.985639060101 (5, 6) : 0.02366820789 2 Var Declarations 3 d :  Size=30         Domain=Reals (1, 1) : 10.33332 (1, 2) : 18.33331 (1, 3) : 26.3333 (1, 4) : 34.33329 (1, 5) : 42.33328 (1, 6) : 50.33327 (2, 1) : 12.66665 (2, 2) : 20.66664 (2, 3) : 28.66663 (2, 4) : 36.66662 (2, 5) : 44.66661 (2, 6) : 52.6666 (3, 1) : 14.99998 (3, 2) : 22.99997 (3, 3) : 30.99996 (3, 4) : 38.99995 (3, 5) : 46.99994 (3, 6) : 54.99993 (4, 1) : 17.33331 (4, 2) : 25.3333 (4, 3) : 33.33329 (4, 4) : 41.33328 (4, 5) : 49.33327 (4, 6) : 57.33326 (5, 1) : 19.66664 (5, 2) : 27.66663 (5, 3) : 35.66662 (5, 4) : 43.66661 (5, 5) : 51.6666 (5, 6) : 59.66659 (1, 1) : -0.788608083678 (1, 2) : -0.493618782917 (1, 3) : 0.93224141556 (1, 4) : 0.222354914382 (1, 5) : -0.996942310904 (1, 6) : 0.0677356388252 (2, 1) : 0.100111402623 (2, 2) : 0.969824168356 (2, 3) : -0.382311111107 (2, 4) : -0.858579174032 (2, 5) : 0.632140719945 (2, 6) : 0.674638690066 (3, 1) : 0.650303033785 (3, 2) : -0.846204418804 (3, 3) : -0.404074234694 (3, 4) : 0.963782052933 (3, 5) : 0.123632662651 (3, 6) : -0.999756719782 (4, 1) : -0.998512495568 (4, 2) : 0.19921693281 (4, 3) : 0.940544296591 (4, 4) : -0.472896775996 (4, 5) : -0.802940660094 (4, 6) : 0.706536674445 (5, 1) : 0.729153420716 (5, 2) : 0.570983943317 (5, 3) : -0.895298488668 (5, 4) : -0.310469738009 (5, 5) : 0.985639060101 (5, 6) : 0.02366820789 2 Var Declarations 3 d :  Size=30         Domain=Reals (1, 1) : 10.33332 (1, 2) : 18.33331 (1, 3) : 26.3333 (1, 4) : 34.33329 (1, 5) : 42.33328 (1, 6) : 50.33327 (2, 1) : 12.66665 (2, 2) : 20.66664 (2, 3) : 28.66663 (2, 4) : 36.66662 (2, 5) : 44.66661 (2, 6) : 52.6666 (3, 1) : 14.99998 (3, 2) : 22.99997 (3, 3) : 30.99996 (3, 4) : 38.99995 (3, 5) : 46.99994 (3, 6) : 54.99993 (4, 1) : 17.33331 (4, 2) : 25.3333 (4, 3) : 33.33329 (4, 4) : 41.33328 (4, 5) : 49.33327 (4, 6) : 57.33326 (5, 1) : 19.66664 (5, 2) : 27.66663 (5, 3) : 35.66662 (5, 4) : 43.66661 (5, 5) : 51.6666 (5, 6) : 59.66659 (1, 1) : -0.788608083678 (1, 2) : -0.493618782917 (1, 3) : 0.93224141556 (1, 4) : 0.222354914382 (1, 5) : -0.996942310904 (1, 6) : 0.0677356388252 (2, 1) : 0.100111402623 (2, 2) : 0.969824168356 (2, 3) : -0.382311111107 (2, 4) : -0.858579174032 (2, 5) : 0.632140719945 (2, 6) : 0.674638690066 (3, 1) : 0.650303033785 (3, 2) : -0.846204418804 (3, 3) : -0.404074234694 (3, 4) : 0.963782052933 (3, 5) : 0.123632662651 (3, 6) : -0.999756719782 (4, 1) : -0.998512495568 (4, 2) : 0.19921693281 (4, 3) : 0.940544296591 (4, 4) : -0.472896775996 (4, 5) : -0.802940660094 (4, 6) : 0.706536674445 (5, 1) : 0.729153420716 (5, 2) : 0.570983943317 (5, 3) : -0.895298488668 (5, 4) : -0.310469738009 (5, 5) : 0.985639060101 (5, 6) : 0.02366820789 2 Var Declarations 3 d :  Size=30         Domain=Reals (1, 1) : 10.33332 (1, 2) : 18.33331 (1, 3) : 26.3333 (1, 4) : 34.33329 (1, 5) : 42.33328 (1, 6) : 50.33327 (2, 1) : 12.66665 (2, 2) : 20.66664 (2, 3) : 28.66663 (2, 4) : 36.66662 (2, 5) : 44.66661 (2, 6) : 52.6666 (3, 1) : 14.99998 (3, 2) : 22.99997 (3, 3) : 30.99996 (3, 4) : 38.99995 (3, 5) : 46.99994 (3, 6) : 54.99993 (4, 1) : 17.33331 (4, 2) : 25.3333 (4, 3) : 33.33329 (4, 4) : 41.33328 (4, 5) : 49.33327 (4, 6) : 57.33326 (5, 1) : 19.66664 (5, 2) : 27.66663 (5, 3) : 35.66662 (5, 4) : 43.66661 (5, 5) : 51.6666 (5, 6) : 59.66659 (1, 1) : -0.788608083678 (1, 2) : -0.493618782917 (1, 3) : 0.93224141556 (1, 4) : 0.222354914382 (1, 5) : -0.996942310904 (1, 6) : 0.0677356388252 (2, 1) : 0.100111402623 (2, 2) : 0.969824168356 (2, 3) : -0.382311111107 (2, 4) : -0.858579174032 (2, 5) : 0.632140719945 (2, 6) : 0.674638690066 (3, 1) : 0.650303033785 (3, 2) : -0.846204418804 (3, 3) : -0.404074234694 (3, 4) : 0.963782052933 (3, 5) : 0.123632662651 (3, 6) : -0.999756719782 (4, 1) : -0.998512495568 (4, 2) : 0.19921693281 (4, 3) : 0.940544296591 (4, 4) : -0.472896775996 (4, 5) : -0.802940660094 (4, 6) : 0.706536674445 (5, 1) : 0.729153420716 (5, 2) : 0.570983943317 (5, 3) : -0.895298488668 (5, 4) : -0.310469738009 (5, 5) : 0.985639060101 (5, 6) : 0.02366820789 2 Var Declarations 3 d :  Size=30         Domain=Reals (1, 1) : 10.33332 (1, 2) : 18.33331 (1, 3) : 26.3333 (1, 4) : 34.33329 (1, 5) : 42.33328 (1, 6) : 50.33327 (2, 1) : 12.66665 (2, 2) : 20.66664 (2, 3) : 28.66663 (2, 4) : 36.66662 (2, 5) : 44.66661 (2, 6) : 52.6666 (3, 1) : 14.99998 (3, 2) : 22.99997 (3, 3) : 30.99996 (3, 4) : 38.99995 (3, 5) : 46.99994 (3, 6) : 54.99993 (4, 1) : 17.33331 (4, 2) : 25.3333 (4, 3) : 33.33329 (4, 4) : 41.33328 (4, 5) : 49.33327 (4, 6) : 57.33326 (5, 1) : 19.66664 (5, 2) : 27.66663 (5, 3) : 35.66662 (5, 4) : 43.66661 (5, 5) : 51.6666 (5, 6) : 59.66659 (1, 1) : -0.788608083678 (1, 2) : -0.493618782917 (1, 3) : 0.93224141556 (1, 4) : 0.222354914382 (1, 5) : -0.996942310904 (1, 6) : 0.0677356388252 (2, 1) : 0.100111402623 (2, 2) : 0.969824168356 (2, 3) : -0.382311111107 (2, 4) : -0.858579174032 (2, 5) : 0.632140719945 (2, 6) : 0.674638690066 (3, 1) : 0.650303033785 (3, 2) : -0.846204418804 (3, 3) : -0.404074234694 (3, 4) : 0.963782052933 (3, 5) : 0.123632662651 (3, 6) : -0.999756719782 (4, 1) : -0.998512495568 (4, 2) : 0.19921693281 (4, 3) : 0.940544296591 (4, 4) : -0.472896775996 (4, 5) : -0.802940660094 (4, 6) : 0.706536674445 (5, 1) : 0.729153420716 (5, 2) : 0.570983943317 (5, 3) : -0.895298488668 (5, 4) : -0.310469738009 (5, 5) : 0.985639060101 (5, 6) : 0.02366820789 2 Var Declarations 3 d :  Size=30         Domain=Reals (1, 1) : 10.33332 (1, 2) : 18.33331 (1, 3) : 26.3333 (1, 4) : 34.33329 (1, 5) : 42.33328 (1, 6) : 50.33327 (2, 1) : 12.66665 (2, 2) : 20.66664 (2, 3) : 28.66663 (2, 4) : 36.66662 (2, 5) : 44.66661 (2, 6) : 52.6666 (3, 1) : 14.99998 (3, 2) : 22.99997 (3, 3) : 30.99996 (3, 4) : 38.99995 (3, 5) : 46.99994 (3, 6) : 54.99993 (4, 1) : 17.33331 (4, 2) : 25.3333 (4, 3) : 33.33329 (4, 4) : 41.33328 (4, 5) : 49.33327 (4, 6) : 57.33326 (5, 1) : 19.66664 (5, 2) : 27.66663 (5, 3) : 35.66662 (5, 4) : 43.66661 (5, 5) : 51.6666 (5, 6) : 59.66659 (1, 1) : -0.788608083678 (1, 2) : -0.493618782917 (1, 3) : 0.93224141556 (1, 4) : 0.222354914382 (1, 5) : -0.996942310904 (1, 6) : 0.0677356388252 (2, 1) : 0.100111402623 (2, 2) : 0.969824168356 (2, 3) : -0.382311111107 (2, 4) : -0.858579174032 (2, 5) : 0.632140719945 (2, 6) : 0.674638690066 (3, 1) : 0.650303033785 (3, 2) : -0.846204418804 (3, 3) : -0.404074234694 (3, 4) : 0.963782052933 (3, 5) : 0.123632662651 (3, 6) : -0.999756719782 (4, 1) : -0.998512495568 (4, 2) : 0.19921693281 (4, 3) : 0.940544296591 (4, 4) : -0.472896775996 (4, 5) : -0.802940660094 (4, 6) : 0.706536674445 (5, 1) : 0.729153420716 (5, 2) : 0.570983943317 (5, 3) : -0.895298488668 (5, 4) : -0.310469738009 (5, 5) : 0.985639060101 (5, 6) : 0.02366820789 2 Var Declarations 3 d :  Size=30         Domain=Reals (1, 1) : 10.33332 (1, 2) : 18.33331 (1, 3) : 26.3333 (1, 4) : 34.33329 (1, 5) : 42.33328 (1, 6) : 50.33327 (2, 1) : 12.66665 (2, 2) : 20.66664 (2, 3) : 28.66663 (2, 4) : 36.66662 (2, 5) : 44.66661 (2, 6) : 52.6666 (3, 1) : 14.99998 (3, 2) : 22.99997 (3, 3) : 30.99996 (3, 4) : 38.99995 (3, 5) : 46.99994 (3, 6) : 54.99993 (4, 1) : 17.33331 (4, 2) : 25.3333 (4, 3) : 33.33329 (4, 4) : 41.33328 (4, 5) : 49.33327 (4, 6) : 57.33326 (5, 1) : 19.66664 (5, 2) : 27.66663 (5, 3) : 35.66662 (5, 4) : 43.66661 (5, 5) : 51.6666 (5, 6) : 59.66659 (1, 1) : -0.788608083678 (1, 2) : -0.493618782917 (1, 3) : 0.93224141556 (1, 4) : 0.222354914382 (1, 5) : -0.996942310904 (1, 6) : 0.0677356388252 (2, 1) : 0.100111402623 (2, 2) : 0.969824168356 (2, 3) : -0.382311111107 (2, 4) : -0.858579174032 (2, 5) : 0.632140719945 (2, 6) : 0.674638690066 (3, 1) : 0.650303033785 (3, 2) : -0.846204418804 (3, 3) : -0.404074234694 (3, 4) : 0.963782052933 (3, 5) : 0.123632662651 (3, 6) : -0.999756719782 (4, 1) : -0.998512495568 (4, 2) : 0.19921693281 (4, 3) : 0.940544296591 (4, 4) : -0.472896775996 (4, 5) : -0.802940660094 (4, 6) : 0.706536674445 (5, 1) : 0.729153420716 (5, 2) : 0.570983943317 (5, 3) : -0.895298488668 (5, 4) : -0.310469738009 (5, 5) : 0.985639060101 (5, 6) : 0.02366820789 2 Var Declarations 3 d :  Size=30         Domain=Reals (1, 1) : 10.33332 (1, 2) : 18.33331 (1, 3) : 26.3333 (1, 4) : 34.33329 (1, 5) : 42.33328 (1, 6) : 50.33327 (2, 1) : 12.66665 (2, 2) : 20.66664 (2, 3) : 28.66663 (2, 4) : 36.66662 (2, 5) : 44.66661 (2, 6) : 52.6666 (3, 1) : 14.99998 (3, 2) : 22.99997 (3, 3) : 30.99996 (3, 4) : 38.99995 (3, 5) : 46.99994 (3, 6) : 54.99993 (4, 1) : 17.33331 (4, 2) : 25.3333 (4, 3) : 33.33329 (4, 4) : 41.33328 (4, 5) : 49.33327 (4, 6) : 57.33326 (5, 1) : 19.66664 (5, 2) : 27.66663 (5, 3) : 35.66662 (5, 4) : 43.66661 (5, 5) : 51.6666 (5, 6) : 59.66659 (1, 1) : -0.788608083678 (1, 2) : -0.493618782917 (1, 3) : 0.93224141556 (1, 4) : 0.222354914382 (1, 5) : -0.996942310904 (1, 6) : 0.0677356388252 (2, 1) : 0.100111402623 (2, 2) : 0.969824168356 (2, 3) : -0.382311111107 (2, 4) : -0.858579174032 (2, 5) : 0.632140719945 (2, 6) : 0.674638690066 (3, 1) : 0.650303033785 (3, 2) : -0.846204418804 (3, 3) : -0.404074234694 (3, 4) : 0.963782052933 (3, 5) : 0.123632662651 (3, 6) : -0.999756719782 (4, 1) : -0.998512495568 (4, 2) : 0.19921693281 (4, 3) : 0.940544296591 (4, 4) : -0.472896775996 (4, 5) : -0.802940660094 (4, 6) : 0.706536674445 (5, 1) : 0.729153420716 (5, 2) : 0.570983943317 (5, 3) : -0.895298488668 (5, 4) : -0.310469738009 (5, 5) : 0.985639060101 (5, 6) : 0.02366820789 2 Var Declarations # ---------------------------------------------------------- Problem: - Lower bound: 181.99977 - Lower bound: -5.015609 Upper bound: inf Number of objectives: 1 f: Id: 0 Value: 181.99977 Value: -5.015609 Variable: x[1,1]: Id: 0 x[3,2]: Id: 13 Value: 1 x[1,2]: Id: 1 x[3,6]: Id: 17 Value: 1 x[1,3]: Id: 2 x[4,1]: Id: 18 Value: 1 x[1,4]: Id: 3 x[4,4]: Id: 21 Value: 1 x[1,5]: Id: 4 x[4,5]: Id: 22 Value: 1 x[1,6]: Id: 5 x[5,3]: Id: 26 Value: 1 y[1]: Id: 30 y[3]: Id: 32 Value: 1 y[2]: Id: 31 y[4]: Id: 33 Value: 1 y[5]:
• ## coopr.pyomo/trunk/coopr/pyomo/tests/examples/test12.txt

 r2253 # ---------------------------------------------------------- Problem: - Lower bound: 181.99977 - Lower bound: -5.015609 Upper bound: inf Number of objectives: 1 f: Id: 0 Value: 181.99977 Value: -5.015609 Variable: x[1,1]: Id: 0 x[3,2]: Id: 13 Value: 1 x[1,2]: Id: 1 x[3,6]: Id: 17 Value: 1 x[1,3]: Id: 2 x[4,1]: Id: 18 Value: 1 x[1,4]: Id: 3 x[4,4]: Id: 21 Value: 1 x[1,5]: Id: 4 x[4,5]: Id: 22 Value: 1 x[1,6]: Id: 5 x[5,3]: Id: 26 Value: 1 y[1]: Id: 30 y[3]: Id: 32 Value: 1 y[2]: Id: 31 y[4]: Id: 33 Value: 1 y[5]:
Note: See TracChangeset for help on using the changeset viewer.