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

1 Expert Approved Answer
Step: 1 Unlock

The given task involves filling in missing parts of a Julia program for scheduling courses stud... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!