Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Smith and Roberson Business Law

Authors: Richard A. Mann, Barry S. Roberts

15th Edition

1285141903, 1285141903, 9781285141909, 978-0538473637

More Books

Students also viewed these Programming questions

Question

What role do hormone levels play in mood?

Answered: 1 week ago

Question

List the major functions performed by the DBA

Answered: 1 week ago