# Changeset 3774

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

Fixed some CUTEr test cases

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

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

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

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

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

 r3446 model = AbstractModel() model.M = Param(initialize=300) model.M = Param(initialize=500) model.lower = Param(initialize=0.0) model.upper = Param(initialize=2.0) model.diff = Param(rule=d_rule) def h_rule(model): return value(model.diff)/value(model.M) return float(value(model.diff))/float(value(model.M)) model.h = Param(rule=h_rule) #model.diff = Param(initialize=model.upper-model.lower) return ex >= 0 model.cons1 = Constraint(model.OP,rule=cons1) def cons2(i,model): 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 model = AbstractModel() model.M = Param(initialize=1000) model.M = Param(initialize=10000) def h_rule(model): return 1.0/value(model.M)
Note: See TracChangeset for help on using the changeset viewer.