Hot answers tagged

6

Short answer: The model is wrong. :-) Longer answer: After attempting to solve the model and being told it is infeasible, run the conflict refiner to get an set of mutually inconsistent constraints. Plug your heuristic solution into each of those constraints, and see which are violated. Assuming your heuristic solution really is feasible, those constraints ...


3

kpi syntax example in docplex from docplex.mp.model import Model mdl = Model(name='buses') nbbus40 = mdl.integer_var(name='nbBus40') nbbus30 = mdl.integer_var(name='nbBus30') nbbus=nbbus30+nbbus40 mdl.add_kpi(nbbus,"nbbus") mdl.add_constraint(nbbus40*40 + nbbus30*30 >= 300, 'kids') mdl.minimize(nbbus40*500 + nbbus30*400) mdl.solve(log_output=...


Only top voted, non community-wiki answers of a minimum length are eligible