Iteration final - PROBLEM_DESCRIPTION
Sequence: 5
Timestamp: 2025-07-27 23:21:31

Prompt:
You are a business analyst creating structured optimization problem documentation.

DATA SOURCES EXPLANATION:
- FINAL OR ANALYSIS: Final converged optimization problem from alternating process (iteration 1), contains business context and schema mapping evaluation
- DATABASE SCHEMA: Current database structure after iterative adjustments  
- DATA DICTIONARY: Business meanings and optimization roles of tables and columns
- CURRENT STORED VALUES: Realistic business data generated by triple expert (business + data + optimization)
- BUSINESS CONFIGURATION: Scalar parameters and business logic formulas separated from table data

CRITICAL REQUIREMENTS: 
- Ensure problem description naturally leads to LINEAR or MIXED-INTEGER optimization formulation
- Make business context consistent with the intended decision variables and objectives
- Align constraint descriptions with expected mathematical constraints
- Ensure data descriptions map clearly to expected coefficient sources
- Maintain business authenticity while fixing mathematical consistency issues
- Avoid business scenarios that would naturally require nonlinear relationships (variable products, divisions, etc.)

AUTO-EXTRACTED CONTEXT REQUIREMENTS:
- Business decisions match expected decision variables: assignment[Course_ID, Teacher_ID] is a binary variable indicating if a teacher is assigned to a course
- Operational parameters align with expected linear objective: maximize sum(expected_improvement[Course_ID, Teacher_ID] * assignment[Course_ID, Teacher_ID])
- Business configuration includes: Maximum number of teachers that can be assigned to a course (used for Used to enforce course assignment constraints)
- Business logic formulas to express in natural language: Formula to calculate expected grade improvement (calculation method for Used to determine objective coefficients)
- Use natural language to precisely describe linear mathematical relationships
- NO mathematical formulas, equations, or symbolic notation
- Present data as current operational information
- Focus on precise operational decision-making that leads to linear formulations
- Resource limitations match expected linear constraints
- Avoid scenarios requiring variable products, divisions, or other nonlinear relationships
- Include specific operational parameters that map to expected coefficient sources
- Reference business configuration parameters where appropriate

FINAL OR ANALYSIS:
{
  "database_id": "course_teach",
  "iteration": 1,
  "business_context": "A university aims to optimize the assignment of teachers to courses to maximize the overall grade performance of students. Each teacher has a different impact on the grade performance based on their expertise and experience, and each teacher can only be assigned to one course at a time.",
  "optimization_problem_description": "The goal is to maximize the total expected grades of all courses by optimally assigning teachers to courses. Each teacher-course assignment has an associated expected grade improvement, and each teacher can only be assigned to one course at a time.",
  "optimization_formulation": {
    "objective": "maximize sum(expected_improvement[Course_ID, Teacher_ID] * assignment[Course_ID, Teacher_ID])",
    "decision_variables": "assignment[Course_ID, Teacher_ID] is a binary variable indicating if a teacher is assigned to a course",
    "constraints": [
      "sum(assignment[Course_ID, Teacher_ID] for all Teacher_ID) <= max_teachers_per_course for each Course_ID",
      "sum(assignment[Course_ID, Teacher_ID] for all Course_ID) <= 1 for each Teacher_ID"
    ]
  },
  "current_optimization_to_schema_mapping": {
    "objective_coefficients": {
      "expected_improvement[Course_ID, Teacher_ID]": {
        "currently_mapped_to": "grade_improvement.expected_improvement",
        "mapping_adequacy": "good",
        "description": "Expected grade improvement from teacher-course assignment"
      }
    },
    "constraint_bounds": {
      "max_teachers_per_course": {
        "currently_mapped_to": "business_configuration_logic.max_teachers_per_course",
        "mapping_adequacy": "good",
        "description": "Maximum number of teachers that can be assigned to a course"
      }
    },
    "decision_variables": {
      "assignment[Course_ID, Teacher_ID]": {
        "currently_mapped_to": "teacher_course_assignment.assignment",
        "mapping_adequacy": "good",
        "description": "Binary decision variable indicating if a teacher is assigned to a course",
        "variable_type": "binary"
      }
    }
  },
  "missing_optimization_requirements": [],
  "iteration_status": {
    "complete": true,
    "confidence": "high",
    "next_focus": "Ready for convergence"
  }
}

FINAL DATABASE SCHEMA:
```sql
-- Iteration 1 Database Schema
-- Objective: Schema changes include creating new tables for decision variables and constraint bounds, modifying existing tables to improve mapping adequacy, and updating business configuration logic for scalar parameters and formulas.

CREATE TABLE teacher_course_assignment (
  Course_ID INTEGER,
  Teacher_ID INTEGER,
  assignment BOOLEAN
);

CREATE TABLE grade_improvement (
  Course_ID INTEGER,
  Teacher_ID INTEGER,
  expected_improvement FLOAT
);


```

CURRENT STORED VALUES:
```sql
-- Iteration 1 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on typical university settings where teachers have varying impacts on student performance, and courses require specific expertise.

-- Realistic data for teacher_course_assignment
INSERT INTO teacher_course_assignment (Course_ID, Teacher_ID, assignment) VALUES (101, 201, True);
INSERT INTO teacher_course_assignment (Course_ID, Teacher_ID, assignment) VALUES (102, 202, True);
INSERT INTO teacher_course_assignment (Course_ID, Teacher_ID, assignment) VALUES (103, 203, True);

-- Realistic data for grade_improvement
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (101, 201, 0.8);
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (102, 202, 0.6);
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (103, 203, 0.7);
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (101, 202, 0.5);
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (102, 203, 0.4);


```

DATA DICTIONARY:
{
  "tables": {
    "teacher_course_assignment": {
      "business_purpose": "Tracks which teacher is assigned to which course",
      "optimization_role": "decision_variables",
      "columns": {
        "Course_ID": {
          "data_type": "INTEGER",
          "business_meaning": "Unique identifier for each course",
          "optimization_purpose": "Used to identify courses in decision variables",
          "sample_values": "101, 102, 103"
        },
        "Teacher_ID": {
          "data_type": "INTEGER",
          "business_meaning": "Unique identifier for each teacher",
          "optimization_purpose": "Used to identify teachers in decision variables",
          "sample_values": "201, 202, 203"
        },
        "assignment": {
          "data_type": "BOOLEAN",
          "business_meaning": "Indicates if a teacher is assigned to a course",
          "optimization_purpose": "Binary decision variable for optimization",
          "sample_values": "true, false"
        }
      }
    },
    "grade_improvement": {
      "business_purpose": "Stores expected grade improvement for teacher-course pairs",
      "optimization_role": "objective_coefficients",
      "columns": {
        "Course_ID": {
          "data_type": "INTEGER",
          "business_meaning": "Unique identifier for each course",
          "optimization_purpose": "Used to identify courses in objective coefficients",
          "sample_values": "101, 102, 103"
        },
        "Teacher_ID": {
          "data_type": "INTEGER",
          "business_meaning": "Unique identifier for each teacher",
          "optimization_purpose": "Used to identify teachers in objective coefficients",
          "sample_values": "201, 202, 203"
        },
        "expected_improvement": {
          "data_type": "FLOAT",
          "business_meaning": "Expected grade improvement from teacher-course assignment",
          "optimization_purpose": "Coefficient in the objective function",
          "sample_values": "0.5, 0.7, 0.9"
        }
      }
    }
  }
}


BUSINESS CONFIGURATION:

BUSINESS CONFIGURATION:
{
  "max_teachers_per_course": {
    "data_type": "INTEGER",
    "business_meaning": "Maximum number of teachers that can be assigned to a course",
    "optimization_role": "Used to enforce course assignment constraints",
    "configuration_type": "scalar_parameter",
    "value": 1,
    "business_justification": "Each course is designed to be taught by a single teacher to maintain consistency in teaching style and content delivery."
  },
  "grade_improvement_formula": {
    "data_type": "STRING",
    "business_meaning": "Formula to calculate expected grade improvement",
    "optimization_role": "Used to determine objective coefficients",
    "configuration_type": "business_logic_formula",
    "formula_expression": "experience_factor * expertise_factor"
  }
}

Business Configuration Design: 
Our system separates business logic design from value determination:
- Configuration Logic (business_configuration_logic.json): Templates designed by data engineers with sample_value for scalars and actual formulas for business logic
- Configuration Values (business_configuration.json): Realistic values determined by domain experts for scalar parameters only
- Design Rationale: Ensures business logic consistency while allowing flexible parameter tuning


TASK: Create structured markdown documentation for SECTIONS 1-3 ONLY (Problem Description).

EXACT MARKDOWN STRUCTURE TO FOLLOW:

# Complete Optimization Problem and Solution: course_teach

## 1. Problem Context and Goals

### Context  
[Regenerate business context that naturally aligns with LINEAR optimization formulation. Ensure:]
- Business decisions match expected decision variables: assignment[Course_ID, Teacher_ID] is a binary variable indicating if a teacher is assigned to a course
- Operational parameters align with expected linear objective: maximize sum(expected_improvement[Course_ID, Teacher_ID] * assignment[Course_ID, Teacher_ID])
- Business configuration includes: Maximum number of teachers that can be assigned to a course (used for Used to enforce course assignment constraints)
- Business logic formulas to express in natural language: Formula to calculate expected grade improvement (calculation method for Used to determine objective coefficients)
- Use natural language to precisely describe linear mathematical relationships
- NO mathematical formulas, equations, or symbolic notation
- Present data as current operational information
- Focus on precise operational decision-making that leads to linear formulations
- Resource limitations match expected linear constraints
- Avoid scenarios requiring variable products, divisions, or other nonlinear relationships
- Include specific operational parameters that map to expected coefficient sources
- Reference business configuration parameters where appropriate
- CRITICAL: Include ALL business configuration information (scalar parameters AND business logic formulas) in natural business language

### Goals  
[Regenerate goals that clearly lead to LINEAR mathematical objective:]
- Optimization goal: maximize
- Metric to optimize: maximize sum(expected_improvement[Course_ID, Teacher_ID] * assignment[Course_ID, Teacher_ID])
- Success measurement aligned with expected coefficient sources
- Use natural language to precisely describe linear optimization goal
- NO mathematical formulas, equations, or symbolic notation

## 2. Constraints    

[Regenerate constraints that directly match expected LINEAR mathematical constraints:]
- Expected constraint: ['sum(assignment[Course_ID, Teacher_ID] for all Teacher_ID) <= max_teachers_per_course for each Course_ID', 'sum(assignment[Course_ID, Teacher_ID] for all Course_ID) <= 1 for each Teacher_ID'] (Form: Standard constraint form based on business requirements)

[Each constraint should be described in business terms that naturally lead to LINEAR mathematical forms (no variable products or divisions)]

## 3. Available Data  

### Database Schema  
```sql
-- Iteration 1 Database Schema
-- Objective: Schema changes include creating new tables for decision variables and constraint bounds, modifying existing tables to improve mapping adequacy, and updating business configuration logic for scalar parameters and formulas.

CREATE TABLE teacher_course_assignment (
  Course_ID INTEGER,
  Teacher_ID INTEGER,
  assignment BOOLEAN
);

CREATE TABLE grade_improvement (
  Course_ID INTEGER,
  Teacher_ID INTEGER,
  expected_improvement FLOAT
);


```

### Data Dictionary  
[Create comprehensive business-oriented data dictionary mapping tables and columns to their business purposes and optimization roles - NOT technical database terms. Base this on the data_dictionary provided but rewrite in business language that clearly connects to the expected linear mathematical formulation]

### Current Stored Values  
```sql
-- Iteration 1 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on typical university settings where teachers have varying impacts on student performance, and courses require specific expertise.

-- Realistic data for teacher_course_assignment
INSERT INTO teacher_course_assignment (Course_ID, Teacher_ID, assignment) VALUES (101, 201, True);
INSERT INTO teacher_course_assignment (Course_ID, Teacher_ID, assignment) VALUES (102, 202, True);
INSERT INTO teacher_course_assignment (Course_ID, Teacher_ID, assignment) VALUES (103, 203, True);

-- Realistic data for grade_improvement
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (101, 201, 0.8);
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (102, 202, 0.6);
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (103, 203, 0.7);
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (101, 202, 0.5);
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (102, 203, 0.4);


```

STOP HERE - Do not include section 4 (Mathematical Optimization Formulation).

Response:
# Complete Optimization Problem and Solution: course_teach

## 1. Problem Context and Goals

### Context  
The university is focused on enhancing student performance by strategically assigning teachers to courses. Each teacher's assignment to a course is a critical decision, represented by a binary choice indicating whether a teacher is assigned to a specific course. The primary aim is to maximize the overall expected improvement in student grades across all courses. This improvement is calculated based on each teacher's unique expertise and experience, which contributes differently to student outcomes. The operational framework includes a constraint that limits the number of teachers assigned to each course to one, ensuring consistency in teaching style and content delivery. The expected grade improvement is determined by a formula that considers factors such as the teacher's experience and expertise. This setup ensures that the decision-making process is linear, focusing on optimizing the allocation of teaching resources to achieve the best possible educational outcomes.

### Goals  
The optimization goal is to maximize the total expected improvement in student grades by effectively assigning teachers to courses. The metric for optimization is the sum of the expected grade improvements for each teacher-course assignment. Success is measured by the extent to which the assignments enhance overall student performance, aligning with the expected contributions of each teacher as determined by their expertise and experience. The objective is clearly defined in linear terms, focusing on maximizing the cumulative impact of teacher assignments on student grades.

## 2. Constraints    

The assignment of teachers to courses is subject to specific constraints to ensure optimal resource allocation:

- Each course can have at most one teacher assigned to it. This constraint ensures that the teaching style and content delivery remain consistent, aligning with the university's educational standards.
- Each teacher can only be assigned to one course at a time. This constraint ensures that teachers can focus their efforts and expertise on a single course, maximizing their impact on student performance.

These constraints are designed to naturally lead to linear mathematical formulations, ensuring that the optimization process remains straightforward and effective.

## 3. Available Data  

### Database Schema  
```sql
-- Iteration 1 Database Schema
-- Objective: Schema changes include creating new tables for decision variables and constraint bounds, modifying existing tables to improve mapping adequacy, and updating business configuration logic for scalar parameters and formulas.

CREATE TABLE teacher_course_assignment (
  Course_ID INTEGER,
  Teacher_ID INTEGER,
  assignment BOOLEAN
);

CREATE TABLE grade_improvement (
  Course_ID INTEGER,
  Teacher_ID INTEGER,
  expected_improvement FLOAT
);
```

### Data Dictionary  
The data dictionary provides a comprehensive mapping of tables and columns to their business purposes and optimization roles:

- **Teacher Course Assignment Table**: This table tracks the assignment of teachers to courses. It includes:
  - **Course_ID**: A unique identifier for each course, used to identify courses in decision variables.
  - **Teacher_ID**: A unique identifier for each teacher, used to identify teachers in decision variables.
  - **Assignment**: A binary indicator showing whether a teacher is assigned to a course, serving as a decision variable in the optimization process.

- **Grade Improvement Table**: This table stores the expected grade improvement for each teacher-course pair. It includes:
  - **Course_ID**: A unique identifier for each course, used to identify courses in objective coefficients.
  - **Teacher_ID**: A unique identifier for each teacher, used to identify teachers in objective coefficients.
  - **Expected Improvement**: The anticipated grade improvement resulting from a teacher's assignment to a course, acting as a coefficient in the objective function.

### Current Stored Values  
```sql
-- Iteration 1 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on typical university settings where teachers have varying impacts on student performance, and courses require specific expertise.

-- Realistic data for teacher_course_assignment
INSERT INTO teacher_course_assignment (Course_ID, Teacher_ID, assignment) VALUES (101, 201, True);
INSERT INTO teacher_course_assignment (Course_ID, Teacher_ID, assignment) VALUES (102, 202, True);
INSERT INTO teacher_course_assignment (Course_ID, Teacher_ID, assignment) VALUES (103, 203, True);

-- Realistic data for grade_improvement
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (101, 201, 0.8);
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (102, 202, 0.6);
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (103, 203, 0.7);
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (101, 202, 0.5);
INSERT INTO grade_improvement (Course_ID, Teacher_ID, expected_improvement) VALUES (102, 203, 0.4);
```
