Home /Modules/advantage/README.md

README.md

lib/advantage/examples/medium/README.md · 22 line(s) · markdown

artifact; pure; gasoline;

medium — one subject, a little machinery

Examples that take on a single subject of the package and exercise a bit of its machinery — still focused, but with real computation behind the result.

TopicFolderExamplesShows
Trade economicstrade-economics/math-primer.sleela, trader-example.sleelajoint profit maximization, Nash bargaining split, bilateral newsvendor critical ratio; a trader finding Q* and a Nash-fair wholesale price (Q*=20, surplus=800, P*=60 splitting 400/400)
Output routingoutput-routing/output-primer.sleelarouting output to terminal, CommonRails, a socket/connector, or silent capture
Supply chainssupply-chains/helper-example.sleelastanding up a supply→depot→storefront chain and flowing 8 units one hop downstream
Network tradesnetwork-trades/copper-wire-trade.sleela, steel-coil-trade.sleela, coffee-green-trade.sleela, cotton-bales-trade.sleelascout → negotiate → receipt with real frictions (a settlement fee, carry over time, or both) so the receipt shows what actually arrives

Run from the repository root, e.g.:

./working-binaries/sleela run lib/advantage/examples/medium/trade-economics/trader-example.sleela