Question
A julia program to fill out. Please help me out You need to fill the @variable( and #1 through #6 parts P = [1 1
A julia program to fill out.
Please help me out
You need to fill the @variable( and #1 through #6 parts
P = [1 1 0 0 0 0 0 0 0 0;
0 0 1 1 0 0 0 0 0 0;
0 0 0 0 1 1 0 0 0 0;
0 0 0 0 0 0 1 1 0 0;
0 0 0 0 0 0 0 0 1 1 ];
S = [1 1 0 1 0 0 0 0 0 0;
0 0 1 0 1 0 0 1 0 0;
0 0 1 0 1 0 0 1 0 0;
0 0 1 0 1 0 0 1 0 0;
0 0 1 0 1 0 0 1 0 0;
1 1 0 1 0 0 0 0 0 0;
0 0 0 0 0 1 1 0 0 1;
0 0 0 0 0 1 1 0 0 1;
0 0 0 0 0 1 1 0 0 1;
1 1 0 1 0 0 0 0 0 0;
1 1 0 1 0 0 0 0 0 0;
0 0 0 0 0 0 1 0 1 1;
0 0 0 0 0 0 1 0 1 1;
0 0 0 0 0 0 1 0 1 1;
0 0 0 0 0 0 1 0 1 1];
nc = 10; # Number of courses
ns = 15; # Number of students
np = 5; # Number of professors
nt = 6; # Number of time slots
nr = 4; # Number of classrooms
using JuMP, Cbc
m = Model(with_optimizer(Cbc.Optimizer))
@variable(
#CONSTRAINTS
#1. To same place and time, we caschedule at most one course
@constraint(
#2. All courses takes two time slots
@constraint(
#3. A course cannot be scheduled to two different places at the same time (no sections)
@constraint(
#4. A professor cannot be itwo different lectures at the same time
...you may need several constraints here.
#5. A student cannot be itwo different lectures at the same time
...you may need several constraints here.
optimize!(m)
Step by Step Solution
3.52 Rating (169 Votes )
There are 3 Steps involved in it
Step: 1
Given Truth Table can be redrawn asbelow Input output He...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started