neil / Fast direct relaxation of implicit functions
0 喜歡
0 分支
1 檔案
最後活躍 3 months ago
The example is from Scott et al., 2011. Generalized mccormick relaxations. Journal of Global Optimization, 51(4), pp.569-606.
| 1 | using McCormick, BenchmarkTools |
| 2 | |
| 3 | """ |
| 4 | Direct relaxation of implicit function |
| 5 | """ |
| 6 | function direct_relax(f, x, p) |
| 7 | delta = Inf |
| 8 | while delta > 1e-8 |
| 9 | x_prev = x |
| 10 | x = f(x, p) |
上一頁
下一頁