feat: Implement full problem generation
This commit marks a major milestone in the problem generator project.
Key systems include:
- Fully functional problem generation for all 23 defined concepts (Simple Interest, Compound Interest, Banker's Discount, Effective Rate, Continuous Compounding, Exact/Ordinary Simple Interest).
- Robust date handling for date-specific interest calculations.
- Improved solution presentation with accurate "Substitute Values" step and complete variable descriptions.
- Interactive problem display in `main.py`: problem statement shown first, question and solution revealed on user input.
- Added plausibility checks for rate calculations to avoid unrealistic negative rates.
- Comprehensive `README.md` update:
- Detailed system architecture (modules, data files, Mermaid diagram).
- List of all currently covered financial concepts.
- Instructions for running and extending the generator.
- Discussion of scope for future enhancements (Equation of Value, Gradients, etc.).
- Refinements to `value_sampler.py` for better formatting and handling of None values.
- Updates to `text_snippets.json` for complete variable descriptions and improved solution step phrasing.
- Updates to `value_ranges.json` for date generation parameters.
- `problem_engine.py` now systematically tests all concepts when run directly.
- Added `uv.lock` to track resolved dependencies.
The system is capable of generating a wide variety of engineering economy problems with detailed, step-by-step solutions and an interactive user experience.
This commit is contained in:
@@ -55,6 +55,13 @@
|
||||
"internal_precision": 8,
|
||||
"display_precision": 2
|
||||
},
|
||||
"interest_rate_per_period_effective": {
|
||||
"min": 0.005,
|
||||
"max": 0.05,
|
||||
"unit_display": "% per period",
|
||||
"internal_precision": 8,
|
||||
"display_precision": 3
|
||||
},
|
||||
"discount_rate_bankers": {
|
||||
"min": 0.05,
|
||||
"max": 0.20,
|
||||
@@ -83,7 +90,7 @@
|
||||
},
|
||||
"number_of_periods_general": {
|
||||
"min": 2,
|
||||
"max": 30,
|
||||
"max": 60,
|
||||
"unit": "periods",
|
||||
"integer": true
|
||||
},
|
||||
@@ -111,20 +118,24 @@
|
||||
"description": "General date, used for start_date and end_date generation.",
|
||||
"type": "date",
|
||||
"min_year": 1990,
|
||||
"max_year": 2030
|
||||
"max_year": 2030
|
||||
},
|
||||
"time_days_exact_ordinary": {
|
||||
"description": "Number of days for exact/ordinary interest calculations (derived from dates).",
|
||||
"type": "integer",
|
||||
"min": 30,
|
||||
"max": 730,
|
||||
"min": 30,
|
||||
"max": 730,
|
||||
"unit": "days",
|
||||
"display_precision": 0
|
||||
},
|
||||
"time_base_days_exact_ordinary": {
|
||||
"description": "Time base in days for exact (365/366) or ordinary (360) interest.",
|
||||
"type": "integer",
|
||||
"options": [360, 365, 366],
|
||||
"options": [
|
||||
360,
|
||||
365,
|
||||
366
|
||||
],
|
||||
"unit": "days",
|
||||
"display_precision": 0
|
||||
},
|
||||
@@ -132,6 +143,13 @@
|
||||
"description": "Time period as a fraction of a year (calculated).",
|
||||
"type": "float",
|
||||
"unit": "years",
|
||||
"display_precision": 6
|
||||
"display_precision": 6
|
||||
},
|
||||
"date_period_generation": {
|
||||
"description": "Parameters for generating random date periods.",
|
||||
"min_days": 30,
|
||||
"max_days": 730,
|
||||
"base_year_start": 1990,
|
||||
"base_year_end": 2030
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user