3

I am trying to learn Julia with optimization problems. I tried to solve a scheduling problem. Here is the question that I want to solve with Cbc library. - There are 6 time periods, 10 seminar, 5 speaker, 15 audience, and 4 conference room.

Which speaker offer which seminar is given as a matrix (5x10) Speaker, and which audience will participate in which seminar is shown in below matrix Audience:

Speaker = [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 ];

Audience = [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];


numberOfSeminar = 10;  # Number of seminars
numberOfAudience = 15; # Number of audience
numberOfSpeakers = 5;  # Number of speakers
numberOfTimePeriods = 6;  # Number of time periods
numberOfRooms = 4;  # Number of conference room

using JuMP, Cbc

model = Model(with_optimizer(Cbc.Optimizer))

@variable(

#CONSTRAINTS

#1.In a time and place, at most one seminar will be schedule.
@constraint()

#2. All seminars get two time periods.
@constraint()

#3. A seminar cannot be scheduled to two different conference room at the same time (no sections)
@constraint()

#4. A speaker cannot be in two different seminar at the same time
@constraint()

#5. A audience cannot be in two different seminar at the same time
@constraint()

I also can not configure its model. I know some constraints are needed and at the end of the code I must optimize it with

optimize!(model)

By the way can I print the schedule after optimization? Is there any way? I want to print out the result.

phipsgabler
  • 20,535
  • 4
  • 40
  • 60
colss
  • 51
  • 9
  • I suggest you consider cross-posting this question at or.stackexchange.com, where you'd be able to access a specific audience for this topic. – dhasson Jan 10 '20 at 00:18
  • Write the optimization problem in form of a set of equations and we can help you to translate it to the Julia code – Przemyslaw Szufel Jan 10 '20 at 00:37
  • Decision Variables X = {0,1}^(numberofseminar* numberofroom*numberoftimes) Y= {0,1}^(numberofspeaker* numberofseminar*numberoftimes) Z= {0,1}^(numberofaudience* numberofseminar*numberoftimes) Basic constraints 1.In a time and place, at most one seminar will be schedule. 2. All seminars get two time periods. 3. A seminar cannot be scheduled to two different conference room at the same time (no sections) 4. A speaker cannot be in two different seminar at the same time 5. A audience cannot be in two different seminar at the same time – colss Jan 10 '20 at 01:01
  • 1
    @user377054 edit your question to have mathematical formulation of your problem. If you do not know how to do that ask a question on https://math.stackexchange.com/ once done come back and we somone will write it as JuMP problem – Przemyslaw Szufel Jan 11 '20 at 00:52

0 Answers0