{{ role === 'staff' ? 'Administrative Configuration' : 'Professor Preferences' }}

{{ role === 'staff' ? 'Capture every hard & soft constraint before sending the run to the MILP solver.' : 'Update your teaching availability and preference constraints.' }}

Constraint Builder

Term Configuration

30-minute blocks enforced
Semester Dates
Duration: {{ semesterDuration }} weeks
{{ timeRangeWarning }}

Classrooms

No classrooms defined.
Room {{ idx + 1 }}

Instructors

No instructors defined.
Instructor {{ idx + 1 }}

Courses

No courses defined.
Course {{ idx + 1 }}

Students & Cohorts

No students defined.
Student {{ idx + 1 }}
Enrolled Courses
Add courses first to enable enrollment

Soft Constraint Weights

Adjust weights for soft constraints. Higher weights mean stronger preference enforcement.

Raw JSON Preview

Weekly Availability

Click 30-minute slots to toggle. Red means unavailable.

{{ day }}

Preferences

CourseOptimizer AI
Thinking
{{ msg.text }}
Ask anything about the schedule

Counterfactual Analysis

Test "what-if" scenarios to understand constraints and trade-offs.

Generate or select a schedule first to run what-if analysis.

Required: Course must be scheduled at this specific week

Result
Feasible
Original objective: {{ whatIfResult.original_objective?.toFixed(2) || 'N/A' }}
Alternative objective: {{ whatIfResult.alternative_objective?.toFixed(2) || 'N/A' }}
Change: {{ whatIfResult.objective_difference >= 0 ? '+' : '' }}{{ whatIfResult.objective_difference?.toFixed(2) || 'N/A' }}
Soft Constraints:
S1 (Conflicts): {{ whatIfResult.soft_constraints.S1_student_conflicts?.weighted_penalty?.toFixed(2) || '0.00' }}
S2 (B2B): {{ whatIfResult.soft_constraints.S2_instructor_compactness?.weighted_penalty?.toFixed(2) || '0.00' }}
S3 (Lunch): {{ whatIfResult.soft_constraints.S3_preferred_time_slots?.weighted_penalty?.toFixed(2) || '0.00' }}
Showing alternative schedule on calendar
Infeasible
{{ whatIfResult.iis_summary.num_constraints_in_iis || 0 }} conflicting constraints
Explanation
{{ run.run_id }} {{ run.status === 'time_limit_feasible' ? 'Time Limit' : run.status }}
{{ new Date(run.timestamp).toLocaleString() }}
Objective: {{ run.objective_value ? Math.round(run.objective_value) : '—' }}
No feasible solution
Solver error occurred

{{ semesterTitle }} Schedule Visualization

Showing only courses for {{ (currentRunInput?.instructors || inputForm.instructors).find(i => i.id === viewingProfId)?.name || viewingProfId }}
Optimal Schedule Found Good Schedule Found (Time Limit Reached) Infeasible Problem Solver Error
{{ calendarEvents.length }} course sessions scheduled • Objective: {{ Math.round(currentResult.objective_value) }} {{ currentResult.improvement_summary }} No valid schedule exists that satisfies all hard constraints. Check the AI Assistant for details. {{ currentResult.diagnostics?.error || 'An error occurred during optimization' }}

No schedule generated yet.

Infeasible Problem

No valid schedule exists that satisfies all hard constraints.

Conflicting Constraints (IIS):

  • {{ constraint }}
  • ... and {{ currentResult.diagnostics.iis.length - 10 }} more

Check the AI Assistant tab for a detailed explanation.

Solver Error

An error occurred during optimization.

Error Details:

{{ currentResult.diagnostics.error }}

Check the AI Assistant tab for more information.

Time Limit Reached: The solver found a good schedule but didn't reach optimality within the 5-minute time limit.
{{ currentResult.improvement_summary }}
Soft Constraint Breakdown:
• Student Conflicts: {{ Math.round(currentResult.soft_constraint_summary.S1_student_conflicts.weighted_penalty) }} (weight: {{ currentResult.soft_constraint_summary.S1_student_conflicts.weight }})
• Instructor Compactness: {{ Math.round(currentResult.soft_constraint_summary.S2_instructor_compactness.weighted_penalty) }} (weight: {{ currentResult.soft_constraint_summary.S2_instructor_compactness.weight }})
• Preferred Time Slots: {{ Math.round(currentResult.soft_constraint_summary.S3_preferred_time_slots.weighted_penalty) }} (weight: {{ currentResult.soft_constraint_summary.S3_preferred_time_slots.weight }})
Viewing Alternative Schedule: This is the what-if scenario result.
{{ day.name }}
{{ day.date }}
{{ day.month }}
{{ slot.label }}
{{ event.courseId || event.courseName }}
{{ calendarEvents[activeTooltipIndex].courseName || calendarEvents[activeTooltipIndex].courseId }}
Room: {{ calendarEvents[activeTooltipIndex].room }}
Instructor: {{ calendarEvents[activeTooltipIndex].instructor }}
Time: {{ calendarEvents[activeTooltipIndex].timeString }}
Day: {{ calendarEvents[activeTooltipIndex].dayName }}