fork download
  1. # your code goes here
  2. # your code goes here
  3. # your code goes here
  4. class Operation:
  5. def _init_(self):
  6. self.time = 0
  7. self.machine = 0
  8. self.i = 0
  9. self.j = 0
  10. self.EF = -1
  11. def _init_(self, time, machine, task, order, EF):
  12. self.time = time
  13. self.machine = machine
  14. self.task = task
  15. self.order = order
  16. self.EF = EF
  17.  
  18. d = Operation()
  19. d.time = 10
  20.  
  21. print(d.time)
  22.  
  23. quantity_machines = 3
  24. quantity_tasks = 4
  25. quantity_operations = 3
  26. size_swap = 1 #sustituye patch_size
  27. operations_by_task = [4][3]
  28. matrix_times = [[2,3,4], [4,4,1], [2,2,3], [3,3,1]]
  29. matrix_machines = [[1,2,3], [3,2,1], [2,3,1], [1,3,2]]
  30. print(101)
  31. for i in range(quantity_tasks-1):
  32. print(i)
  33. for j in range(quantity_operations-1):
  34. operations_by_task[i][j].time = matrix_times[i][j]
  35. operations_by_task[i][j].machine = matrix_machines[i][j]
  36. operations_by_task[i][j].i = i
  37. operations_by_task[i][j].j = j
  38. operations_by_task[i][j].ef = -1
  39. print(operations_by_task[i][j].time)
  40. print(101.5)
  41.  
  42. print(102)
Compilation error #stdin compilation error #stdout 0.01s 9992KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "/usr/lib/python3.4/py_compile.py", line 124, in compile
    _optimize=optimize)
  File "<frozen importlib._bootstrap>", line 1532, in source_to_code
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "./prog.py", line 33
    for j in range(quantity_operations-1):
                                         ^
IndentationError: unindent does not match any outer indentation level

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.4/py_compile.py", line 128, in compile
    raise py_exc
py_compile.PyCompileError: Sorry: IndentationError: unindent does not match any outer indentation level (prog.py, line 33)
stdout
Standard output is empty