Iteration final - PROBLEM_DESCRIPTION
Sequence: 5
Timestamp: 2025-07-27 23:56:48

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: Performances[show_id] for each show_id, integer
- Operational parameters align with expected linear objective: maximize total_attendance = ∑(Attendance[show_id] * Performances[show_id])
- Business configuration includes: total availability of conductors (used for constraint bound for conductor availability)
- 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": "orchestra",
  "iteration": 1,
  "business_context": "An orchestra company aims to maximize the total attendance of their shows while considering constraints related to the number of performances, venue capacities, and conductor availability.",
  "optimization_problem_description": "The goal is to maximize the total attendance across all shows by selecting the optimal number of performances for each show, considering constraints such as the maximum number of performances an orchestra can handle, the maximum capacity of venues, and the total availability of conductors.",
  "optimization_formulation": {
    "objective": "maximize total_attendance = \u2211(Attendance[show_id] * Performances[show_id])",
    "decision_variables": "Performances[show_id] for each show_id, integer",
    "constraints": [
      "\u2211(Performances[show_id]) <= total_conductor_availability",
      "Performances[show_id] <= MaxPerformances[orchestra_id] for each orchestra_id",
      "Attendance[show_id] * Performances[show_id] <= Capacity[show_id] for each show_id"
    ]
  },
  "current_optimization_to_schema_mapping": {
    "objective_coefficients": {
      "Attendance[show_id]": {
        "currently_mapped_to": "Show.Attendance",
        "mapping_adequacy": "good",
        "description": "Expected attendance for each show"
      }
    },
    "constraint_bounds": {
      "total_conductor_availability": {
        "currently_mapped_to": "business_configuration_logic.total_conductor_availability",
        "mapping_adequacy": "good",
        "description": "Total availability of conductors"
      },
      "MaxPerformances[orchestra_id]": {
        "currently_mapped_to": "OrchestraPerformanceLimits.MaxPerformances",
        "mapping_adequacy": "good",
        "description": "Maximum performances allowed for each orchestra"
      },
      "Capacity[show_id]": {
        "currently_mapped_to": "VenueCapacity.Capacity",
        "mapping_adequacy": "good",
        "description": "Maximum capacity of the venue for each show"
      }
    },
    "decision_variables": {
      "Performances[show_id]": {
        "currently_mapped_to": "Show.Performances",
        "mapping_adequacy": "good",
        "description": "Number of performances for each show",
        "variable_type": "integer"
      }
    }
  },
  "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 missing optimization data, modifying existing tables to fill mapping gaps, and updating business configuration logic for scalar parameters and formulas.

CREATE TABLE OrchestraPerformanceLimits (
  Orchestra_ID INTEGER,
  MaxPerformances INTEGER
);

CREATE TABLE VenueCapacity (
  Show_ID INTEGER,
  Capacity INTEGER
);

CREATE TABLE Show (
  Show_ID INTEGER,
  Attendance INTEGER,
  Performances INTEGER
);


```

CURRENT STORED VALUES:
```sql
-- Iteration 1 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on typical orchestra performance schedules, venue capacities, and conductor availability to ensure a realistic and solvable optimization problem.

-- Realistic data for OrchestraPerformanceLimits
INSERT INTO OrchestraPerformanceLimits (Orchestra_ID, MaxPerformances) VALUES (1, 5);
INSERT INTO OrchestraPerformanceLimits (Orchestra_ID, MaxPerformances) VALUES (2, 10);
INSERT INTO OrchestraPerformanceLimits (Orchestra_ID, MaxPerformances) VALUES (3, 15);

-- Realistic data for VenueCapacity
INSERT INTO VenueCapacity (Show_ID, Capacity) VALUES (101, 200);
INSERT INTO VenueCapacity (Show_ID, Capacity) VALUES (102, 300);
INSERT INTO VenueCapacity (Show_ID, Capacity) VALUES (103, 400);

-- Realistic data for Show
INSERT INTO Show (Show_ID, Attendance, Performances) VALUES (101, 150, 1);
INSERT INTO Show (Show_ID, Attendance, Performances) VALUES (102, 250, 2);
INSERT INTO Show (Show_ID, Attendance, Performances) VALUES (103, 350, 3);


```

DATA DICTIONARY:
{
  "tables": {
    "OrchestraPerformanceLimits": {
      "business_purpose": "Defines the maximum performances each orchestra can handle",
      "optimization_role": "constraint_bounds",
      "columns": {
        "Orchestra_ID": {
          "data_type": "INTEGER",
          "business_meaning": "Unique identifier for each orchestra",
          "optimization_purpose": "Index for constraint bounds",
          "sample_values": "1, 2, 3"
        },
        "MaxPerformances": {
          "data_type": "INTEGER",
          "business_meaning": "Maximum performances allowed for the orchestra",
          "optimization_purpose": "Constraint bound for performances",
          "sample_values": "5, 10, 15"
        }
      }
    },
    "VenueCapacity": {
      "business_purpose": "Defines the capacity of each venue for shows",
      "optimization_role": "constraint_bounds",
      "columns": {
        "Show_ID": {
          "data_type": "INTEGER",
          "business_meaning": "Unique identifier for each show",
          "optimization_purpose": "Index for constraint bounds",
          "sample_values": "101, 102, 103"
        },
        "Capacity": {
          "data_type": "INTEGER",
          "business_meaning": "Maximum capacity of the venue",
          "optimization_purpose": "Constraint bound for attendance",
          "sample_values": "200, 300, 400"
        }
      }
    },
    "Show": {
      "business_purpose": "Stores information about each show",
      "optimization_role": "decision_variables",
      "columns": {
        "Show_ID": {
          "data_type": "INTEGER",
          "business_meaning": "Unique identifier for each show",
          "optimization_purpose": "Index for decision variables",
          "sample_values": "101, 102, 103"
        },
        "Attendance": {
          "data_type": "INTEGER",
          "business_meaning": "Expected attendance for the show",
          "optimization_purpose": "Objective coefficient",
          "sample_values": "150, 250, 350"
        },
        "Performances": {
          "data_type": "INTEGER",
          "business_meaning": "Number of performances for the show",
          "optimization_purpose": "Decision variable",
          "sample_values": "1, 2, 3"
        }
      }
    }
  }
}


BUSINESS CONFIGURATION:

BUSINESS CONFIGURATION:
{
  "total_conductor_availability": {
    "data_type": "INTEGER",
    "business_meaning": "total availability of conductors",
    "optimization_role": "constraint bound for conductor availability",
    "configuration_type": "scalar_parameter",
    "value": 25,
    "business_justification": "This value reflects the realistic availability of conductors, considering their schedules and other commitments."
  }
}

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

## 1. Problem Context and Goals

### Context  
[Regenerate business context that naturally aligns with LINEAR optimization formulation. Ensure:]
- Business decisions match expected decision variables: Performances[show_id] for each show_id, integer
- Operational parameters align with expected linear objective: maximize total_attendance = ∑(Attendance[show_id] * Performances[show_id])
- Business configuration includes: total availability of conductors (used for constraint bound for conductor availability)
- 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 total_attendance = ∑(Attendance[show_id] * Performances[show_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: ['∑(Performances[show_id]) <= total_conductor_availability', 'Performances[show_id] <= MaxPerformances[orchestra_id] for each orchestra_id', 'Attendance[show_id] * Performances[show_id] <= Capacity[show_id] for each show_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 missing optimization data, modifying existing tables to fill mapping gaps, and updating business configuration logic for scalar parameters and formulas.

CREATE TABLE OrchestraPerformanceLimits (
  Orchestra_ID INTEGER,
  MaxPerformances INTEGER
);

CREATE TABLE VenueCapacity (
  Show_ID INTEGER,
  Capacity INTEGER
);

CREATE TABLE Show (
  Show_ID INTEGER,
  Attendance INTEGER,
  Performances 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 typical orchestra performance schedules, venue capacities, and conductor availability to ensure a realistic and solvable optimization problem.

-- Realistic data for OrchestraPerformanceLimits
INSERT INTO OrchestraPerformanceLimits (Orchestra_ID, MaxPerformances) VALUES (1, 5);
INSERT INTO OrchestraPerformanceLimits (Orchestra_ID, MaxPerformances) VALUES (2, 10);
INSERT INTO OrchestraPerformanceLimits (Orchestra_ID, MaxPerformances) VALUES (3, 15);

-- Realistic data for VenueCapacity
INSERT INTO VenueCapacity (Show_ID, Capacity) VALUES (101, 200);
INSERT INTO VenueCapacity (Show_ID, Capacity) VALUES (102, 300);
INSERT INTO VenueCapacity (Show_ID, Capacity) VALUES (103, 400);

-- Realistic data for Show
INSERT INTO Show (Show_ID, Attendance, Performances) VALUES (101, 150, 1);
INSERT INTO Show (Show_ID, Attendance, Performances) VALUES (102, 250, 2);
INSERT INTO Show (Show_ID, Attendance, Performances) VALUES (103, 350, 3);


```

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

Response:
# Complete Optimization Problem and Solution: orchestra

## 1. Problem Context and Goals

### Context  
The orchestra company is focused on maximizing the total attendance at their shows. This involves making strategic decisions about the number of performances for each show, which are represented by the decision variables: Performances[show_id] for each show_id. The primary objective is to maximize the total attendance, calculated as the sum of the expected attendance for each show multiplied by the number of performances for that show. This linear relationship ensures that the optimization problem remains straightforward and solvable.

The company must operate within certain constraints, including the total availability of conductors, which serves as a limit on the total number of performances across all shows. Additionally, each orchestra has a maximum number of performances it can handle, and each venue has a capacity limit that cannot be exceeded by the product of attendance and performances. These constraints are critical to maintaining operational feasibility and ensuring that the optimization remains linear.

The business configuration includes scalar parameters such as the total availability of conductors, which is a key constraint bound. This parameter reflects the realistic availability of conductors, considering their schedules and other commitments. The configuration logic is designed to separate business logic from value determination, allowing for flexible parameter tuning while maintaining consistency.

### Goals  
The primary goal of the optimization is to maximize the total attendance across all shows. This involves selecting the optimal number of performances for each show to achieve the highest possible attendance. The success of this optimization is measured by the total attendance, which is calculated as the sum of the expected attendance for each show multiplied by the number of performances. This linear optimization goal is clearly defined and aligns with the expected coefficient sources, ensuring that the problem remains solvable and practical.

## 2. Constraints    

The optimization problem is subject to several linear constraints that ensure feasibility and operational efficiency:

- The total number of performances across all shows must not exceed the total availability of conductors. This constraint ensures that the scheduling of performances is realistic and manageable given the conductor resources.
- Each orchestra has a maximum number of performances it can handle, which must not be exceeded. This constraint ensures that the workload for each orchestra remains within acceptable limits.
- The product of the expected attendance and the number of performances for each show must not exceed the venue's capacity. This constraint ensures that the audience size does not surpass what the venue can accommodate, maintaining safety and comfort.

These constraints are expressed in business terms that naturally lead to linear mathematical forms, avoiding any nonlinear relationships such as variable products or divisions.

## 3. Available Data  

### Database Schema  
```sql
-- Iteration 1 Database Schema
-- Objective: Schema changes include creating new tables for missing optimization data, modifying existing tables to fill mapping gaps, and updating business configuration logic for scalar parameters and formulas.

CREATE TABLE OrchestraPerformanceLimits (
  Orchestra_ID INTEGER,
  MaxPerformances INTEGER
);

CREATE TABLE VenueCapacity (
  Show_ID INTEGER,
  Capacity INTEGER
);

CREATE TABLE Show (
  Show_ID INTEGER,
  Attendance INTEGER,
  Performances INTEGER
);


```

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

- **OrchestraPerformanceLimits**: This table defines the maximum number of performances each orchestra can handle. It plays a crucial role in setting constraint bounds for the optimization problem.
  - **Orchestra_ID**: A unique identifier for each orchestra, used as an index for constraint bounds.
  - **MaxPerformances**: The maximum number of performances allowed for each orchestra, serving as a constraint bound.

- **VenueCapacity**: This table specifies the capacity of each venue for shows, which is essential for setting constraint bounds related to attendance.
  - **Show_ID**: A unique identifier for each show, used as an index for constraint bounds.
  - **Capacity**: The maximum capacity of the venue, serving as a constraint bound for attendance.

- **Show**: This table stores information about each show, including expected attendance and the number of performances, which are key components of the optimization problem.
  - **Show_ID**: A unique identifier for each show, used as an index for decision variables.
  - **Attendance**: The expected attendance for each show, which acts as an objective coefficient in the optimization.
  - **Performances**: The number of performances for each show, serving as the decision variable in the optimization.

### Current Stored Values  
```sql
-- Iteration 1 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on typical orchestra performance schedules, venue capacities, and conductor availability to ensure a realistic and solvable optimization problem.

-- Realistic data for OrchestraPerformanceLimits
INSERT INTO OrchestraPerformanceLimits (Orchestra_ID, MaxPerformances) VALUES (1, 5);
INSERT INTO OrchestraPerformanceLimits (Orchestra_ID, MaxPerformances) VALUES (2, 10);
INSERT INTO OrchestraPerformanceLimits (Orchestra_ID, MaxPerformances) VALUES (3, 15);

-- Realistic data for VenueCapacity
INSERT INTO VenueCapacity (Show_ID, Capacity) VALUES (101, 200);
INSERT INTO VenueCapacity (Show_ID, Capacity) VALUES (102, 300);
INSERT INTO VenueCapacity (Show_ID, Capacity) VALUES (103, 400);

-- Realistic data for Show
INSERT INTO Show (Show_ID, Attendance, Performances) VALUES (101, 150, 1);
INSERT INTO Show (Show_ID, Attendance, Performances) VALUES (102, 250, 2);
INSERT INTO Show (Show_ID, Attendance, Performances) VALUES (103, 350, 3);


```
