{"library":"sleipnirgroup-jormungandr","title":"Jormungandr","description":"Reverse mode automatic differentiation library and domain-specific language for nonlinear programming (NLP) solvers. Designed for efficient gradient and Hessian computations, it provides a Python DSL to formulate and solve optimization problems. Current version 0.5.4, requires Python >=3.12. Development is active with pre-1.0 breaking changes expected.","language":"python","status":"active","last_verified":"Sat May 09","install":{"commands":["pip install sleipnirgroup-jormungandr"],"cli":null},"imports":["from jormungandr import Jormungandr","from jormungandr import autodiff","from jormungandr.nlp import NlpSolver"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from jormungandr import Jormungandr\n\n# Define variables\nx = Jormungandr.variable('x')\ny = Jormungandr.variable('y')\n\n# Define expression\nf = x**2 + y**2\n\n# Compute gradient (reverse mode)\ngrad = Jormungandr.gradient(f, [x, y])\nprint('Gradient at (1,2):', grad.eval({'x': 1, 'y': 2}))\n\n# Solve NLP\nfrom jormungandr.nlp import NlpSolver\nsolver = NlpSolver()\nsolver.set_objective(f)\nsolver.set_initial_guess({'x': 0.0, 'y': 0.0})\nsolution = solver.solve()\nprint('Solution:', solution)","lang":"python","description":"Minimal example showing variable creation, expression evaluation with reverse mode autodiff, and NLP solving.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}