Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I want the solution to a question on python, like the method in the pictures. I could not solve a complete question, please solve a
I want the solution to a question on python, like the method in the pictures. I could not solve a complete question, please solve a question
A company haset of jote that need to be scheduled onto one of two machines. The processing time and doe date of each job is shown in the table below Job 1 Job 2 Job 3 Job 4 Jobs Job 6 Job 7 Job 8 Job 9 Processing Time 3 4 2 45 Due Date 9 10 7 15 20 13 12 11 There is a penalty for each day late. The penalty is $5, 86, 87, 88, 510, 57, 65, 88 and 30 for job. 1, 2.3.4.5, 6, 7, 8, and respectively. The company would like to reduce the total cost of latenuses (if any) when procesing all jobs on the machines Parameters ./ = Set of job, (1.2......) . K = Set of machines, (1,2) Processing time of job ! . d = Due date of job siel Penalty per day late of job wel Decision Variable * Starting time of job.tel * = Whether job precedes job for not, ielel { ifi is before lofjis before i = Whether job i in processed on machine ke telkek fi iftis processed on k, lo otherwise 4 Lateness of job til Mixed Integer Program min SEK wel ****$#+M(2-w-wja) + MW Wel-,V> andjele K 13+ 5*+M(2 - 4 - wy) + M-) wel-, Vj>tandje 1.VKEK 42- viel 420 wel 20 Viel whimary WELVET hinary Viel.V EK Note: ie! - {m}.j>i andje I can also be exprewed as i (1.2.-1).j fi+1...) 0 > Requirement already satisfied: docplex in /usr/local/lib/python3.7/dist-packages (2.22.213) Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from docplex) (1. + Code + Text [45] bs-job1':[3,9,5), job2': [4,10,6]. job3:[6,8,9]. job4":[2,7,8], jobs":[5,15,10), job6":[3,20,7] job7':[6,13,5), jobs":[4,12,8], job9* :[5,11,9], } machines - I'machinel', 'machine2') Os completed at 6:11 PM r. continuous_var_dict(jobs, 1b-e, ub-None, namestaring time is or job') y-{(1,3):m. binary_var(name- 'whether job (@) precedes job (1)'.format(1,1)) for in jobs for 1 In Jobs } I-n.continuous_var dict(jobs, 1b-e, ub-tione, name-lateness of job Xs") v-{(1,k):m. binary_var(name="whether job (C) precedes machine (1) .format(1,k)) for 1 in jobs for k in machines) Warning: Duplicate variable name: whether job jobb precedes job fob7 already used for docplex.mp.Var(type-B, name='wheth Warning: Duplicate variable name: whether job jobb precedes job jobs already used for docplex.ep. Var(type-B, name='whet Warning: Duplicate variable name: whether job jobb precedes job job9 already used for docplex.mp. Var(type-3, name-'wheth Warning: Duplicate variable name: Whether job job7 precedes job jobs already used for docplex.mp. Var(type-B, name-whet Warning: Duplicate variable name: whether job job7 precedes job job2 already used for docplex.mp. Var(type-1, name='wheth Marning: Duplicate variable name: whether job job7 precedes job job3 already used for docplex.mp. Var(type-B, name='wheth Warning: Duplicate variable name: whether job fob7 precedes job job4 already used for docplex.mp. Var(type-8, nane-'whet! Warning: Duplicate variable name: whether fob fob7 precedes job jobs already used for docplex.mp. Var (type-B, name='wheth Warning: Duplicate variable name: whether job job7 precedes job jobb already used for docplex.mp. Var(type-B, name='whet Os completed at 6:11 PM D [65] inimizem.sun(11]"jobs[0][2] for 1 in Jobs.keys)) add_constrants (es.foe in machines)--for in jobs.keys) for 1 in range (1. len jobs)) for in range(1+1, len jobs)*1): if 11- add_constraints_0x[1].jobs[1]) for 1 In jobs.keys())-1000(2-[(1.2))--[03.6)] for 1 in jobs.keys() for k In sachines) (1800*y[(1.331) Step by Step Solution
There are 3 Steps involved in it
Step: 1
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