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.
156 lines
3.4 KiB
JSON
156 lines
3.4 KiB
JSON
{
|
|
"principal": {
|
|
"min": 500,
|
|
"max": 200000,
|
|
"currency": "Php",
|
|
"decimals": 2,
|
|
"default_display_precision": 2
|
|
},
|
|
"loan_amount": {
|
|
"min": 1000,
|
|
"max": 500000,
|
|
"currency": "Php",
|
|
"decimals": 2,
|
|
"default_display_precision": 2
|
|
},
|
|
"investment_amount": {
|
|
"min": 100,
|
|
"max": 100000,
|
|
"currency": "Php",
|
|
"decimals": 2,
|
|
"default_display_precision": 2
|
|
},
|
|
"future_value": {
|
|
"min": 1000,
|
|
"max": 1000000,
|
|
"currency": "Php",
|
|
"decimals": 2,
|
|
"default_display_precision": 2
|
|
},
|
|
"interest_amount": {
|
|
"min": 50,
|
|
"max": 50000,
|
|
"currency": "Php",
|
|
"decimals": 2,
|
|
"default_display_precision": 2
|
|
},
|
|
"payment_amount": {
|
|
"min": 100,
|
|
"max": 50000,
|
|
"currency": "Php",
|
|
"decimals": 2,
|
|
"default_display_precision": 2
|
|
},
|
|
"simple_interest_rate_annual": {
|
|
"min": 0.02,
|
|
"max": 0.25,
|
|
"unit_display": "% per annum",
|
|
"internal_precision": 8,
|
|
"display_precision": 2
|
|
},
|
|
"compound_interest_rate_nominal": {
|
|
"min": 0.03,
|
|
"max": 0.18,
|
|
"unit_display": "%",
|
|
"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,
|
|
"unit_display": "%",
|
|
"internal_precision": 8,
|
|
"display_precision": 2
|
|
},
|
|
"time_years": {
|
|
"min": 1,
|
|
"max": 20,
|
|
"unit": "years",
|
|
"integer": true,
|
|
"allow_fractional_if_months_also_present": true
|
|
},
|
|
"time_months": {
|
|
"min": 1,
|
|
"max": 48,
|
|
"unit": "months",
|
|
"integer": true
|
|
},
|
|
"time_days": {
|
|
"min": 10,
|
|
"max": 360,
|
|
"unit": "days",
|
|
"integer": true
|
|
},
|
|
"number_of_periods_general": {
|
|
"min": 2,
|
|
"max": 60,
|
|
"unit": "periods",
|
|
"integer": true
|
|
},
|
|
"loan_payment_count": {
|
|
"min": 2,
|
|
"max": 5,
|
|
"integer": true
|
|
},
|
|
"compounding_frequency_options": {
|
|
"annually": 1,
|
|
"semi-annually": 2,
|
|
"quarterly": 4,
|
|
"monthly": 12,
|
|
"bi-monthly": 6,
|
|
"semi-monthly": 24
|
|
},
|
|
"gradient_amount": {
|
|
"min": 100,
|
|
"max": 5000,
|
|
"currency": "Php",
|
|
"decimals": 2,
|
|
"default_display_precision": 2
|
|
},
|
|
"date_general": {
|
|
"description": "General date, used for start_date and end_date generation.",
|
|
"type": "date",
|
|
"min_year": 1990,
|
|
"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,
|
|
"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
|
|
],
|
|
"unit": "days",
|
|
"display_precision": 0
|
|
},
|
|
"time_years_fractional": {
|
|
"description": "Time period as a fraction of a year (calculated).",
|
|
"type": "float",
|
|
"unit": "years",
|
|
"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
|
|
}
|
|
}
|