Changeset 1064

Show
Ignore:
Timestamp:
06/27/08 04:30:10 (4 months ago)
Author:
dmitrey.kroshko
Message:

some chenges

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openopt/scikits/openopt/Kernel/ooCheck.py

    r1000 r1064  
    77    """ 
    88    nErrors = 0 
     9 
     10    if not (p.goal in p.allowedGoals): 
     11        p.err('goal '+ p.goal+' is not available for the '+ p.probType + ' class (at least not implemented yet)') 
     12 
     13 
    914 
    1015    if p.solver.__constraintsThatCannotBeHandled__ != []: 
  • trunk/openopt/scikits/openopt/Kernel/runProbSolver.py

    r1040 r1064  
    198198        if not hasattr(p,  'fk'): p.fk = p.f(p.xk) 
    199199 
     200    if not hasattr(p, 'fk'): p.fk = p.ff 
    200201    if p.invertObjFunc:  p.fk, p.ff = -p.fk, -p.ff 
    201202 
  • trunk/openopt/scikits/openopt/examples/lp_1.py

    r827 r1064  
    4415x1 + 8x2 + 80x3 -> min        (1) 
    55subjected to 
    6 x1 + 2x2 + 3x3 <= 15              (2)       
    7 8x1 +  15x2 +  80x3 <= 80      (3)  
     6x1 + 2x2 + 3x3 <= 15              (2) 
     78x1 +  15x2 +  80x3 <= 80      (3) 
    888x1  + 80x2 + 15x3 <=150      (4) 
    99100x1 +  10x2 + x3 >= 800     (5) 
    10 80x1 + 8x2 + 15x3 = 750         (6)  
     1080x1 + 8x2 + 15x3 = 750         (6) 
    1111x1 + 10x2 + 100x3 = 80           (7) 
    1212x1 >= 4                                     (8) 
     
    2121Aeq = mat('80 8 15; 1 10 100') # numpy.ndarray is also allowed 
    2222beq = (750, 80) 
    23 dwhole = [-1, 0, 1]  
     23dwhole = [-1, 0, 1] 
    2424lb = [4, -80, -inf] 
    2525ub = [inf, -8, inf] 
    2626p = LP(f, A=A, Aeq=Aeq, b=b, beq=beq, lb=lb, ub=ub) 
    2727r = p.solve('cvxopt_lp') # CVXOPT must be installed 
    28 #r = p.solve('cvxopt_glpk') # CVXOPT must be installed 
     28#r = p.solve('glpk') # CVXOPT & glpk must be installed 
    2929#r = p.solve('lpSolve')#lp_solve must be installed 
    3030print 'objFunValue:', r.ff # should print 204.48841578