Changeset 3081
 Timestamp:
 Oct 11, 2010 10:20:45 PM (11 years ago)
 Location:
 coopr.pyomo/trunk/coopr/pyomo
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

coopr.pyomo/trunk/coopr/pyomo/io/ampl.py
r2882 r3081 464 464 if isinstance(var.domain, BooleanSet): 465 465 print >>OUTPUT, "0 0 1", 466 print >>OUTPUT, " # v"+str(v ar_id[ndx])+" "+vv.label467 symbol_map["v"+str(v ar_id[ndx])] = vv.label466 print >>OUTPUT, " # v"+str(vv.ampl_var_id)+" "+vv.label 467 symbol_map["v"+str(vv.ampl_var_id)] = vv.label 468 468 continue 469 469 L = vv.lb 
coopr.pyomo/trunk/coopr/pyomo/scripting/pyomo.py
r3000 r3081 99 99 action='store', 100 100 dest='solver', 101 type=' choice',102 choices=solver_list,101 type='string', 102 #choices=solver_list, 103 103 default='glpk') 104 104 solverOpts.add_option('solvermanager', 
coopr.pyomo/trunk/coopr/pyomo/scripting/util.py
r2930 r3081 254 254 # is not assumed to be required by all solvers? 255 255 # 256 if hasattr(options, 'solver') and options.solver == "asl":256 if hasattr(options, 'solver') and options.solver.startswith('asl'): 257 257 model.skip_canonical_repn = True 258 258 … … 370 370 solver, subsolver = solver.split(':') 371 371 opt = SolverFactory( solver ) 372 if opt is None: 373 solver_list = SolverFactory.services() 374 solver_list = sorted( filter(lambda x: '_' != x[0], solver_list) ) 375 raise ValueError, "Problem constructing solver `"+str(solver)+"' (choose from: %s)" % ", ".join(solver_list) 372 376 373 377 # let the model know of our chosen solver's capabilities 374 378 instance.has_capability = opt.has_capability 375 379 376 if opt is None:377 raise ValueError, "Problem constructing solver `"+str(solver)+"'"378 380 opt.keepFiles=options.keepfiles or options.log 379 381 if options.timelimit == 0: … … 403 405 raise ValueError, msg % str( options.smanager_type ) 404 406 405 results = solver_mngr.solve( 406 instance, opt=opt, tee=options.tee, timelimit=options.timelimit ) 407 results = solver_mngr.solve( instance, opt=opt, tee=options.tee, timelimit=options.timelimit ) 407 408 408 409 if results == None:
Note: See TracChangeset
for help on using the changeset viewer.