Iteration final - PROBLEM_DESCRIPTION
Sequence: 5
Timestamp: 2025-07-25 22:28:18

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: resource_allocation_per_major: integer (amount of resources allocated to each major)
- Operational parameters align with expected linear objective: maximize ∑(expected_votes_per_major × resource_allocation_per_major)
- Business configuration includes: Total budget available for resource allocation (used for Constraint bound for total resource allocation), Minimum resource allocation required per major (used for Constraint bound for minimum resource allocation), Maximum resource allocation allowed per major (used for Constraint bound for maximum resource allocation), Resource allocation per student (used for Constraint bound for resource allocation per student)
- Business logic formulas to express in natural language: Calculation of expected votes per major (calculation method for Objective coefficient for expected votes)
- 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": "voter_2",
  "iteration": 1,
  "business_context": "A university aims to maximize student participation in elections by allocating resources (e.g., campaign materials, reminders) to different majors based on historical voting patterns and student demographics. The optimization model ensures resource allocation respects budget limits, minimum and maximum allocation per major, and proportional allocation based on student numbers.",
  "optimization_problem_description": "Maximize the total expected votes across all election positions by allocating resources to different majors. The decision variables represent the amount of resources allocated to each major. Constraints include budget limits, minimum and maximum resource allocations per major, and proportional allocation based on the number of students in each major.",
  "optimization_formulation": {
    "objective": "maximize \u2211(expected_votes_per_major \u00d7 resource_allocation_per_major)",
    "decision_variables": "resource_allocation_per_major: integer (amount of resources allocated to each major)",
    "constraints": [
      "\u2211(resource_allocation_per_major) \u2264 total_budget",
      "resource_allocation_per_major \u2265 minimum_allocation_per_major for all majors",
      "resource_allocation_per_major \u2264 maximum_allocation_per_major for all majors",
      "resource_allocation_per_major \u2264 resource_per_student \u00d7 number_of_students_in_major for all majors"
    ]
  },
  "current_optimization_to_schema_mapping": {
    "objective_coefficients": {
      "expected_votes_per_major[major]": {
        "currently_mapped_to": "ExpectedVotesPerMajor.expected_votes",
        "mapping_adequacy": "good",
        "description": "Expected number of votes per major, used as coefficients in the objective function"
      }
    },
    "constraint_bounds": {
      "total_budget": {
        "currently_mapped_to": "business_configuration_logic.total_budget",
        "mapping_adequacy": "good",
        "description": "Total budget available for resource allocation"
      },
      "minimum_allocation_per_major[major]": {
        "currently_mapped_to": "business_configuration_logic.minimum_allocation_per_major",
        "mapping_adequacy": "good",
        "description": "Minimum resource allocation required per major"
      },
      "maximum_allocation_per_major[major]": {
        "currently_mapped_to": "business_configuration_logic.maximum_allocation_per_major",
        "mapping_adequacy": "good",
        "description": "Maximum resource allocation allowed per major"
      },
      "resource_per_student[major]": {
        "currently_mapped_to": "business_configuration_logic.resource_per_student",
        "mapping_adequacy": "good",
        "description": "Resource allocation per student, used to calculate proportional allocation"
      },
      "number_of_students_in_major[major]": {
        "currently_mapped_to": "Student.number_of_students_in_major",
        "mapping_adequacy": "good",
        "description": "Number of students in each major, used to calculate proportional allocation"
      }
    },
    "decision_variables": {
      "resource_allocation_per_major[major]": {
        "currently_mapped_to": "ResourceAllocationPerMajor.resource_allocation",
        "mapping_adequacy": "good",
        "description": "Amount of resources allocated to each major",
        "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 tables for expected votes, resource allocations, and budget constraints. Configuration logic updates include scalar parameters for budget and resource limits, and formulas for expected votes calculation.

CREATE TABLE ExpectedVotesPerMajor (
  major STRING,
  expected_votes INTEGER
);

CREATE TABLE ResourceAllocationPerMajor (
  major STRING,
  resource_allocation INTEGER
);

CREATE TABLE Student (
  major STRING,
  number_of_students_in_major INTEGER
);


```

CURRENT STORED VALUES:
```sql
-- Iteration 1 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on realistic university demographics, historical voting patterns, and resource allocation practices. The goal was to ensure that the optimization problem is meaningful and solvable while respecting business configuration logic.

-- Realistic data for ExpectedVotesPerMajor
INSERT INTO ExpectedVotesPerMajor (major, expected_votes) VALUES ('Computer Science', 150);
INSERT INTO ExpectedVotesPerMajor (major, expected_votes) VALUES ('Biology', 100);
INSERT INTO ExpectedVotesPerMajor (major, expected_votes) VALUES ('History', 80);

-- Realistic data for ResourceAllocationPerMajor
INSERT INTO ResourceAllocationPerMajor (major, resource_allocation) VALUES ('Computer Science', 2000);
INSERT INTO ResourceAllocationPerMajor (major, resource_allocation) VALUES ('Biology', 1500);
INSERT INTO ResourceAllocationPerMajor (major, resource_allocation) VALUES ('History', 1000);

-- Realistic data for Student
INSERT INTO Student (major, number_of_students_in_major) VALUES ('Computer Science', 200);
INSERT INTO Student (major, number_of_students_in_major) VALUES ('Biology', 150);
INSERT INTO Student (major, number_of_students_in_major) VALUES ('History', 100);


```

DATA DICTIONARY:
{
  "tables": {
    "ExpectedVotesPerMajor": {
      "business_purpose": "Expected votes per major based on historical voting data",
      "optimization_role": "objective_coefficients",
      "columns": {
        "major": {
          "data_type": "STRING",
          "business_meaning": "Major name",
          "optimization_purpose": "Identifier for major",
          "sample_values": "Computer Science, Biology"
        },
        "expected_votes": {
          "data_type": "INTEGER",
          "business_meaning": "Expected number of votes",
          "optimization_purpose": "Coefficient in objective function",
          "sample_values": "100, 200"
        }
      }
    },
    "ResourceAllocationPerMajor": {
      "business_purpose": "Amount of resources allocated to each major",
      "optimization_role": "decision_variables",
      "columns": {
        "major": {
          "data_type": "STRING",
          "business_meaning": "Major name",
          "optimization_purpose": "Identifier for major",
          "sample_values": "Computer Science, Biology"
        },
        "resource_allocation": {
          "data_type": "INTEGER",
          "business_meaning": "Amount of resources allocated",
          "optimization_purpose": "Decision variable in optimization model",
          "sample_values": "500, 1000"
        }
      }
    },
    "Student": {
      "business_purpose": "Student demographics and major information",
      "optimization_role": "business_data",
      "columns": {
        "major": {
          "data_type": "STRING",
          "business_meaning": "Major name",
          "optimization_purpose": "Identifier for major",
          "sample_values": "Computer Science, Biology"
        },
        "number_of_students_in_major": {
          "data_type": "INTEGER",
          "business_meaning": "Number of students in each major",
          "optimization_purpose": "Constraint bound for resource allocation",
          "sample_values": "100, 200"
        }
      }
    }
  }
}


BUSINESS CONFIGURATION:

BUSINESS CONFIGURATION:
{
  "total_budget": {
    "data_type": "INTEGER",
    "business_meaning": "Total budget available for resource allocation",
    "optimization_role": "Constraint bound for total resource allocation",
    "configuration_type": "scalar_parameter",
    "value": 50000,
    "business_justification": "A realistic budget that allows for meaningful resource allocation across all majors while respecting constraints."
  },
  "minimum_allocation_per_major": {
    "data_type": "INTEGER",
    "business_meaning": "Minimum resource allocation required per major",
    "optimization_role": "Constraint bound for minimum resource allocation",
    "configuration_type": "scalar_parameter",
    "value": 500,
    "business_justification": "Ensures that each major receives a minimum level of resources to encourage participation."
  },
  "maximum_allocation_per_major": {
    "data_type": "INTEGER",
    "business_meaning": "Maximum resource allocation allowed per major",
    "optimization_role": "Constraint bound for maximum resource allocation",
    "configuration_type": "scalar_parameter",
    "value": 5000,
    "business_justification": "Prevents any single major from consuming an excessive share of the budget."
  },
  "resource_per_student": {
    "data_type": "INTEGER",
    "business_meaning": "Resource allocation per student",
    "optimization_role": "Constraint bound for resource allocation per student",
    "configuration_type": "scalar_parameter",
    "value": 10,
    "business_justification": "A reasonable allocation per student to ensure proportional distribution of resources."
  },
  "expected_votes_formula": {
    "data_type": "STRING",
    "business_meaning": "Calculation of expected votes per major",
    "optimization_role": "Objective coefficient for expected votes",
    "configuration_type": "business_logic_formula",
    "formula_expression": "historical_votes * student_engagement_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: voter_2

## 1. Problem Context and Goals

### Context  
[Regenerate business context that naturally aligns with LINEAR optimization formulation. Ensure:]
- Business decisions match expected decision variables: resource_allocation_per_major: integer (amount of resources allocated to each major)
- Operational parameters align with expected linear objective: maximize ∑(expected_votes_per_major × resource_allocation_per_major)
- Business configuration includes: Total budget available for resource allocation (used for Constraint bound for total resource allocation), Minimum resource allocation required per major (used for Constraint bound for minimum resource allocation), Maximum resource allocation allowed per major (used for Constraint bound for maximum resource allocation), Resource allocation per student (used for Constraint bound for resource allocation per student)
- Business logic formulas to express in natural language: Calculation of expected votes per major (calculation method for Objective coefficient for expected votes)
- 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 ∑(expected_votes_per_major × resource_allocation_per_major)
- 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: ['∑(resource_allocation_per_major) ≤ total_budget', 'resource_allocation_per_major ≥ minimum_allocation_per_major for all majors', 'resource_allocation_per_major ≤ maximum_allocation_per_major for all majors', 'resource_allocation_per_major ≤ resource_per_student × number_of_students_in_major for all majors'] (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 tables for expected votes, resource allocations, and budget constraints. Configuration logic updates include scalar parameters for budget and resource limits, and formulas for expected votes calculation.

CREATE TABLE ExpectedVotesPerMajor (
  major STRING,
  expected_votes INTEGER
);

CREATE TABLE ResourceAllocationPerMajor (
  major STRING,
  resource_allocation INTEGER
);

CREATE TABLE Student (
  major STRING,
  number_of_students_in_major 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 university demographics, historical voting patterns, and resource allocation practices. The goal was to ensure that the optimization problem is meaningful and solvable while respecting business configuration logic.

-- Realistic data for ExpectedVotesPerMajor
INSERT INTO ExpectedVotesPerMajor (major, expected_votes) VALUES ('Computer Science', 150);
INSERT INTO ExpectedVotesPerMajor (major, expected_votes) VALUES ('Biology', 100);
INSERT INTO ExpectedVotesPerMajor (major, expected_votes) VALUES ('History', 80);

-- Realistic data for ResourceAllocationPerMajor
INSERT INTO ResourceAllocationPerMajor (major, resource_allocation) VALUES ('Computer Science', 2000);
INSERT INTO ResourceAllocationPerMajor (major, resource_allocation) VALUES ('Biology', 1500);
INSERT INTO ResourceAllocationPerMajor (major, resource_allocation) VALUES ('History', 1000);

-- Realistic data for Student
INSERT INTO Student (major, number_of_students_in_major) VALUES ('Computer Science', 200);
INSERT INTO Student (major, number_of_students_in_major) VALUES ('Biology', 150);
INSERT INTO Student (major, number_of_students_in_major) VALUES ('History', 100);


```

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

Response:
# Complete Optimization Problem and Solution: voter_2

## 1. Problem Context and Goals

### Context  
A university is focused on maximizing student participation in elections by strategically allocating resources such as campaign materials and reminders to different majors. The allocation is based on historical voting patterns and student demographics. The university aims to ensure that resource distribution respects the total budget, provides a minimum level of support to each major, avoids excessive allocation to any single major, and is proportional to the number of students in each major.  

The decision variables represent the amount of resources allocated to each major, which must be integer values. The objective is to maximize the total expected votes across all election positions by leveraging the relationship between resource allocation and expected votes.  

The business configuration includes:  
- A total budget of 50,000 units available for resource allocation, which serves as the upper limit for the sum of all resource allocations.  
- A minimum resource allocation of 500 units per major, ensuring each major receives a baseline level of support.  
- A maximum resource allocation of 5,000 units per major, preventing any single major from consuming an excessive share of the budget.  
- A resource allocation of 10 units per student, ensuring proportional distribution based on the number of students in each major.  

The expected votes per major are calculated using a formula that incorporates historical voting data and a student engagement factor. This calculation provides the coefficients used in the objective function to measure the impact of resource allocation on expected votes.  

### Goals  
The primary goal of this optimization problem is to maximize the total expected votes across all majors by allocating resources effectively. Success is measured by the sum of the expected votes per major multiplied by the corresponding resource allocation. This linear relationship ensures that the optimization goal is directly tied to the operational decision of resource distribution.  

## 2. Constraints  

The resource allocation must adhere to the following constraints:  
1. The total amount of resources allocated across all majors must not exceed the total budget of 50,000 units.  
2. Each major must receive at least 500 units of resources to ensure a minimum level of support.  
3. No major can receive more than 5,000 units of resources to prevent excessive allocation to any single major.  
4. The resource allocation for each major must be proportional to the number of students in that major, with a maximum of 10 units allocated per student.  

These constraints ensure that the resource allocation is both fair and feasible, aligning with the university’s operational and budgetary requirements.  

## 3. Available Data  

### Database Schema  
```sql
-- Iteration 1 Database Schema
-- Objective: Schema changes include creating tables for expected votes, resource allocations, and budget constraints. Configuration logic updates include scalar parameters for budget and resource limits, and formulas for expected votes calculation.

CREATE TABLE ExpectedVotesPerMajor (
  major STRING,
  expected_votes INTEGER
);

CREATE TABLE ResourceAllocationPerMajor (
  major STRING,
  resource_allocation INTEGER
);

CREATE TABLE Student (
  major STRING,
  number_of_students_in_major INTEGER
);
```

### Data Dictionary  
- **ExpectedVotesPerMajor**:  
  - **Business Purpose**: Stores the expected number of votes per major based on historical voting data.  
  - **Optimization Role**: Provides the coefficients used in the objective function to measure the impact of resource allocation on expected votes.  
  - **Columns**:  
    - `major`: The name of the major (e.g., Computer Science, Biology).  
    - `expected_votes`: The expected number of votes for the major, derived from historical data and engagement factors.  

- **ResourceAllocationPerMajor**:  
  - **Business Purpose**: Tracks the amount of resources allocated to each major.  
  - **Optimization Role**: Represents the decision variables in the optimization model.  
  - **Columns**:  
    - `major`: The name of the major (e.g., Computer Science, Biology).  
    - `resource_allocation`: The amount of resources allocated to the major, which must be an integer value.  

- **Student**:  
  - **Business Purpose**: Contains demographic information about students, including the number of students in each major.  
  - **Optimization Role**: Provides data used to calculate proportional resource allocation based on student numbers.  
  - **Columns**:  
    - `major`: The name of the major (e.g., Computer Science, Biology).  
    - `number_of_students_in_major`: The number of students enrolled in the major, used to determine proportional resource allocation.  

### Current Stored Values  
```sql
-- Iteration 1 Realistic Data
-- Generated by triple expert (business + data + optimization)
-- Values were determined based on realistic university demographics, historical voting patterns, and resource allocation practices. The goal was to ensure that the optimization problem is meaningful and solvable while respecting business configuration logic.

-- Realistic data for ExpectedVotesPerMajor
INSERT INTO ExpectedVotesPerMajor (major, expected_votes) VALUES ('Computer Science', 150);
INSERT INTO ExpectedVotesPerMajor (major, expected_votes) VALUES ('Biology', 100);
INSERT INTO ExpectedVotesPerMajor (major, expected_votes) VALUES ('History', 80);

-- Realistic data for ResourceAllocationPerMajor
INSERT INTO ResourceAllocationPerMajor (major, resource_allocation) VALUES ('Computer Science', 2000);
INSERT INTO ResourceAllocationPerMajor (major, resource_allocation) VALUES ('Biology', 1500);
INSERT INTO ResourceAllocationPerMajor (major, resource_allocation) VALUES ('History', 1000);

-- Realistic data for Student
INSERT INTO Student (major, number_of_students_in_major) VALUES ('Computer Science', 200);
INSERT INTO Student (major, number_of_students_in_major) VALUES ('Biology', 150);
INSERT INTO Student (major, number_of_students_in_major) VALUES ('History', 100);
```
