Ramly RAM analysis
v0.1.1Monte Carlo and Markov reliability & availability studies: build RBD models, simulate, compare.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_account Ramly account and plan limits
Your Ramly plan, runs used this month and the per-run simulation limit. Check before large studies.
list_models List RAM models
Lists the models on your Ramly account (including the example models), newest first.
get_model Get a RAM model
Returns a model in the Ramly model format (same shape create_model/update_model accept), its scenarios, and run_blockers (problems that would stop a run). Edit the returned `model` and pass it to update_model.
| Parameter | Type | Description |
|---|---|---|
model_id * | string |
create_model Create a RAM model
Creates a new reliability/availability model on your Ramly account (it also appears in the ramly.io editor). The model is a reliability block diagram: component_types define failure/repair distributions (e.g. "WEIBULL 12000 1.4", "EXPONENTIAL 60000" = MTTF 60,000 h), and `system` is a tree of blocks named uniquely without spaces (root "SYSTEM"): SERIES (all needed), PARALLEL with k (k-of-n hot redundancy), STANDBY with k, and COMPONENT leaves pointing at a component_type. Example: {"name":"Cooling water system","simulation":{"num_simulations":1000,"duration_hours":87600,"time_window_hours":876…
update_model Replace a RAM model
Replaces an existing model with the given definition (full replace, not a patch — start from get_model). Report metadata and pinned results set in the web editor are kept.
get_scenario Get a model scenario
Returns one scenario (version) of a model — its name, description and model in the same format as get_model — and run_blockers. get_model lists a model's scenario ids; the Base scenario is the model itself.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | |
scenario_id * | string |
create_scenario Create a model scenario
Adds a scenario (a named version or design option) to a model, e.g. "N+1 pumps" vs "N+2 pumps". Send `model` for its own definition, or leave it out to copy from_scenario_id (default: the Base scenario) and then update_scenario. Run it with run_simulation(scenario_id) and compare with compare_jobs. At most 50 per model.
update_scenario Update a model scenario
Renames or redescribes a scenario, and/or replaces its model (full replace, not a patch — start from get_scenario). Updating the Base scenario's model updates the model itself, like update_model.
delete_scenario Delete a model scenario
Permanently deletes one scenario of a model (not the Base scenario — use delete_model for that). Past runs of it stay in list_jobs. Confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | |
scenario_id * | string |
delete_model Delete a RAM model
Permanently deletes a model with all its scenarios and runs; it also disappears from the ramly.io editor. Can't be undone, and run credits already used this month stay used. Confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
model_id * | string |
run_simulation Run a Monte Carlo / analytical study
Runs the model on Ramly's engine — discrete-event Monte Carlo, or the exact analytical/Markov solver if the model's solver is "analytical". Uses one run credit from your monthly plan. Waits up to wait_seconds for the result and returns a results summary (system availability with P10/P50/P90, per-block KPIs worst-first, importance, sensitivity, costs, spares, crews). If it is still running, call get_job later.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | |
scenario_id | string | Optional: run one of the model's scenarios instead of the base model. |
wait_seconds | integer |
get_job Get a study result
Status and results summary of a run. include_full_results adds the raw engine output (large: histograms, every window).
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
include_full_results | boolean |
list_jobs List study runs
Recent runs, newest first, optionally for one model.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
model_id | string |
compare_jobs Compare study results
Side-by-side comparison of 2–5 completed runs (e.g. design options or scenarios): system availability, downtime, failures, MTBF/MTTR, cost, and the blocks whose availability differs most. The first job is the baseline.
| Parameter | Type | Description |
|---|---|---|
job_ids * | array |
calculate_system_availability System availability (reliability block diagram)
Steady-state availability, annual downtime, mission reliability and MTTF of a system modelled as groups in series, where each group is k-out-of-n redundant. A plain series system is one group with all components required; a 2-of-3 pump set is a group with k=2 and three components. Computed locally from MTBF/MTTR (exponential assumption). Quick estimate — for a full study use create_model + run_simulation.
| Parameter | Type | Description |
|---|---|---|
groups * | array | Groups connected in series. The system is up only when every group is up. |
curve_points | integer | If > 0, also return the reliability curve R(t) sampled at this many intervals. |
mission_time_hours | number | Mission length for reliability R(t), hours. Defaults to one year (8760). |
component_availability Component availability from MTBF and MTTR
Inherent availability A = MTBF / (MTBF + MTTR) of one repairable item, plus annual downtime. Quick estimate — for a full study use create_model + run_simulation.
| Parameter | Type | Description |
|---|---|---|
mtbf_hours * | number | Mean time between failures, hours. |
mttr_hours * | number | Mean time to repair, hours. |
required_mtbf_for_target MTBF needed to hit an availability target
Minimum MTBF a single repairable item needs to reach a target availability at a given MTTR: MTBF = A * MTTR / (1 - A). Quick estimate — for a full study use create_model + run_simulation.
| Parameter | Type | Description |
|---|---|---|
mttr_hours * | number | Mean time to repair, hours. |
target_availability * | number | Target as a fraction, e.g. 0.995 for 99.5%. |