本文整理汇总了Python中oricrete.folding.CreasePattern.cnstr_lhs方法的典型用法代码示例。如果您正苦于以下问题:Python CreasePattern.cnstr_lhs方法的具体用法?Python CreasePattern.cnstr_lhs怎么用?Python CreasePattern.cnstr_lhs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oricrete.folding.CreasePattern
的用法示例。
在下文中一共展示了CreasePattern.cnstr_lhs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: BeispielCode2
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def BeispielCode2():
cp = CreasePattern()
cp.nodes = [[0, 0, 0],
[1, 0, 0],
[1, 1, 0]]
cp.crease_lines = [[0, 1],
[1, 2],
[2, 0]]
cp.facets = [[0, 1, 2]]
cp.cnstr_lhs = [[(0, 0, 1.0)],
[(0, 1, 1.0)],
[(0, 2, 1.0)],
[(1, 1, 1.0)],
[(1, 2, 1.0)],
[(2, 2, 1.0)]]
cp.cnstr_rhs = [0, 0, 0, 0, 0, 0.5]
X0 = [0, 0, 0, 0, 0, 0, 0, 0, 0.1]
X = cp.solve(X0)
return cp
示例2: BeispielCode4
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def BeispielCode4():
cp = CreasePattern()
cp.nodes = [[ 0, 0, 1.0 ],
[ 1, 0, 1.5 ],
[ 0.5, 0.0, 0.0],
[ 0.1, 0, 1.05]]
cp.crease_lines = [[ 0, 1 ],
[ 2, 3 ]]
cp.facets = [[0, 1, 3]]
cp.line_pts = [[3, 0]]
cp.cnstr_lhs = [[(3, 0, 1.0)],
[(1, 2, 1.0)],
[(1, 1, 1.0)],
[(0, 2, 1.0)],
[(0, 1, 1.0)],
[(2, 0, 1.0)],
[(2, 1, 1.0)],
[(0, 0, 1.0)]]
cp.cnstr_rhs = [1.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
X0 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0, 0]
X = cp.solve(X0)
return cp
示例3: BeispielCode3
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def BeispielCode3():
cp = CreasePattern()
cp.nodes = [[0, 0, 0],
[1, 0, 0],
[1, 1, 0],
[0.5, 0.3, 0]] #Knoten fuer Grabpoint Element
cp.crease_lines = [[0, 1],
[1, 2],
[2, 0]]
cp.facets = [[0, 1, 2]]
cp.grab_pts = [[3, 0]]
cp.cnstr_lhs = [[(0, 0, 1.0)],
[(0, 1, 1.0)],
[(0, 2, 1.0)],
[(1, 1, 1.0)],
[(2, 1, 1.0)],
[(3, 2, 1.0)]]
cp.cnstr_rhs = [0, 0, 0, 0, 0, 0.3]
X0 = [0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0, 0, 0]
X = cp.solve(X0)
return cp
示例4: twotriangle_stick_cnstr
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def twotriangle_stick_cnstr(n_steps = 10, dx = -0.3299999999999):
"""
This example shows the use of Grabpoints an Sticks in a more complex creasepattern.
"""
cp = CreasePattern(n_steps = n_steps)
cp.nodes = [[ 0, 0, 0 ],
[ 1, 0, 0 ],
[ 1, 1, 0],
[0.667, 0.333, 0],
[0.66, 0.33, 1],
[ 0, 1, 0]]
cp.crease_lines = [[ 0, 1 ],
[ 1, 2 ],
[ 2, 0 ],
[ 3, 4],
[ 0, 5],
[ 5, 2]]
cp.facets = [[0, 1, 2 ],
[2, 5, 0]]
cp.grab_pts = [[3, 0] ]
cp.cnstr_lhs = [
[(0, 0, 1.0)],
[(0, 1, 1.0)],
[(0, 2, 1.0)],
[(1, 1, 1.0)],
[(1, 2, 1.0)],
[(4, 2, 1.0)],
[(4, 0, 1.0)],
[(4, 1, 1.0)],
[(5, 2, 1.0)]]
cp.cnstr_rhs = [0.0, 0.0, 0.0, 0.0, 0.0
, dx, 0.0, 0.0, 0.0
]
X = np.zeros((cp.n_dofs,), dtype = float)
X[1] = 0.01
print 'initial lengths\n', cp.c_lengths
print 'initial vectors\n', cp.c_vectors
print 'initial R\n', cp.get_G(X)
print 'initial G_du\n', cp.get_G_du(X)
X = cp.solve(X)
print '========== results =============='
print 'solution X\n', X
print 'final positions\n', cp.get_new_nodes(X)
print 'final vectors\n', cp.get_new_vectors(X)
print 'final lengths\n', cp.get_new_lengths(X)
return cp
示例5: halfcrane_2sticks
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def halfcrane_2sticks(n_steps = 10, dx = 1.5):
"""
"""
cp = CreasePattern(n_steps = n_steps, MAX_ITER = 5000)
cp.nodes = [[ 0, 0, 1.0 ],
[ 1, 0, 1.15 ],
[ 0.5, 0.5, -0.5],
[ 0.5, -0.5, -0.5],
# [ 0.5, 0, 0.75],
[ 0.5, 0, 1.075]]
cp.crease_lines = [[ 0, 1 ],
[ 2, 4 ],
[ 3, 4]]
cp.facets = [[0, 1, 4]]
cp.grab_pts = []
cp.line_pts = [[4, 0],
#[4, 0]
]
cp.cnstr_lhs = [[(1, 2, 1.0)],
[(1, 0, 1.0)],
[(1, 1, 1.0)],
[(0, 2, 1.0)],
[(0, 1, 1.0)],
[(2, 0, 1.0), (3, 0, -1.0) ],
[(2, 1, 1.0), (3, 1, -1.0)],
[(2, 2, 1.0), (3, 2, -1.0)],
[(3, 2, 1.0)],
[(3, 0, 1.0)]]
cp.cnstr_rhs = [dx, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
X = np.zeros((cp.n_dofs,), dtype = float)
X[5] = 0.0001
X[9] = 0.0001
# X[10] = 0.01
# X[11] = 0.01
X *= 1
print 'necessary constraints', cp.n_dofs - cp.n_c - cp.n_g * cp.n_d - cp.n_l * 2
print 'cnstr', len(cp.cnstr_lhs)
print 'initial R\n', cp.get_G(X)
print 'initial dR\n', cp.get_G_du(X)
#cp.show_iter = True
X = cp.solve(X)
return cp
示例6: triangle_cp_cnstr
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def triangle_cp_cnstr(n_steps = 10, dx = -0.3299999999999):
"""
This example demonstrates the main funtions of Grabpoints.
Two Grabpoints are integrated in a single triangle.
Grabpoint one is used as regulare constrain moved in z-direction.
Grabpoint two is used as control point, which gives back the coordinations of
an exact point on the face in every iteration step.
"""
cp = CreasePattern(n_steps = n_steps)
cp.nodes = [[ 0, 0, 0 ],
[ 1, 0, 0 ],
[ 1, 1, 0],
[0.667, 0.333, 0],
[0.2, 0.1, 0]]
cp.crease_lines = [[ 0, 1 ],
[ 1, 2 ],
[ 2, 0 ]]
cp.facets = [[0, 1, 2 ]]
cp.grab_pts = [[3, 0],
[4, 0]]
cp.cnstr_lhs = [[(0, 0, 1.0)],
[(0, 1, 1.0)],
[(0, 2, 1.0)],
[(1, 1, 1.0)],
[(1, 2, 1.0)],
[(3, 2, 1.0)]]
cp.cnstr_rhs = [0.0, 0.0, 0.0, 0.0, 0.0
, dx, 0.0, 0.0]
X = np.zeros((cp.n_dofs,), dtype = float)
X[1] = 0.01
print 'initial lengths\n', cp.c_lengths
print 'initial vectors\n', cp.c_vectors
print 'initial R\n', cp.get_G(X)
print 'initial G_du\n', cp.get_G_du(X)
# X = cp.solve(X)
print '========== results =============='
print 'solution X\n', X
print 'final positions\n', cp.get_new_nodes(X)
print 'final vectors\n', cp.get_new_vectors(X)
print 'final lengths\n', cp.get_new_lengths(X)
return cp
示例7: triangle_stick_cnstr
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def triangle_stick_cnstr(n_steps = 10, dx = -0.3299999999999):
"""
This example shows new options of lines, as beams connected to grabpoints.
This could be usefull for simulation the crane lifting up the oricrete construction.
"""
cp = CreasePattern(n_steps = n_steps)
cp.nodes = [[ 0, 0, 0 ],
[ 1, 0, 0 ],
[ 1, 1, 0],
[0.667, 0.333, 0],
[0.1, 0.05, 0],
[0.66, 0.33, 2]]
cp.crease_lines = [[ 0, 1 ],
[ 1, 2 ],
[ 2, 0 ],
[ 3, 5]]
cp.facets = [[0, 1, 2 ]]
cp.grab_pts = [[3, 0],
[4, 0]]
cp.cnstr_lhs = [[(0, 0, 1.0)],
[(0, 1, 1.0)],
[(0, 2, 1.0)],
[(1, 1, 1.0)],
[(1, 2, 1.0)],
[(5, 2, 1.0)],
[(5, 0, 1.0)],
[(5, 1, 1.0)]]
cp.cnstr_rhs = [0.0, 0.0, 0.0, 0.0, 0.0
, dx, 0.0, 0.0]
X = np.zeros((cp.n_dofs,), dtype = float)
X[1] = 0.01
print 'initial lengths\n', cp.c_lengths
print 'initial vectors\n', cp.c_vectors
print 'initial R\n', cp.get_G(X)
print 'initial G_du\n', cp.get_G_du(X)
X = cp.solve(X)
print '========== results =============='
print 'solution X\n', X
print 'final positions\n', cp.get_new_nodes(X)
print 'final vectors\n', cp.get_new_vectors(X)
print 'final lengths\n', cp.get_new_lengths(X)
return cp
示例8: BeispielCode5
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def BeispielCode5():
cp = CreasePattern()
cp.nodes = [[ 0, 0, 0 ],
[ 1, 0, 0 ]]
cp.crease_lines = [[ 0, 1 ]]
cp.cnstr_lhs = [[(0, 1, 1.0)],
[(0, 2, 1.0)],
[(0, 0, 1.0)],
[(1, 2, 1.0)],
[(0, 1, 0.5), (1, 1, -1.0)]]
cp.cnstr_rhs = [1.0, 0.0, 0.0, 0.0, 0.0]
X0 = [0, 0, 0, 0, 0.1, 0]
X = cp.solve(X0)
return cp
示例9: moving_truss_cp_ff_cnstr
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def moving_truss_cp_ff_cnstr(n_steps = 10, dx = -1.99):
cp = CreasePattern(n_steps = n_steps)
cp.nodes = [[ 0, 0, 0 ],
[ 1, 0, 0 ]]
cp.crease_lines = [[ 0, 1 ]]
face_z_0 = CF(Rf = z_ - 0)
face_x_0 = CF(Rf = x_ - 0)
face_x_1_t = CF(Rf = x_ - 1.0 + 1.99 * t_)
cp.cf_lst = [(face_z_0, [0, 1]),
(face_x_0, [0]),
(face_x_1_t, [1])]
cp.cnstr_lhs = [
[(1, 0, 1.0), (1, 1, 1.0)],
]
cp.cnstr_rhs = [0]
X = np.zeros((cp.n_dofs,), dtype = float)
X[1] = 0.01
print 'initial lengths\n', cp.c_lengths
print 'initial vectors\n', cp.c_vectors
print 'initial R\n', cp.get_G(X)
print 'initial dR\n', cp.get_G_du(X)
X = cp.solve(X)
print '========== results =============='
print 'solution X\n', X
print 'final positions\n', cp.get_new_nodes(X)
print 'final vectors\n', cp.get_new_vectors(X)
print 'final lengths\n', cp.get_new_lengths(X)
return cp
示例10: moving_truss_cp_cnstr
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def moving_truss_cp_cnstr(n_steps = 10, dx = -1.99):
cp = CreasePattern(n_steps = n_steps)
cp.nodes = [[ 0, 0, 0 ],
[ 1, 0, 0 ]]
cp.crease_lines = [[ 0, 1 ]]
cp.cnstr_lhs = [
[(0, 0, 1.0)],
[(0, 2, 1.0)],
[(1, 0, 1.0)],
[(1, 0, 1.0), (1, 1, 1.0)],
[(1, 2, 1.0)]
]
cp.cnstr_rhs = [0.0, 0.0, dx, 0.0, 0.0]
X = np.zeros((cp.n_dofs,), dtype = float)
X[1] = 0.01
print 'initial lengths\n', cp.c_lengths
print 'initial vectors\n', cp.c_vectors
print 'initial R\n', cp.get_G(X)
print 'initial dR\n', cp.get_G_du(X)
X = cp.solve(X)
print '========== results =============='
print 'solution X\n', X
print 'final positions\n', cp.get_new_nodes(X)
print 'final vectors\n', cp.get_new_vectors(X)
print 'final lengths\n', cp.get_new_lengths(X)
return cp
示例11: BeispielCode6
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def BeispielCode6():
cp = CreasePattern()
cp.nodes = [[ 0, 0, 0 ],
[ 1, 0, 0 ]]
cp.crease_lines = [[ 0, 1 ]]
face_z_0 = CF(Rf = z_ - 0)
face_x_0 = CF(Rf = x_ - 0)
face_x_1_t = CF(Rf = x_ - 1.0 + 1. * t_)
cp.cf_lst = [(face_z_0, [0, 1]),
(face_x_0, [0]),
(face_x_1_t, [1])]
cp.cnstr_lhs = [[(1, 1, 1.0)]]
cp.cnstr_rhs = [0]
X0 = [0, 0, 0, 0, 0.01, 0]
X = cp.solve_CF(X0)
return cp
示例12: rhombus_3x1_grab_points
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def rhombus_3x1_grab_points(n_steps = 10, dx = 1.5):
"""
This example shows a 3x1 rhombus creasepattern.
In this creasepattern, the grabpoints lift up
in different speeds. So their must be new rules
defined for constrain setup.
"""
cp = CreasePattern(n_steps = n_steps, MAX_ITER = 500)
cp.nodes = [[0, 0, 0],
[0, 1, 0],
[1, 0, 0],
[1, 1, 0],
[2, 0, 0],
[2, 1, 0],
[3, 0, 0],
[3, 1, 0],
[0, 0.5, 0],
[3, 0.5, 0],
[0.5, 0.5, 0],
[1.5, 0.5, 0],
[2.5, 0.5, 0],
[0.5, 0.333, 0],
[0.5, 0.667, 0],
[1.5, 0.333, 0],
[1.5, 0.667, 0],
[2.5, 0.333, 0],
[2.5, 0.666, 0]
]
cp.crease_lines = [[0, 2],
[0, 8],
[0, 10],
[1, 3],
[1, 8],
[1, 10],
[2, 4],
[2, 10],
[2, 11],
[3, 5],
[3, 10],
[3, 11],
[4, 6],
[4, 11],
[4, 12],
[5, 7],
[5, 11],
[5, 12],
[6, 9],
[6, 12],
[7, 9],
[7, 12],
[8, 10],
[9, 12],
[10, 11],
[11, 12]]
cp.facets = [[0, 2, 10],
[2, 4, 11],
[4, 6, 12],
[2, 11, 10],
[4, 11, 12],
[0, 8, 10],
[6, 9, 12],
[1, 3, 10],
[3, 5, 11],
[5, 7, 12],
[3, 10, 11],
[5, 11, 12],
[1, 8, 10],
[7, 9, 12]
]
cp.grab_pts = [[13, 0],
[14, 7],
[15, 1],
[16, 8],
[17, 2],
[18, 9]
]
cp.cnstr_lhs = [[(8, 2, 1.0)],
[(9, 2, 1.0)],
[(8, 1, 1.0)],
#[(9, 1, 1.0)],
[(11, 0, 1.0)],
#[(8, 1, 1.0), (9, 1, -1.0)],
[(15, 2, 1.0)],
[(15, 2, 1.0), (16, 2, -1.0)],
[(13, 1, 1.0), (15, 1, -1.0)],
[(15, 1, 1.0), (17, 1, -1.0)],
[(14, 1, 1.0), (16, 1, -1.0)],
[(16, 1, 1.0), (18, 1, -1.0)],
[(13, 0, 1.0), (14, 0, -1.0)],
[(17, 0, 1.0), (18, 0, -1.0)],
[(13, 2, 1.0), (17, 2, -1.0)]
]
cp.cnstr_rhs = [0.0, 0.0, 0.0, 0.0, dx, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
#.........这里部分代码省略.........
示例13: CreasePattern
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
cp2 = CreasePattern(
nodes=new_nodes,
crease_lines=cp.crease_lines,
facets=cp.facets,
n_steps=1,
show_iter=True,
z0_ratio=0.1,
time_arr=np.linspace(1, 0, 10),
MAX_ITER=200,
)
cp2.tf_lst = [(face_z_t, n_arr)]
cp2.cnstr_lhs = [
[(n_h[1, 0], 0, 1.0)], # 0
# [(n_h[1, -1], 0, 1.0)], # 1
# [(n_h[1, -1], 1, 1.0), (n_h[1, 0], 1, 1.0)],
]
cp2.cnstr_rhs = np.zeros((len(cp2.cnstr_lhs),), dtype=float)
X0 = -1e-3 * np.linalg.norm(u_unfoldable) * u_unfoldable
u_unfolded = cp2.solve(X0, acc=1e-5)
# ===========================================================================
# Print results
# ===========================================================================
u_zero = np.zeros_like(cp.nodes).flatten()
print "G_cl(uf_zero)", uf.get_G(u_zero, 0)
print "G_cl(uf_no_constraint)", uf.get_G(u_no_constraint, 0)
print "G_cl(uf_constant_length)", uf.get_G(u_constant_length, 0)
示例14: rhombus_2x3_grab_points
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
#.........这里部分代码省略.........
[1, 13, 19],
[9, 16, 22],
[2, 6, 19],
[6, 10, 22],
[6, 19, 22],
[2, 13, 19],
[10, 16, 22],
[2, 6, 20],
[6, 10, 23],
[6, 20, 23],
[2, 14, 20],
[10, 17, 23],
[3, 7, 20],
[7, 11, 23],
[7, 20, 23],
[3, 14, 20],
[11, 17, 23]
]
cp.grab_pts = [[24, 0],
[25, 5],
[26, 10],
[27, 15],
[28, 20],
[29, 25],
[30, 1],
[31, 6],
[32, 11],
[33, 16],
[34, 21],
[35, 26]
]
cp.cnstr_lhs = [[(5, 0, 1.0)],
[(13, 1, 1.0)],
[(12, 2, 1.0)],
[(13, 2, 1.0)],
[(14, 2, 1.0)],
[(15, 2, 1.0)],
[(16, 2, 1.0)],
[(17, 2, 1.0)],
[(24, 2, 1.0)],
[(24, 2, 1.0), (25, 2, -1.0)],
[(24, 2, 1.0), (30, 2, -1.0)],
[(24, 2, 1.0), (31, 2, -1.0)],
[(24, 1, 1.0), (30, 1, -1.0)],
[(24, 0, 1.0), (25, 0, -1.0)],
[(24, 0, 1.0), (27, 0, -1.0)],
[(26, 1, 1.0), (32, 1, -1.0)],
[(24, 2, 1.0), (26, 2, -1.0)],
[(24, 0, 1.0), (29, 0, -1.0)],
[(28, 1, 1.0), (34, 1, -1.0)]
]
cp.cnstr_rhs = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, dx, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
X0 = np.zeros((cp.n_dofs,), dtype = float)
X0[2] = 0.00005
X0[5] = 0.00005
X0[8] = 0.00005
X0[11] = 0.00005
示例15: rhombus_3x3_crane
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import cnstr_lhs [as 别名]
def rhombus_3x3_crane(n_steps = 10, dx = 0.7):
"""
This example shows a 3x2 rhombus creasepattern.
"""
cpr = YoshimuraCreasePattern(n_steps = n_steps,
L_x = 3,
L_y = 3,
n_x = 3,
n_y = 6,
MAX_ITER = 5000)
X_rcp = cpr.generate_X0()
X_rcp = X_rcp.reshape((-1, 3))
X_rcp[:, 2] += -0.1559
cp = CreasePattern(n_steps = n_steps, MAX_ITER = 500)
cp.nodes = cpr.nodes
cp.crease_lines = cpr.crease_lines
cp.facets = cpr.facets
grab_nodes = [[0.5, 0.333, 0], #31
[0.5, 0.667, 0],
[0.5, 1.333, 0],
[0.5, 1.667, 0],
[0.5, 2.333, 0], #35
[0.5, 2.667, 0],
[1.5, 0.333, 0],
[1.5, 0.667, 0],
[1.5, 1.333, 0],
[1.5, 1.667, 0],
[1.5, 2.333, 0],
[1.5, 2.667, 0],
[2.5, 0.333, 0],
[2.5, 0.667, 0],
[2.5, 1.333, 0], #45
[2.5, 1.667, 0],
[2.5, 2.333, 0],
[2.5, 2.667, 0]]#48
cp.nodes = np.vstack([cp.nodes, grab_nodes])
cp.grab_pts = [[31, 0],
[32, 21],
[33, 1],
[34, 22],
[35, 2],
[36, 23],
[37, 3],
[38, 24],
[39, 4],
[40, 25],
[41, 5],
[42, 26],
[43, 6],
[44, 27],
[45, 7],
[46, 28],
[47, 8],
[48, 29]
]
cnstr_lhs_3 = [[(31, 1, 1.0)],
[(31, 1, 1.0), (36, 1, 1.0)],
[(16, 2, 1.0)],
[(17, 2, 1.0)],
[(18, 2, 1.0)],
[(19, 2, 1.0)],
[(20, 2, 1.0)],
[(21, 2, 1.0)],
[(17, 1, 1.0)],
[(20, 1, 1.0)],
[(20, 0, 1.0)],
[(37, 1, 1.0), (42, 1, 1.0)],
[(31, 2, 1.0), (36, 2, -1.0)],
[(37, 2, 1.0), (42, 2, -1.0)],
[(43, 1, 1.0), (48, 1, 1.0)],
[(43, 2, 1.0), (48, 2, 1.0)],
[(33, 1, 1.0), (34, 1, 1.0)],
[(39, 1, 1.0), (40, 1, 1.0)],
[(45, 1, 1.0), (46, 1, 1.0)],
[(19, 0, 1.0), (21, 0, -1.0)],
[(1, 2, 1.0), (2, 0, -1.0)]
]
cp.cnstr_lhs = cnstr_lhs_3
cp.cnstr_rhs = np.zeros((cp.n_dofs,))
#.........这里部分代码省略.........