12 lines
378 B
Python
12 lines
378 B
Python
from admm_lite.solver import admm_step
|
|
|
|
|
|
def test_admm_step_signature():
|
|
x, y, u = 0.0, 0.0, 0.0
|
|
x2, y2, u2 = admm_step(x, y, u, rho=1.0, a=1.0, b=1.0)
|
|
# Basic sanity: should return floats and maintain constraints (approximately)
|
|
assert isinstance(x2, float)
|
|
assert isinstance(y2, float)
|
|
assert isinstance(u2, float)
|
|
assert abs(x2 + y2 - 1.0) < 1e-6
|