File Types
FluxSim uses a family of custom file formats to represent different parts of a simulation project. Each extension maps to a specific role in the platform. All formats are JSON under the hood.
.ax Simulator Graph
A .ax file is the source of truth for a simulator project. It stores the full visual graph: every node, every edge, and all project-level properties including constants, simulation features, and sim config. The filename matches the simulator's name (e.g. simulation.ax).
When you save the canvas or save any Python file in the simulator builder, FluxSim reads this file and regenerates simulation.py. You never edit .ax files directly. The simulator builder writes them.
// simulation.ax (simplified)
{
"graph": {
"nodes": [...],
"edges": [...]
},
"properties": {
"constants": [
{ "name": "dt", "type": "float", "value": "0.1" },
{ "name": "duration", "type": "float", "value": "45" }
],
"sim_features": [...],
"sim_config": {
"noise_enable": false,
"noise_amplitude": 5.0
}
}
}
.axb Block Definition
A .axb file describes the interface of a single Python block as seen by the simulator builder. It is generated automatically whenever you save a .py file in the simulator. FluxSim parses the file's decorators via AST analysis and writes a corresponding .axb into the project's .block-objects/ directory.
The .axb contains the block's class name, its methods (with decorator type, input ports, and output ports), and any loader binding. The simulator builder reads .axb files to render the node palette and validate wiring on the canvas. You never write or edit these files.
// .block-objects/BisMeasurement.axb (simplified)
{
"class_name": "BisMeasurement",
"block_type": "block",
"methods": {
"load": { "decorator": "setup", "inputs": [], "outputs": [] },
"sample": { "decorator": "step_2", "inputs": ["state"], "outputs": ["bis"] }
}
}
.axc Controller Config
A .axc file lives at the root of a controller project and stores two things: the list of @axon_optimize features scanned from the project's Python source, and the user-configured optimization settings (search bounds per feature, number of iterations, and whether to save best only).
It is written automatically whenever you save a Python file in the controller builder, and read by the platform when you click Optimize or Simulate. You do not edit it directly.
// controller.axc
{
"opt_features": [
{ "name": "kp", "class_name": "PidController", "type": "float", "min": 3500, "max": 4500, "default": 4000 },
{ "name": "ki", "class_name": "PidController", "type": "float", "min": 500, "max": 700, "default": 600 }
],
"opt_config": {
"kp": { "min": 3500, "max": 4500 },
"ki": { "min": 500, "max": 700 },
"iterations": 20,
"save_best_only": true
}
}
.axp Plant Graph
A .axp file is the canvas file for the plant builder, representing the physiological model side of a simulator project. It follows the same graph structure as .ax, storing nodes, edges, and properties for the plant model specifically. Like .ax, it is written by the builder and read by codegen to generate the plant-side simulation code.
.axr Simulation Result
A .axr file is the output of a single patient simulation run. One file is written per patient. It contains the full signal traces recorded during the run, the timestep used, and any metadata captured by the Capture block. Files are named by patient ID (e.g. 42.axr) and stored under the run's traces/ directory.
The platform reads .axr files to render plots in the results panel and to compute per-patient loss for scoring and optimization.
// traces/42.axr
{
"patient_id": 42,
"dt": 0.1,
"signals": {
"bis": [93.0, 91.2, 88.7, ...]
}
}
All five formats are plain JSON. If you ever need to inspect them, open any .ax, .axb, .axc, .axp, or .axr file in any text editor. The platform reads and writes them on your behalf, but there is nothing proprietary in the format.