Changeset 2364


Ignore:
Timestamp:
Feb 17, 2010 1:27:18 PM (10 years ago)
Author:
wehart
Message:

Bug fix when using glpk but not cplex.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pysp/trunk/coopr/pysp/tests/unit/test_ph.py

    r2362 r2364  
    7979    def test_linearized_farmer(self):
    8080
    81         if (cplex_available or glpk_available) is False:
     81        if cplex_available:
     82            solver='cplex'
     83        elif glpk_available:
     84            solver='glpk'
     85        else:
    8286           return
    8387
     
    8690        model_dir = farmer_examples_dir + os.sep + "models"
    8791        instance_dir = farmer_examples_dir + os.sep + "scenariodata"       
    88         argstring = "runph --solver=cplex --solver-manager=serial --model-directory="+model_dir+" --instance-directory="+instance_dir+" --linearize-nonbinary-penalty-terms=10"
     92        argstring = "runph --solver="+solver+" --solver-manager=serial --model-directory="+model_dir+" --instance-directory="+instance_dir+" --linearize-nonbinary-penalty-terms=10"
    8993        args = string.split(argstring)
    9094        coopr.pysp.phinit.run(args=args)       
Note: See TracChangeset for help on using the changeset viewer.