chemart / disperser
View on GitHubChemical disperser (load balancing) — A distributed algorithm that happens to be a chemistry. Each network node holds a species whose concentration is its workload, and each directed link carries a catalyst that converts a job at one end into a job at the ot…
{"species": [{"id": "X1", "structure": null}, {"id": "X2", "structure": null}, {"id": "X3", "structure": null}, {"id": "X4", "structure": null}, {"id": "C1_2", "structure": null}, {"id": "C1_3", "structure": null}, {"id": "C1_4", "structure": null}, {"id": "C2_1", "structure": null}, {"id": "C2_3", "structure": null}, {"id": "C3_1", "structure": null}, {"id": "C3_2", "structure": null}, {"id": "C4_1", "structure": null}], "reactions": [{"reactants": {"C1_2": 1, "X1": 1}, "products": {"C1_2": 1, "X2": 1}, "rate": {"law": "mass-action", "k": 1.0}, "count": null}, {"reactants": {"C1_3": 1, "X1": 1}, "products": {"C1_3": 1, "X3": 1}, "rate": {"law": "mass-action", "k": 1.0}, "count": null}, {"reactants": {"C1_4": 1, "X1": 1}, "products": {"C1_4": 1, "X4": 1}, "rate": {"law": "mass-action", "k": 1.0}, "count": null}, {"reactants": {"C2_1": 1, "X2": 1}, "products": {"C2_1": 1, "X1": 1}, "rate": {"law": "mass-action", "k": 1.0}, "count": null}, {"reactants": {"C2_3": 1, "X2": 1}, "products": {"C2_3": 1, "X3": 1}, "rate": {"law": "mass-action", "k": 1.0}, "count": null}, {"reactants": {"C3_1": 1, "X3": 1}, "products": {"C3_1": 1, "X1": 1}, "rate": {"law": "mass-action", "k": 1.0}, "count": null}, {"reactants": {"C3_2": 1, "X3": 1}, "products": {"C3_2": 1, "X2": 1}, "rate": {"law": "mass-action", "k": 1.0}, "count": null}, {"reactants": {"C4_1": 1, "X4": 1}, "products": {"C4_1": 1, "X1": 1}, "rate": {"law": "mass-action", "k": 1.0}, "count": null}], "status": "complete", "initial_state": {"X1": 0.0, "X2": 0.0, "X3": 0.0, "X4": 1000.0, "C1_2": 1.0, "C1_3": 1.0, "C1_4": 1.0, "C2_1": 1.0, "C2_3": 1.0, "C3_1": 1.0, "C3_2": 1.0, "C4_1": 1.0}, "inflow": null, "outflow": null, "extras": {"compartments": {"1": ["X1", "C1_2", "C1_3", "C1_4"], "2": ["X2", "C2_1", "C2_3"], "3": ["X3", "C3_1", "C3_2"], "4": ["X4", "C4_1"]}}, "chemistry": "disperser", "params": {"graph": [[1, 2], [1, 3], [1, 4], [2, 3]], "k": 1.0, "catalyst_concentration": 1.0, "initial_jobs": {"4": 1000}}, "seed": 1}