Back to Blog
AI & Optimization

Orchestrating Techno-Economic Energy Modeling with Claude Code and the FIDgate Python SDK

Orchestrating Techno-Economic Energy Modeling with Claude Code and the FIDgate Python SDK
Share

You finish the base case for a solar-plus-storage project. Then the questions arrive. What if the battery is four hours instead of two? What if the grid connection is smaller? What does the same design look like at fifteen other sites?

In a spreadsheet or a GUI, each question is another round of re-entering inputs, copying results and hoping nothing drifted along the way. For utility-scale solar, storage and hybrid projects (wind generation can be included as an input time series), pre-FID design is a sweep problem: many sizes, many sites, a handful of operating scenarios, one consistent method. The bottleneck is rarely the math. It is the manual orchestration around the math.

This guide shows a different pattern. You describe the study in plain English. Claude Code turns that description into a Python script that you can read, review and version in Git. The script calls the FIDgate Python SDK, and FIDcore, FIDgate's deterministic optimization engine, computes every scenario.

AI orchestrates. Engineers decide. FIDcore does the math.

In this guide

  1. The mental model: who does what

  2. Prerequisites and setup

  3. A real walkthrough: 16 German locations in one run

  4. A copy-paste prompt library (4 prompts)

  5. Engineering best practices

  6. Common mistakes to avoid

  7. Get started

A note on the numbers. The benchmark in this post is a workflow demo that used synthetic, illustrative electricity prices. It shows how the workflow runs, not what any real site would earn.

The Mental Model: Claude Is the Director, FIDcore Is the Deterministic Engine

Think of the workflow as four roles.


image 1

The rule that makes this safe is simple: Claude Code is never the source of an energy or financial number. It writes the script that defines the cases, runs it, and reads and explains the output files. Every scenario result comes from FIDcore. If a number appears in your deliverable, you should be able to trace it to a file FIDcore wrote.

FIDcore is a deterministic mixed-integer linear programming (MILP) optimization engine: run the same inputs again and you get the same answer. It finds the best design within the search space and model you define, which is exactly why you want that search space written down explicitly, in a script, rather than clicked together.

That gives you a clean division of labor:

  • The script is the input. It is plain Python, so you can read it, diff it and keep it in Git.

  • The output files are the results. They are plain files you can open, check and re-use.

  • Claude Code sits in between. It translates your intent into the script and helps you read the results. It does not replace the calculation.


Prerequisites and Setup

You need three things. The FIDgate Python SDK & API are live today, and the Early Adopter Program is open now.

1. Claude Code installed

Install Claude Code as a command-line tool, a desktop app or an IDE extension, following Anthropic's installation guide for your platform. Any of them works for this workflow.

2. A Python environment, the FIDgate Python SDK and API credentials

Create an isolated environment and install the SDK:

image 2

Early Adopter onboarding gives you API credentials. Keep the token out of prompts, scripts and Git: read it from an environment variable (we use FIDGATE_API_TOKEN) or from a git-ignored settings file.

3. A clean project folder

image 3

Keeping the project definition (config.py) apart from the orchestration (run_batch.py) means you can review the engineering assumptions without wading through loop logic.

Then give Claude Code standing rules in CLAUDE.md, so you do not have to repeat them in every prompt:

image 4

Here is what the project definition contains. This is a conceptual sketch of what config.py captures; the exact syntax comes from the SDK documentation you receive at onboarding. Every number is yours to set explicitly and document.

image 5

Two details worth noticing: the battery is dispatched against a day-ahead price series that you provide, and wind, if your project has it, enters as an input generation profile.

AI Should Orchestrate Energy Modeling, Not Do the Math | Claude Code + FIDgate SDK

Real-World Walkthrough: 16 German Locations in One Run

Here is the workflow we actually ran, start to finish. The result:

Unlock the Full Article

You've read a free preview. Enter your name and work email to continue reading the complete post.

We use your email only to understand our audience. No spam, ever.

Want to discuss your next project?

Talk to our team about how FIDgate supports your path to FID.

Contact us