Changeset 5806


Ignore:
Timestamp:
May 24, 2012 10:56:59 PM (7 years ago)
Author:
wehart
Message:

Adding an AmplModel? class, which serves as a wrapper for
models.

Location:
coopr.opt/trunk/coopr/opt
Files:
9 added
3 edited

Legend:

Unmodified
Added
Removed
  • coopr.opt/trunk/coopr/opt/__init__.py

    r5442 r5806  
    1919import solver
    2020import reader
     21from problem import *
    2122from parallel import *
    2223
  • coopr.opt/trunk/coopr/opt/base/convert.py

    r4114 r5806  
    8787        #
    8888            if s_ptype == ptype:
     89                #print "yyy",args, ptype, None
    8990                return (args,ptype,None)
    9091            #
     
    9293            #
    9394            for converter in ExtensionPoint(IProblemConverter):
    94             #print "HERE",converter,s_ptype,ptype
     95                #print "xxx",converter,s_ptype,ptype
    9596                if converter.can_convert(s_ptype,ptype):
    9697                    tmp = [s_ptype,ptype] + list(args)
     
    9899                    tmpkw = {'capabilities':has_capability}
    99100                    problem_files, symbol_map = converter.apply(*tmp, **tmpkw)
     101                    #print "X", problem_files
    100102                    return problem_files, ptype, symbol_map
    101103
  • coopr.opt/trunk/coopr/opt/base/solvers.py

    r5460 r5806  
    254254        self.available()
    255255
     256        #print "format", self._problem_format
     257        #print "valid", self._valid_problem_formats
    256258        (self._problem_files,self._problem_format,self._symbol_map) = self._convert_problem(args, self._problem_format, self._valid_problem_formats)
     259        if type(self._problem_files) in (list,tuple) and not isinstance(self._problem_files[0], basestring):
     260            self._problem_files = self._problem_files[0]._problem_files()
     261        #print "HERE", self._problem_files
     262        #print "HERE", self._problem_format
     263        #print "HERE", self._symbol_map
    257264        if self._results_format is None:
    258265            self._results_format= self._default_results_format(self._problem_format)
Note: See TracChangeset for help on using the changeset viewer.