(h, X)
| 23 | # |
| 24 | # individual optimization of each objective |
| 25 | def individual_objectives(h, X): |
| 26 | print('## Individual:\n') |
| 27 | objective_values = [] |
| 28 | |
| 29 | for k in range(OBJECTIVES): |
| 30 | h.maximize(np.dot(X, profit[k,:])) |
| 31 | print(f' Obj {k+1}: [{"".join(map(lambda x: "{:1.0f}".format(x), profit[k,:]))}]') |
| 32 | print(f' Sol {k+1}: [{"".join(map(lambda x: "{:1.0f}".format(x), abs(h.vals(X))))}]\n') |
| 33 | objective_values.append(h.getObjectiveValue()) |
| 34 | |
| 35 | print(f' OBJ: {pretty_print(objective_values)}\n\n') |
| 36 | |
| 37 | # |
| 38 | # manual implementation of lexicographic multi-objective optimization |
no test coverage detected