Skip to content

Baseline simulator ​

Version meaning ​

The baseline is the stable, general simulation mechanism. It models dates, marketplaces, advertising touchpoints, ordered paths, traffic variation, conversion effects, cost, revenue, and an evaluation-only truth table. It does not introduce national economic variables.

Generator version 2.0.0 identifies the interaction-aware mechanism written to manifests. Package version 0.4.0 keeps the established command and configuration surface while adding the standalone domain model, optional research sections, native five-segment values, and direct PostgreSQL storage.

Tracked reference configurations ​

The repository retains simulations/baseline/configs/default.json and its generated reference outputs so earlier project work remains reproducible. They are synthetic research parameters, not measurements or a production campaign configuration. examples/baseline.toy.json is the smaller fictional fixture used by automated tests.

A private project should still pass its real configuration through --config from a caller-controlled location rather than modifying the tracked reference.

Modules ​

  • configuration.py loads inheritance and validates parameters.
  • behavior.py converts marketplace and global behavior fields into neutral adjustments.
  • simulation.py generates the three logical tables in memory.
  • schemas.py owns stable table names, column order, aliases, and DatasetBundle.
  • validation.py checks complete-bundle integrity.
  • storage.py contains Comma-Separated Values (CSV), SQLite, and the writer protocol.
  • postgresql_storage.py owns explicit reset, schema creation, indexes, and bounded direct research inserts.
  • pipeline.py coordinates generation, validation, selection, writers, and manifest creation.
  • command.py exposes the command-line interface.

Run the toy example ​

sh
cd ZheyuanWu
python -m simulations.baseline.mta_dataset \
  --config examples/baseline.toy.json \
  --output generated/toy

For a real private configuration, replace both paths with locations owned by the private project. See External Configurations and Writers.

Parameter groups ​

Compatibility promise ​

Private projects should depend on the documented configuration fields, DatasetBundle, stable table names, run_pipeline, and DatasetWriter. They should not depend on internal helper functions or toy values.

Public algorithms; caller-owned private data.