optimize neqsim process model plant

An optimisation add-on for a large, already-built NeqSim plant model with several process areas and operating scenarios. It changes plant settings and evaluates the results in repeated trials.

In plain words
What is it for?
Use it to adjust compressor pressures, heating and cooling temperatures, stage pressures, and routing fractions in offshore separation, recompression, and export systems. It supports multi-year and scenario-based optimisation.
Why use it?
It helps find better operating conditions across complex plant layouts, multiple years, or different scenarios without replacing the existing model with a smaller example. It also checks objectives and constraints during the search.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/equinor/neqsim/optimize.processmodel
Clone the repo
git clone --depth 1 https://github.com/equinor/neqsim
Per session 203 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,113 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00203 $0.02113
Opus 5 $0.00102 $0.01056
Sonnet 5 $0.00041 $0.00423
Haiku 4.5 $0.00020 $0.00211

Measured yesterday against content hash b7f6f9b4a6c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

optimize neqsim process model plant scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/agents/optimize.processmodel.agent.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Loaded skills

Loaded skills: neqsim-agentic-process-optimization, neqsim-optimization-and-doe, neqsim-platform-modeling, neqsim-api-patterns, neqsim-notebook-patterns, neqsim-professional-reporting

ALWAYS read these skills before proceeding:

  • .github/skills/neqsim-agentic-process-optimization/SKILL.md — the core recipe: decision space, robust trial evaluation, objective/constraint extraction, multi-year sweeps, and the NeqSim-update workflow
  • .github/skills/neqsim-optimization-and-doe/SKILL.md — which optimizer algorithm to pick (SQP, PSO, BatchStudy, ProcessSimulationEvaluator bridge)
  • .github/skills/neqsim-platform-modeling/SKILL.md — how the multi-area ProcessModel is built (separation trains, recompression, export, recycles)
  • .github/skills/neqsim-api-patterns/SKILL.md — fluid creation, flash, equipment accessors
  • .github/skills/neqsim-notebook-patterns/SKILL.md — when delivering a notebook
  • .github/skills/neqsim-professional-reporting/SKILL.md — when delivering a report

Operating Principles

  1. Optimize the live plant, not a toy. The flowsheet is a ProcessModel with named ProcessSystem areas and recycles. Read it, do not rebuild it from scratch.
  2. Read the decision space first. ProcessAutomation.getAdjustableParameters() gives bounded knobs. Supply real [lo, hi] for any UNBOUNDED_THRESHOLD (1e9) bound. This only works if the model was built with the optimization data basis — line sizes + manifold sizes for hydraulics, valve/choke Cv, compressor/pump maps + speeds, separator dimensions + design K, and equipment design limits (rated power, surge margin, NPSH, erosional velocity, design P/T, MAWP). Without these, the decision space is empty and capacity constraints never fire. Gather/gate the basis with enterprise-process-model-build-verify (target_fidelity="optimization_ready"). Enable capacity limits for every equipment type (separators, pumps, valves, pipelines, heaters/coolers, HX, manifolds) with ProcessAutomation.enableCapacityConstraints(), and for a pure max-throughput study use the native findMaxThroughputJson(feedAddresses, min, max, unit, utilizationLimit) (bisects total feed to the first binding unit). Routing is a first-class knob: splitters expose bounded splitFactor_i (0-1) INPUTs that getAdjustableParameters() surfaces automatically.
  3. Never optimize an ADJUSTER-controlled knob — the model already solves it.
  4. Gate every trial. Use runUntilConverged + getRunStatus().success + getConvergenceReportJson(). A non-converged or failed-unit trial returns a large penalty, never a misleading objective and never a crash.
  5. Score from real equipment. Compression power and surge margins come from Compressor.getOperatingPoint(); RVP comes from Standard_ASTM_D6377 RvpResult. For a one-call product-quality observable use ProcessAutomation.getProductQualityJson(address) (RVP/TVP + gas cricondenbar/cricondentherm on a cloned fluid, never throws). Test compressor margins for NaN before comparing. Pick the compressor control mode deliberately: solve-speed (fixed discharge P, speed/power are outputs) for spec/capacity/max-throughput studies against fixed pressure boundaries; predictive (fixed speed → computed discharge P) when shaft speed is a decision variable (see neqsim-agentic-process-optimization §5).
  6. Soft constraints. Express RVP ≤ spec and surge ≥ floor as penalties so gradient-free optimizers degrade gracefully.
  7. Rebuild per year. Feed composition/rate change with the year, so the whole heat/mass balance changes — optimize on a fresh build, not a stale one.
  8. Parallel only with deep copies. Use ProcessSystem.copy() / BatchStudy / MonteCarloSimulator for fixed-year screening; copies are independent. For scoring a list of candidate setpoint maps in one call, ProcessAutomation.evaluateBatchJson( candidates, unit, readbacks, maxParallel) runs each candidate on its own ProcessSystem.copy() thread (parallel, live model untouched) and returns per-candidate convergence detail — ideal for SciPy/BoTorch/GA populations.
  9. Pick up new NeqSim functionality via devtools (target/classes) or by repackaging the shaded JAR into the pip neqsim (see skill §8). Verify the new methods are callable before relying on them.
  10. Honest about gaps. NeqSim has no Bayesian optimization / MINLP / LHS — bridge to SciPy/Pyomo/BoTorch via ProcessSimulationEvaluator when needed.

Read the full file on GitHub · 125 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 125 lines · 203 tokens per session scan A b7f6f9b4a6c1

Subscribe to this mod's changes

optimize neqsim process model plant is an agent published in the GitHub repository equinor/neqsim (147 stars, last pushed yesterday), licensed Apache-2.0. It adds 203 tokens to every session and 2,113 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.