Files
cs249r_book/mlsysim/docs/api/core.solver.EconomicsModel.qmd
Vijay Janapa Reddi 611de228d9 fix(mlsysim): align docs with *Model naming convention
The solver.py refactoring renamed most solver classes from *Solver to
*Model (e.g. DistributedSolver → DistributedModel). The docs still
referenced the old names, causing the Quarto site build to fail with:
  ImportError: cannot import name 'DistributedSolver' from 'mlsysim'

- Fix executable code cells in tutorials/distributed.qmd
- Update non-executable code examples across 10 doc files
- Rename 19 API reference files from *Solver.qmd to *Model.qmd
- SensitivitySolver and SynthesisSolver retain their names (correct)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 08:39:11 -04:00

53 lines
1.9 KiB
Plaintext

# core.solver.EconomicsModel { #mlsysim.core.solver.EconomicsModel }
```python
core.solver.EconomicsModel()
```
Calculates Total Cost of Ownership (TCO) including Capex and Opex.
Combines hardware costs, energy consumption, and maintenance
into a single financial model for the fleet.
Literature Source:
1. Barroso et al. (2018), "The Datacenter as a Computer: An Introduction
to the Design of Warehouse-Scale Machines."
2. Patterson (2004), "Latent Bugs in Common-Case Software." (TCO Foundations)
3. Meta (2024), "Sustainable AI Infrastructure at Meta Scale."
## Methods
| Name | Description |
| --- | --- |
| [solve](#mlsysim.core.solver.EconomicsModel.solve) | Calculates the TCO for a fleet over a specified duration. |
### solve { #mlsysim.core.solver.EconomicsModel.solve }
```python
core.solver.EconomicsModel.solve(
fleet,
duration_days,
kwh_price=None,
datacenter=None,
grid=None,
)
```
Calculates the TCO for a fleet over a specified duration.
#### Parameters {.doc-section .doc-section-parameters}
| Name | Type | Description | Default |
|---------------|-------------|-------------------------------------|------------|
| fleet | Fleet | The hardware cluster configuration. | _required_ |
| duration_days | float | Operation duration in days. | _required_ |
| kwh_price | float | Price of electricity per kWh. | `None` |
| datacenter | Datacenter | A specific datacenter profile. | `None` |
| grid | GridProfile | A specific grid profile. | `None` |
#### Returns {.doc-section .doc-section-returns}
| Name | Type | Description |
|--------|------------------|---------------------------------------------------------|
| | Dict\[str, Any\] | Financial metrics including CapEx, OpEx, and total TCO. |