返回顶部
h

hpr-solver

Solve optimization & planning problems using natural language. Just describe what you need — fast, accurate, and built for AI agents.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.0.9
安全检测
已通过
240
下载量
0
收藏
概述
安装方式
版本历史

hpr-solver

# HPR Solver Solve Linear Programming problems using HPR solver. ## Trigger When user wants to solve an LP problem (MPS file or natural language description). ## Usage ### For MPS Files User provides path to .mps file. Confirm parameters first: ``` ⚠️ Please confirm parameters: 1. stoptol (default 1e-6): ? 2. time_limit (default 3600s): ? 3. device_number (0=GPU, -1=CPU): ? 4. Need variable values? (Yes/No) ``` After confirmation, run: ```bash ~/julia/julia-1.10.4/bin/julia --project ~/.openclaw/workspace/HPR-LP \ ~/.openclaw/workspace/HPR-LP/hprlp_solve.jl <mps_file> <time_limit> <stoptol> <device> ``` ### For Natural Language 1. Parse problem, output mathematical model for confirmation: ```markdown 📐 Mathematical Model: ```max [objective function] ``` ```s.t. [constraint 1] [constraint 2] [constraint 3] ``` **Variables:** - x₁ = [description] - x₂ = [description] ``` 2. After user confirms, ask parameters (same as MPS) 3. Model in Julia/JuMP: ```julia using JuMP using HPRLP model = Model(HPRLP.Optimizer) set_optimizer_attribute(model, "stoptol", <value>) set_optimizer_attribute(model, "time_limit", <value>) set_optimizer_attribute(model, "device_number", <value>) set_optimizer_attribute(model, "verbose", true) @variable(model, x1 >= 0) @variable(model, x2 >= 0) @constraint(model, c1, <constraint 1>) @constraint(model, c2, <constraint 2>) @objective(model, Max, <objective>) optimize!(model) ``` 4. Output Solution Summary: ``` 📊 HPR-LP Results === Solution Summary === Status: [OPTIMAL/INFEASIBLE/...] Iterations: <count> Solve Time: <seconds> Primal Objective: <value> Dual Objective: <value> KKT Error: <error> === Variables === x₁ = <value> x₂ = <value> ``` ## Parameters | Parameter | Default | Description | |-----------|---------|-------------| | stoptol | 1e-6 | Stopping tolerance | | time_limit | 3600 | Time limit (seconds) | | device_number | 0 | GPU device (-1 for CPU) | ## Non-LP Problems If problem is NOT linear (has integer vars, x², products, etc.), respond: ``` ⚠️ HPR only supports Linear Programming (LP). This appears to be: - Integer/MILP (use GLPK, CBC, HiGHS) - Non-linear (use Ipopt) - Quadratic (use Gurob, CPLEX) ``` ## Requirements - Julia 1.10.4 - HPR-LP - Linux/macOS/Windows

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 hpr-solver-1776296282 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 hpr-solver-1776296282 技能

通过命令行安装

skillhub install hpr-solver-1776296282

下载 Zip 包

⬇ 下载 hpr-solver v0.0.9

文件大小: 11.22 KB | 发布时间: 2026-4-17 15:02

v0.0.9 最新 2026-4-17 15:02
Security notice in SKILL.md. Description: optimization & planning via natural language.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部