6

Before implementing anything, you need to understand the equations. A good approach is to think in terms of resources. When handling capacity constraints, you are dealing with a load resource which is limited to the vehicle's capacity. When dealing with constraints linked to time, you need an extra resource for this. Each of these resources can be delt with ...


3

It seems you should take a look at the solution pool feature in CPLEX. This allows you to collect multiple solutions during the branch and bound search and to examine these solutions afterwards. I don't know how to do this in pyomo but you can find more information here https://www.ibm.com/support/knowledgecenter/SSSA5P_12.5.1/ilog.odms.ide.help/OPL_Studio/...


3

This analogy might help: CPU usage is like the power output of an engine - more is better in terms of performance. Memory usage is more like the heat produced by the engine - too much heat, aka memory capacity exceeded, and the engine breaks down. There is simply no reason in trying to increase or even max out memory usage.


3

As @ErwinKalvelagen pointed out: by default gams cplex uses only 1 thread which results in a low usage of the pc ressources. In order to change this one has to increase the thread number so that multiple cores can be used at the same time: https://support.gams.com/solver:multiple_cplex_threads


3

First of all, you should determine the sign of the multipliers based on the objective function direction and how the complicating constraints are violated. Then you have to use a standard method like subgradient optimization to solve the lagrangian dualized problem to determine the optimal value of the multipliers. For more details: Marshall L. Fisher, An ...


3

Within docplex I would use cpoptimizer and write mdl = CpoModel(name='portfolio_miqp') scale=10000 scaleQ = mdl.integer_var(0,200*scale,name='scaleQuantity of Items') scaleT = mdl.integer_var(0,100*scale,name='scalePeriod in days') scalex = mdl.integer_var(0,100*scale,name='scaleAdvertisement per day') Q=scaleQ/scale T=scaleT/scale x=scalex/scale alpha = ...


3

The error message suggests that you tried to access the solution before solving the model. At the point that mdl.maximize(profit) is executed, you have constructed your model, but you have not solved it. Trying invoking mdl.solve() next.


2

You can create a binary decision variable as: from docplex.mp.model import Model m = Model(...) my_var = m.binary_var("name_of_this_var") The variable is just an object and does not know how many indices it has. You can then maintain your own variable dictionary. So if you have a variable defined for the indices i,k,s,m,t, you could create a ...


1

If all the cuts you generate have an impact (i.e., you don't generate cuts that are rendered redundant by other cuts), then at least some of the reason that adding a bunch of cuts at once is faster than adding one at a time is that you update the node LP after each cut is added in the first case, and only after all the cuts are added in the second case. So ...


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