Iteration final - PROBLEM_DESCRIPTION
Sequence: 7
Timestamp: 2025-07-25 22:47:17

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 2), 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[Debate_ID, People_ID, Side] (binary: 1 if participant is assigned to debate on a specific side, 0 otherwise)
- Operational parameters align with expected linear objective: maximize ∑(Num_of_Audience[Debate_ID] × Assignment[Debate_ID, People_ID, Side])
- Business configuration includes: Number of audience members for each debate. (used for Used to weight the audience engagement in the objective function.), Limit on the number of debates a participant can join. (used for Used in the constraint to limit debate participation.)
- 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": "debate",
  "iteration": 2,
  "business_context": "A debate organization aims to maximize total audience engagement by strategically assigning participants from various districts and parties to debates, ensuring diversity and fairness in representation while adhering to constraints on participant age and debate side balance.",
  "optimization_problem_description": "Maximize total audience engagement by assigning participants to debates, ensuring diversity in district and party representation, and balancing affirmative and negative sides, while respecting age-based constraints on the number of debates each participant can join.",
  "optimization_formulation": {
    "objective": "maximize \u2211(Num_of_Audience[Debate_ID] \u00d7 Assignment[Debate_ID, People_ID, Side])",
    "decision_variables": "Assignment[Debate_ID, People_ID, Side] (binary: 1 if participant is assigned to debate on a specific side, 0 otherwise)",
    "constraints": [
      "\u2211(Assignment[Debate_ID, People_ID, Side]) \u2264 1 for each People_ID (limit on number of debates per participant)",
      "\u2211(Assignment[Debate_ID, People_ID, 'Affirmative']) = \u2211(Assignment[Debate_ID, People_ID, 'Negative']) for each Debate_ID (balance between sides)",
      "\u2211(Assignment[Debate_ID, People_ID, Side]) \u2265 1 for each Debate_ID (ensure at least one participant per debate)",
      "\u2211(Assignment[Debate_ID, People_ID, Side]) \u2264 Age[People_ID] / 25 for each People_ID (age-based constraint)"
    ]
  },
  "current_optimization_to_schema_mapping": {
    "objective_coefficients": {
      "Num_of_Audience[Debate_ID]": {
        "currently_mapped_to": "audience_size.Num_of_Audience",
        "mapping_adequacy": "good",
        "description": "Number of audience members for each debate, used to weight the audience engagement in the objective function."
      }
    },
    "constraint_bounds": {
      "constraint_bound_1[People_ID]": {
        "currently_mapped_to": "business_configuration_logic.constraint_bound_1",
        "mapping_adequacy": "good",
        "description": "Limit on the number of debates a participant can join."
      }
    },
    "decision_variables": {
      "Assignment[Debate_ID, People_ID, Side]": {
        "currently_mapped_to": "participant_assignment",
        "mapping_adequacy": "good",
        "description": "Binary decision variable indicating whether a participant is assigned to a specific debate on a specific side.",
        "variable_type": "binary"
      }
    }
  },
  "missing_optimization_requirements": [],
  "iteration_status": {
    "complete": true,
    "confidence": "high",
    "next_focus": "Ready for convergence"
  }
}

FINAL DATABASE SCHEMA:
```sql
-- Iteration 2 Database Schema
-- Objective: Schema changes include creating a new table for audience size, updating business configuration logic to include missing scalar parameters, and ensuring all optimization requirements are mapped correctly.

CREATE TABLE participant_assignment (
  Debate_ID INTEGER,
  People_ID INTEGER,
  Side STRING
);

CREATE TABLE people (
  People_ID INTEGER,
  District STRING,
  Party STRING,
  Age INTEGER
);

CREATE TABLE audience_size (
  Debate_ID INTEGER,
  Num_of_Audience INTEGER
);


```

CURRENT STORED VALUES:
```sql
-- Iteration 2 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on realistic scenarios for a debate organization, considering audience sizes, participant demographics, and debate constraints.

-- Realistic data for participant_assignment
INSERT INTO participant_assignment (Debate_ID, People_ID, Side) VALUES (1, 101, 'Affirmative');
INSERT INTO participant_assignment (Debate_ID, People_ID, Side) VALUES (1, 102, 'Negative');
INSERT INTO participant_assignment (Debate_ID, People_ID, Side) VALUES (2, 103, 'Affirmative');

-- Realistic data for people
INSERT INTO people (People_ID, District, Party, Age) VALUES (101, 'District A', 'Party X', 25);
INSERT INTO people (People_ID, District, Party, Age) VALUES (102, 'District B', 'Party Y', 30);
INSERT INTO people (People_ID, District, Party, Age) VALUES (103, 'District C', 'Party Z', 35);

-- Realistic data for audience_size
INSERT INTO audience_size (Debate_ID, Num_of_Audience) VALUES (1, 150);
INSERT INTO audience_size (Debate_ID, Num_of_Audience) VALUES (2, 200);
INSERT INTO audience_size (Debate_ID, Num_of_Audience) VALUES (3, 100);


```

DATA DICTIONARY:
{
  "tables": {
    "participant_assignment": {
      "business_purpose": "Represents the assignment of participants to debates on specific sides.",
      "optimization_role": "decision_variables",
      "columns": {
        "Debate_ID": {
          "data_type": "INTEGER",
          "business_meaning": "Identifier for the debate.",
          "optimization_purpose": "Used to link participants to specific debates.",
          "sample_values": "1, 2, 3"
        },
        "People_ID": {
          "data_type": "INTEGER",
          "business_meaning": "Identifier for the participant.",
          "optimization_purpose": "Used to link participants to specific debates.",
          "sample_values": "101, 102, 103"
        },
        "Side": {
          "data_type": "STRING",
          "business_meaning": "The side (Affirmative/Negative) the participant is assigned to.",
          "optimization_purpose": "Used to ensure balance between sides in debates.",
          "sample_values": "Affirmative, Negative"
        }
      }
    },
    "people": {
      "business_purpose": "Represents the participants in the debates.",
      "optimization_role": "business_data",
      "columns": {
        "People_ID": {
          "data_type": "INTEGER",
          "business_meaning": "Identifier for the participant.",
          "optimization_purpose": "Used to link participants to specific debates.",
          "sample_values": "101, 102, 103"
        },
        "District": {
          "data_type": "STRING",
          "business_meaning": "The district the participant represents.",
          "optimization_purpose": "Used to ensure diversity in district representation.",
          "sample_values": "District A, District B, District C"
        },
        "Party": {
          "data_type": "STRING",
          "business_meaning": "The party the participant represents.",
          "optimization_purpose": "Used to ensure diversity in party representation.",
          "sample_values": "Party X, Party Y, Party Z"
        },
        "Age": {
          "data_type": "INTEGER",
          "business_meaning": "The age of the participant.",
          "optimization_purpose": "Used to limit the number of debates a participant can join.",
          "sample_values": "25, 30, 35"
        }
      }
    },
    "audience_size": {
      "business_purpose": "Represents the number of audience members for each debate.",
      "optimization_role": "objective_coefficients",
      "columns": {
        "Debate_ID": {
          "data_type": "INTEGER",
          "business_meaning": "Identifier for the debate.",
          "optimization_purpose": "Used to link audience size to specific debates.",
          "sample_values": "1, 2, 3"
        },
        "Num_of_Audience": {
          "data_type": "INTEGER",
          "business_meaning": "Number of audience members for the debate.",
          "optimization_purpose": "Used to weight the audience engagement in the objective function.",
          "sample_values": "100, 150, 200"
        }
      }
    }
  }
}


BUSINESS CONFIGURATION:

BUSINESS CONFIGURATION:
{
  "num_of_audience": {
    "data_type": "INTEGER",
    "business_meaning": "Number of audience members for each debate.",
    "optimization_role": "Used to weight the audience engagement in the objective function.",
    "configuration_type": "scalar_parameter",
    "value": 150,
    "business_justification": "This value represents a typical audience size for a debate, ensuring the objective function is weighted appropriately."
  },
  "constraint_bound_1": {
    "data_type": "INTEGER",
    "business_meaning": "Limit on the number of debates a participant can join.",
    "optimization_role": "Used in the constraint to limit debate participation.",
    "configuration_type": "scalar_parameter",
    "value": 1,
    "business_justification": "This value ensures that each participant is limited to one debate, maintaining fairness and balance."
  }
}

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: debate

## 1. Problem Context and Goals

### Context  
[Regenerate business context that naturally aligns with LINEAR optimization formulation. Ensure:]
- Business decisions match expected decision variables: Assignment[Debate_ID, People_ID, Side] (binary: 1 if participant is assigned to debate on a specific side, 0 otherwise)
- Operational parameters align with expected linear objective: maximize ∑(Num_of_Audience[Debate_ID] × Assignment[Debate_ID, People_ID, Side])
- Business configuration includes: Number of audience members for each debate. (used for Used to weight the audience engagement in the objective function.), Limit on the number of debates a participant can join. (used for Used in the constraint to limit debate participation.)
- 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 ∑(Num_of_Audience[Debate_ID] × Assignment[Debate_ID, People_ID, Side])
- 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: ['∑(Assignment[Debate_ID, People_ID, Side]) ≤ 1 for each People_ID (limit on number of debates per participant)', "∑(Assignment[Debate_ID, People_ID, 'Affirmative']) = ∑(Assignment[Debate_ID, People_ID, 'Negative']) for each Debate_ID (balance between sides)", '∑(Assignment[Debate_ID, People_ID, Side]) ≥ 1 for each Debate_ID (ensure at least one participant per debate)', '∑(Assignment[Debate_ID, People_ID, Side]) ≤ Age[People_ID] / 25 for each People_ID (age-based constraint)'] (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 2 Database Schema
-- Objective: Schema changes include creating a new table for audience size, updating business configuration logic to include missing scalar parameters, and ensuring all optimization requirements are mapped correctly.

CREATE TABLE participant_assignment (
  Debate_ID INTEGER,
  People_ID INTEGER,
  Side STRING
);

CREATE TABLE people (
  People_ID INTEGER,
  District STRING,
  Party STRING,
  Age INTEGER
);

CREATE TABLE audience_size (
  Debate_ID INTEGER,
  Num_of_Audience INTEGER
);


```

### 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 2 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on realistic scenarios for a debate organization, considering audience sizes, participant demographics, and debate constraints.

-- Realistic data for participant_assignment
INSERT INTO participant_assignment (Debate_ID, People_ID, Side) VALUES (1, 101, 'Affirmative');
INSERT INTO participant_assignment (Debate_ID, People_ID, Side) VALUES (1, 102, 'Negative');
INSERT INTO participant_assignment (Debate_ID, People_ID, Side) VALUES (2, 103, 'Affirmative');

-- Realistic data for people
INSERT INTO people (People_ID, District, Party, Age) VALUES (101, 'District A', 'Party X', 25);
INSERT INTO people (People_ID, District, Party, Age) VALUES (102, 'District B', 'Party Y', 30);
INSERT INTO people (People_ID, District, Party, Age) VALUES (103, 'District C', 'Party Z', 35);

-- Realistic data for audience_size
INSERT INTO audience_size (Debate_ID, Num_of_Audience) VALUES (1, 150);
INSERT INTO audience_size (Debate_ID, Num_of_Audience) VALUES (2, 200);
INSERT INTO audience_size (Debate_ID, Num_of_Audience) VALUES (3, 100);


```

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

Response:
# Complete Optimization Problem and Solution: debate

## 1. Problem Context and Goals

### Context  
A debate organization is focused on maximizing audience engagement by strategically assigning participants to debates. Participants come from various districts and political parties, and the organization aims to ensure diversity and fairness in representation. The key operational decision involves assigning participants to specific debates and sides (Affirmative or Negative) while adhering to constraints such as limiting the number of debates each participant can join and ensuring a balance between sides in each debate.  

The organization uses the number of audience members for each debate as a weighting factor to prioritize debates with higher engagement. Additionally, participant age is considered to limit the number of debates they can participate in, ensuring fairness and preventing overcommitment. The business configuration includes scalar parameters such as the typical audience size for debates and a limit on the number of debates a participant can join. These parameters are critical for weighting the objective function and enforcing constraints.  

### Goals  
The primary goal is to maximize total audience engagement across all debates. This is achieved by assigning participants to debates in a way that prioritizes debates with larger audiences. Success is measured by the weighted sum of audience sizes for the debates to which participants are assigned. The optimization process ensures that the assignments respect constraints on participant availability, side balance, and age-based limitations.  

## 2. Constraints  

The optimization problem must adhere to the following constraints:  
1. **Participant Limit**: Each participant can be assigned to no more than one debate. This ensures fairness and prevents overcommitment.  
2. **Side Balance**: For each debate, the number of participants assigned to the Affirmative side must equal the number assigned to the Negative side. This ensures fairness and balance in the debate structure.  
3. **Minimum Participation**: Each debate must have at least one participant assigned to it. This ensures that all debates are conducted.  
4. **Age-Based Constraint**: The number of debates a participant can join is limited by their age, specifically by dividing their age by 25. This ensures that younger participants are not overburdened.  

These constraints are designed to maintain fairness, balance, and operational feasibility while aligning with the linear structure of the optimization problem.  

## 3. Available Data  

### Database Schema  
```sql
-- Iteration 2 Database Schema
-- Objective: Schema changes include creating a new table for audience size, updating business configuration logic to include missing scalar parameters, and ensuring all optimization requirements are mapped correctly.

CREATE TABLE participant_assignment (
  Debate_ID INTEGER,
  People_ID INTEGER,
  Side STRING
);

CREATE TABLE people (
  People_ID INTEGER,
  District STRING,
  Party STRING,
  Age INTEGER
);

CREATE TABLE audience_size (
  Debate_ID INTEGER,
  Num_of_Audience INTEGER
);
```

### Data Dictionary  
- **participant_assignment**: Represents the assignment of participants to debates on specific sides.  
  - *Debate_ID*: Identifier for the debate.  
  - *People_ID*: Identifier for the participant.  
  - *Side*: The side (Affirmative/Negative) the participant is assigned to.  
- **people**: Represents the participants in the debates.  
  - *People_ID*: Identifier for the participant.  
  - *District*: The district the participant represents.  
  - *Party*: The party the participant represents.  
  - *Age*: The age of the participant.  
- **audience_size**: Represents the number of audience members for each debate.  
  - *Debate_ID*: Identifier for the debate.  
  - *Num_of_Audience*: Number of audience members for the debate.  

### Current Stored Values  
```sql
-- Iteration 2 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on realistic scenarios for a debate organization, considering audience sizes, participant demographics, and debate constraints.

-- Realistic data for participant_assignment
INSERT INTO participant_assignment (Debate_ID, People_ID, Side) VALUES (1, 101, 'Affirmative');
INSERT INTO participant_assignment (Debate_ID, People_ID, Side) VALUES (1, 102, 'Negative');
INSERT INTO participant_assignment (Debate_ID, People_ID, Side) VALUES (2, 103, 'Affirmative');

-- Realistic data for people
INSERT INTO people (People_ID, District, Party, Age) VALUES (101, 'District A', 'Party X', 25);
INSERT INTO people (People_ID, District, Party, Age) VALUES (102, 'District B', 'Party Y', 30);
INSERT INTO people (People_ID, District, Party, Age) VALUES (103, 'District C', 'Party Z', 35);

-- Realistic data for audience_size
INSERT INTO audience_size (Debate_ID, Num_of_Audience) VALUES (1, 150);
INSERT INTO audience_size (Debate_ID, Num_of_Audience) VALUES (2, 200);
INSERT INTO audience_size (Debate_ID, Num_of_Audience) VALUES (3, 100);
```
