Skip to content

Add power cone benchmarks and iteration experiment script#28

Open
PTNobel wants to merge 2 commits intomainfrom
ptn/power-cone-benchmarks
Open

Add power cone benchmarks and iteration experiment script#28
PTNobel wants to merge 2 commits intomainfrom
ptn/power-cone-benchmarks

Conversation

@PTNobel
Copy link
Contributor

@PTNobel PTNobel commented Jan 30, 2026

Summary

  • Adds ASV benchmarks for power cone atoms comparing approx=True (SOC approximation) vs approx=False (native power cones)
  • Adds a standalone script (power_cone_iterations.py) for detailed iteration count experiments

Benchmarks added (power_cone_benchmarks.py)

  • power() with n=5000, n=1000
  • geo_mean() with n=100, n=500
  • pnorm() with n=5000, n=1000
  • Weighted geo_mean with n=100
  • Tests with both CLARABEL and SCS solvers

Iteration experiment script (power_cone_iterations.py)

Standalone script to compare iteration counts, time per iteration, and cone breakdown:

uv run python power_cone_iterations.py CLARABEL
uv run python power_cone_iterations.py SCS
uv run python power_cone_iterations.py MOSEK
uv run python power_cone_iterations.py CLARABEL -e geo_mean --n 500

Reports variables, constraints, cone breakdown, iterations, solve time, and time/iteration.

Test plan

  • Verified benchmarks run with CLARABEL and SCS
  • Verified iteration script produces expected output

cc @rileyjmurray - Ready for review

🤖 Generated with Claude Code

PTNobel and others added 2 commits January 29, 2026 11:11
Add comprehensive benchmarks comparing:
- power() atom with various exponents (convex p=1.5, negative p=-0.5, fractional p=0.3)
- geo_mean() atom with uniform weights, large scale (n=500), and weighted configurations
- pnorm() atom with various p values (p=1.5, p=3, p=0.5)

Each benchmark tests both:
- approx=True: Uses SOC approximation via rational decomposition
- approx=False: Uses native power cones

Problem sizes:
- power: n=5000, n=1000
- geo_mean: n=100 (quick), n=500 (large/stress test)
- pnorm: n=5000, n=1000
- weighted geo_mean: n=100

Tests are run with both CLARABEL and SCS solvers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds a standalone script to compare iteration counts and solve times
between power cones (approx=False) and SOC approximation (approx=True)
for geo_mean, pnorm, power, and inv_prod atoms.

Supports CLARABEL, SCS, and MOSEK solvers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant