Iteration final - PROBLEM_DESCRIPTION
Sequence: 5
Timestamp: 2025-07-25 22:45:19

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: x_song: binary decision variable indicating whether a song is selected for the festival
- Operational parameters align with expected linear objective: maximize ∑(Weeks_on_Top × x_song)
- Business configuration includes: Maximum number of songs the festival can include (used for Constraint bound for total song capacity), Maximum number of songs per artist allowed in the festival (used for Constraint bound for maximum songs per artist), Minimum number of artists to be represented in the festival (used for Constraint bound for minimum number of artists)
- 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": "music_4",
  "iteration": 1,
  "business_context": "A music festival organizer aims to maximize the total number of weeks that songs featured in the festival have spent on top charts, while ensuring diversity among artists and adhering to budget constraints on the number of songs per artist.",
  "optimization_problem_description": "The objective is to maximize the total weeks on top charts for songs selected for the festival. Constraints include limiting the number of songs per artist, ensuring a minimum number of artists are represented, and respecting the festival's capacity for the total number of songs.",
  "optimization_formulation": {
    "objective": "maximize \u2211(Weeks_on_Top \u00d7 x_song)",
    "decision_variables": "x_song: binary decision variable indicating whether a song is selected for the festival",
    "constraints": [
      "\u2211(x_song) \u2264 Total_Song_Capacity",
      "\u2211(x_song per artist) \u2264 Max_Songs_Per_Artist",
      "\u2211(unique artists represented by selected songs) \u2265 Min_Artists"
    ]
  },
  "current_optimization_to_schema_mapping": {
    "objective_coefficients": {
      "Weeks_on_Top[song]": {
        "currently_mapped_to": "volume.Weeks_on_Top",
        "mapping_adequacy": "good",
        "description": "Number of weeks the song has been on top charts"
      }
    },
    "constraint_bounds": {
      "Total_Song_Capacity": {
        "currently_mapped_to": "business_configuration_logic.Total_Song_Capacity",
        "mapping_adequacy": "good",
        "description": "Maximum number of songs the festival can include"
      },
      "Max_Songs_Per_Artist": {
        "currently_mapped_to": "business_configuration_logic.Max_Songs_Per_Artist",
        "mapping_adequacy": "good",
        "description": "Maximum number of songs per artist allowed in the festival"
      },
      "Min_Artists": {
        "currently_mapped_to": "business_configuration_logic.Min_Artists",
        "mapping_adequacy": "good",
        "description": "Minimum number of artists to be represented in the festival"
      }
    },
    "decision_variables": {
      "x_song[song]": {
        "currently_mapped_to": "song_selection.x_song",
        "mapping_adequacy": "good",
        "description": "Binary decision variable indicating whether a song is selected for the festival",
        "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, and updating business configuration logic for scalar parameters and formulas.

CREATE TABLE song_selection (
  x_song BOOLEAN
);

CREATE TABLE volume (
  Weeks_on_Top INTEGER
);


```

CURRENT STORED VALUES:
```sql
-- Iteration 1 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on realistic music festival scenarios, ensuring diversity in artists and adherence to budget constraints while maximizing chart performance.

-- Realistic data for song_selection
INSERT INTO song_selection (x_song) VALUES (0);
INSERT INTO song_selection (x_song) VALUES (1);
INSERT INTO song_selection (x_song) VALUES (1);

-- Realistic data for volume
INSERT INTO volume (Weeks_on_Top) VALUES (5);
INSERT INTO volume (Weeks_on_Top) VALUES (10);
INSERT INTO volume (Weeks_on_Top) VALUES (15);
INSERT INTO volume (Weeks_on_Top) VALUES (3);
INSERT INTO volume (Weeks_on_Top) VALUES (8);


```

DATA DICTIONARY:
{
  "tables": {
    "song_selection": {
      "business_purpose": "Binary decision variable indicating whether a song is selected for the festival",
      "optimization_role": "decision_variables",
      "columns": {
        "x_song": {
          "data_type": "BOOLEAN",
          "business_meaning": "Binary decision variable indicating whether a song is selected for the festival",
          "optimization_purpose": "Decision variable in optimization formulation",
          "sample_values": [
            0,
            1
          ]
        }
      }
    },
    "volume": {
      "business_purpose": "Number of weeks the song has been on top charts",
      "optimization_role": "objective_coefficients",
      "columns": {
        "Weeks_on_Top": {
          "data_type": "INTEGER",
          "business_meaning": "Number of weeks the song has been on top charts",
          "optimization_purpose": "Coefficient in objective function",
          "sample_values": [
            5,
            10,
            15
          ]
        }
      }
    }
  }
}


BUSINESS CONFIGURATION:

BUSINESS CONFIGURATION:
{
  "Total_Song_Capacity": {
    "data_type": "INTEGER",
    "business_meaning": "Maximum number of songs the festival can include",
    "optimization_role": "Constraint bound for total song capacity",
    "configuration_type": "scalar_parameter",
    "value": 50,
    "business_justification": "A realistic capacity for a music festival, balancing variety and manageability."
  },
  "Max_Songs_Per_Artist": {
    "data_type": "INTEGER",
    "business_meaning": "Maximum number of songs per artist allowed in the festival",
    "optimization_role": "Constraint bound for maximum songs per artist",
    "configuration_type": "scalar_parameter",
    "value": 3,
    "business_justification": "Ensures no single artist dominates the festival, promoting diversity."
  },
  "Min_Artists": {
    "data_type": "INTEGER",
    "business_meaning": "Minimum number of artists to be represented in the festival",
    "optimization_role": "Constraint bound for minimum number of artists",
    "configuration_type": "scalar_parameter",
    "value": 10,
    "business_justification": "Guarantees a broad representation of artists, enhancing the festival's appeal."
  }
}

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

## 1. Problem Context and Goals

### Context  
[Regenerate business context that naturally aligns with LINEAR optimization formulation. Ensure:]
- Business decisions match expected decision variables: x_song: binary decision variable indicating whether a song is selected for the festival
- Operational parameters align with expected linear objective: maximize ∑(Weeks_on_Top × x_song)
- Business configuration includes: Maximum number of songs the festival can include (used for Constraint bound for total song capacity), Maximum number of songs per artist allowed in the festival (used for Constraint bound for maximum songs per artist), Minimum number of artists to be represented in the festival (used for Constraint bound for minimum number of artists)
- 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 ∑(Weeks_on_Top × x_song)
- 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: ['∑(x_song) ≤ Total_Song_Capacity', '∑(x_song per artist) ≤ Max_Songs_Per_Artist', '∑(unique artists represented by selected songs) ≥ Min_Artists'] (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, and updating business configuration logic for scalar parameters and formulas.

CREATE TABLE song_selection (
  x_song BOOLEAN
);

CREATE TABLE volume (
  Weeks_on_Top 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 1 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on realistic music festival scenarios, ensuring diversity in artists and adherence to budget constraints while maximizing chart performance.

-- Realistic data for song_selection
INSERT INTO song_selection (x_song) VALUES (0);
INSERT INTO song_selection (x_song) VALUES (1);
INSERT INTO song_selection (x_song) VALUES (1);

-- Realistic data for volume
INSERT INTO volume (Weeks_on_Top) VALUES (5);
INSERT INTO volume (Weeks_on_Top) VALUES (10);
INSERT INTO volume (Weeks_on_Top) VALUES (15);
INSERT INTO volume (Weeks_on_Top) VALUES (3);
INSERT INTO volume (Weeks_on_Top) VALUES (8);


```

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

Response:
# Complete Optimization Problem and Solution: music_4

## 1. Problem Context and Goals

### Context  
A music festival organizer is tasked with curating a lineup of songs that maximizes the total number of weeks these songs have spent on top charts. The organizer must make binary decisions for each song, determining whether it is included in the festival lineup. The primary operational parameter driving this decision is the number of weeks each song has been on top charts, which directly contributes to the festival's overall success metric.  

To ensure a balanced and diverse festival, the organizer must adhere to several business configuration parameters:  
- The festival can include a maximum of 50 songs, ensuring the lineup remains manageable and focused.  
- No single artist can have more than 3 songs in the festival, promoting diversity and preventing overrepresentation of any one artist.  
- The festival must feature at least 10 unique artists, guaranteeing a broad representation of musical talent.  

These constraints are designed to align with realistic operational limitations while maintaining the festival's appeal and manageability. The decision-making process is linear, focusing solely on selecting songs based on their chart performance and ensuring compliance with the established constraints.  

### Goals  
The primary goal of this optimization problem is to maximize the total number of weeks that the selected songs have spent on top charts. This is achieved by summing the weeks on top for each song included in the festival lineup. Success is measured by the cumulative chart performance of the selected songs, ensuring the festival features the most impactful and popular tracks.  

The optimization process is designed to be straightforward and linear, avoiding complex relationships such as variable products or divisions. The focus is on making clear, binary decisions for each song while adhering to the festival's operational constraints.  

## 2. Constraints  

The optimization problem is subject to the following constraints, which ensure the festival lineup is both high-performing and diverse:  
1. **Total Song Capacity**: The total number of songs selected for the festival cannot exceed 50. This ensures the lineup remains manageable and aligns with the festival's capacity.  
2. **Maximum Songs Per Artist**: No single artist can have more than 3 songs included in the festival. This promotes diversity and prevents any one artist from dominating the lineup.  
3. **Minimum Number of Artists**: The festival must feature at least 10 unique artists. This guarantees a broad representation of musical talent and enhances the festival's appeal.  

These constraints are designed to be linear and straightforward, ensuring the optimization problem remains computationally efficient and aligned with the festival's operational goals.  

## 3. Available Data  

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

CREATE TABLE song_selection (
  x_song BOOLEAN
);

CREATE TABLE volume (
  Weeks_on_Top INTEGER
);
```

### Data Dictionary  
- **song_selection**:  
  - **Business Purpose**: This table contains binary decision variables indicating whether a song is selected for the festival.  
  - **Optimization Role**: Decision variables in the optimization formulation.  
  - **Columns**:  
    - **x_song**: A binary variable (0 or 1) representing whether a song is included in the festival lineup.  

- **volume**:  
  - **Business Purpose**: This table tracks the number of weeks each song has spent on top charts.  
  - **Optimization Role**: Provides coefficients for the objective function.  
  - **Columns**:  
    - **Weeks_on_Top**: The number of weeks a song has been on top charts, used to measure its impact and popularity.  

### Current Stored Values  
```sql
-- Iteration 1 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on realistic music festival scenarios, ensuring diversity in artists and adherence to budget constraints while maximizing chart performance.

-- Realistic data for song_selection
INSERT INTO song_selection (x_song) VALUES (0);
INSERT INTO song_selection (x_song) VALUES (1);
INSERT INTO song_selection (x_song) VALUES (1);

-- Realistic data for volume
INSERT INTO volume (Weeks_on_Top) VALUES (5);
INSERT INTO volume (Weeks_on_Top) VALUES (10);
INSERT INTO volume (Weeks_on_Top) VALUES (15);
INSERT INTO volume (Weeks_on_Top) VALUES (3);
INSERT INTO volume (Weeks_on_Top) VALUES (8);
```
