Changeset 3774


Ignore:
Timestamp:
03/06/11 14:18:31 (3 years ago)
Author:
claird
Message:

Fixed some CUTEr test cases

Location:
coopr.data.cute/trunk/coopr/data/cute
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • coopr.data.cute/trunk/coopr/data/cute/dtoc1l_cute.py

    r3446 r3774  
    3636 
    3737def b_rule(i,j,model): 
    38         return (i-j)/(nx+ny) 
     38        return float(i-j)/float(nx+ny) 
    3939model.b = Param(model.S1,model.S2,initialize=b_rule) 
    4040 
  • coopr.data.cute/trunk/coopr/data/cute/eg3.mod

    r2882 r3774  
    3030        y + x[1]*x[i+1] + (1+2/i)*x[i]*x[n] <= 0.0; 
    3131subject to conss{i in 1..n}: 
    32         0.5 >= (sin(x[i]))^2; # >= 0.0; 
     32        (sin(x[i]))^2 <= 0.5; # >= 0.0; 
    3333subject to eq: 
    3434        (x[1]+x[n])^2 = 1.0; 
    3535 
     36write gstub; 
    3637solve; 
  • coopr.data.cute/trunk/coopr/data/cute/eg3_cute.py

    r3446 r3774  
    5151 
    5252def consq(i,m): 
    53     expr = m.y + m.x[1]*m.x[i+1] + (1+2/i)*m.x[i]*m.x[value(m.n)] 
     53    expr = m.y + m.x[1]*m.x[i+1] + (1+float(2)/float(i))*m.x[i]*m.x[value(m.n)] 
    5454    return (None,expr,0.0) 
    5555model.consq = Constraint(RangeSet(1,model.n-1),rule=consq) 
  • coopr.data.cute/trunk/coopr/data/cute/oet1_cute.py

    r3446 r3774  
    3535model = AbstractModel() 
    3636 
    37 model.M = Param(initialize=300) 
     37model.M = Param(initialize=500) 
    3838model.lower = Param(initialize=0.0) 
    3939model.upper = Param(initialize=2.0) 
     
    4343model.diff = Param(rule=d_rule) 
    4444def h_rule(model): 
    45                 return value(model.diff)/value(model.M) 
     45                return float(value(model.diff))/float(value(model.M)) 
    4646model.h = Param(rule=h_rule) 
    4747#model.diff = Param(initialize=model.upper-model.lower) 
     
    6161        return ex >= 0 
    6262model.cons1 = Constraint(model.OP,rule=cons1) 
     63 
    6364def cons2(i,model): 
    6465        return model.u+(i*value(model.h)+value(model.lower))*model.x[1]+exp(i*value(model.h)+value(model.lower))*model.x[2] + (i*value(model.h)+value(model.lower))**2 >= 0 
  • coopr.data.cute/trunk/coopr/data/cute/tfi2_cute.py

    r3446 r3774  
    3535model = AbstractModel() 
    3636 
    37 model.M = Param(initialize=1000) 
     37model.M = Param(initialize=10000) 
    3838def h_rule(model): 
    3939        return 1.0/value(model.M) 
Note: See TracChangeset for help on using the changeset viewer.