Skip to content
Back to skills

Modeling Basics

ASecurity

"Guides Pyomo users through core model construction, component

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
toolsgoexpressbackend

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill modeling-basics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Modeling Basics?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Modeling Basics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-modeling-basics/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-modeling-basics)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: modeling-basics
description: "Guides Pyomo users through core model construction, component
  inspection, and tiny concrete-model smoke checks."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# Modeling Basics

Use this sub-skill when the task is about building or reading a Pyomo model from
scratch with the core modeling objects rather than a data file, a CLI command,
or a structured extension.

## What this sub-skill covers

- `ConcreteModel` and the basic declaration pattern.
- `Set`, `RangeSet`, `Param`, `Var`, `Constraint`, `Objective`, `Block`,
  `Expression`, and `Suffix`.
- `value()`, `pprint()`, `display()`, and component traversal.
- Tiny self-contained model checks that prove the base package is usable.

## What to route elsewhere

- File-backed loading or `AbstractModel` workflows go to `data-and-io`.
- `pyomo solve`, `pyomo convert`, and solver selection go to `solve-and-cli`.
- GDP, DAE, network, MPEC, and units go to `structured-modeling`.
- APPSI, PyNumero, FBBT, simplification, community detection, or the model
  viewer go to `solver-extensions`.

## Read these references

- `../../references/core-modeling.md` for the verified core component patterns.
- `../../references/troubleshooting.md` for install/import or basic modeling
  failures.

## Use these helpers

- `../../scripts/check_import.py` for a fast import and metadata sanity check.
- `../../scripts/solve_tiny_milp.py` when you want a safe solver-backed smoke
  check for a tiny binary model.

## Typical workflow

1. Import `pyomo.environ`.
2. Create a `ConcreteModel`.
3. Declare sets, parameters, variables, constraints, and objectives.
4. Assign values or bounds where needed.
5. Inspect the model with `pprint()` or `display()`.
6. If the task asks for an execution check, run the tiny solver smoke.

## Common request patterns

- "How do I define a binary decision variable?"
- "Why is my constraint body or objective expression not evaluating?"
- "How do I traverse all active variables or constraints?"
- "How do I attach a suffix to a model?"
- "Can you show a tiny Pyomo model that solves?"

## Common failure modes

- Domain or bound mismatches during value assignment.
- Expressions that use values before the model is fully constructed.
- Misunderstanding `ConcreteModel` versus `AbstractModel`.
- Solver checks that fail because the solver is not installed yet.

## Practical guidance

- Keep examples tiny and self-contained.
- Prefer the simplest component that expresses the intent.
- Use `ConcreteModel` for immediate construction and inspection.
- Use `AbstractModel` only when the task depends on external data loading.
- When a user only needs to understand a component pattern, prefer references
  over a long worked example in the skill file itself.

## Examples of what belongs here

- A one-off model with a couple of variables and constraints.
- A script that inspects model components or prints values.
- A tiny binary model used to confirm the package and solver path.

## Examples of what does not belong here

- Solver templates, config files, or CLI subcommands.
- DAE discretization, GDP transformations, or network expansion.
- Optional backend installation or GUI troubleshooting.

## Related routes

- Move to `data-and-io` when the model starts from external input.
- Move to `solve-and-cli` when the question is about execution or solver flags.
- Move to `structured-modeling` when the model uses transformations or special
  model families.
- Move to `solver-extensions` when the workflow depends on optional packages or
  advanced solver interfaces.

Files in this skill

  • SKILL.md3.6 KB
  • references/troubleshooting.md1.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.