using pydrake to solve (dual) LP question
##for the exam in AGTA, using pydrake LP module to solve dual LP question
prog = MathematicalProgram()
y = prog.NewContinuousVariables(2)
prog.AddLinearCost(4*y[0])
prog.AddLinearCost(8*y[1])
prog.AddLinearConstraint( y[0] + y[1] >= 2 )
prog.AddLi
原创
2021-05-23 03:18:13 ·
118 阅读 ·
0 评论