How to use CalculationSourceObject
An agent writes the calculation. You review the work.
Use CalculationSourceObject with your coding agent. The agent writes and checks the calculation, builds the document and makes a PDF. You can then read the inputs, formulas, assumptions and results, and decide whether the calculation is suitable.
Step 1
Agent writes
Start with the engineering problem
You give the agent the problem, inputs, units and assumptions. The agent writes an annotated calculation in Python, with named quantities, formulas, explanations and results.
The calculation source contains the steps that will appear in the document. When you change a formula, the agent updates that source.
You get: A calculation source you can inspect and change.
Step 2
Agent verifies
Check the calculation before making the document
The agent runs the calculation for your inputs. The verifier evaluates the documented formulas and compares their values with the Python results. This is source-to-document consistency. The agent investigates failed checks and fixes the source before continuing.
If you have an independent numerical reference case, the agent can also compare against its expected results. A consistency check alone does not establish that the engineering method fits your problem.
You get: A check report that states what passed, failed or was not checked.
Step 3
Agent compiles
Build the document from the calculation
Here, compile means assemble the calculation document. The agent uses the calculation source and its results to build the document, with inputs, formulas, substitutions, units, explanations and figures in source order.
This happens before the document appears on screen or goes to print. PDF generation includes this step.
You get: A document that shows how the calculation reaches its results.
Step 4
Agent prints
Make the PDF for review
The agent uses the PDF command to verify the calculation, compile the document and save it as a PDF. By default, the command also saves the check report and supporting records with the output.
Before handing it over, the agent must inspect every page for missing content, unreadable formulas, clipped figures and poor page breaks. You can read the PDF on screen or print a paper copy.
You get: A PDF and its check records, ready for human review.
Step 5
Human reviews
Review the engineering work
An engineer reads the document and checks the inputs, assumptions, method, units and results against the actual problem. The formulas and explanations make the reasoning available for that review.
If something needs to change, send it back to the agent. The agent updates the source, repeats the checks and makes a new PDF for review. Record your review against the PDF version you checked.
You get: A human review decision, with any changes needed.
Step 6 · Planned
Export
Use the calculation in other software
Planned exports would turn the reviewed calculation into code for C#, TypeScript and other languages. This would let you use the calculation in another application.
C# and TypeScript export are not available yet. Python code generation is available now. Exported code still needs execution and checks in its target application.
Planned output: Code for use in other applications.