We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I add nothing to prob.relaxation, i.e., simply a MILP problem without decomposition, the Solve() will stuck at some stage, except i add
for i in var: prob.relaxation[0] += var[i] >= 0, i
(add no useful constraints)
The whole script is like below, where the function generate_coefficient is from milp_func.py
generate_coefficient
milp_func.py
n_var=2 n_constr=3 args = parseArgs() args.algo = 'PriceCut' args.numBlocks = 1 args.numVarsPerBlock = n_var args.numConsPerBlock = n_constr args.numLinkingCons = 0 args.randomSeed = 2 args.density = 1 OBJ, MAT, RHS, var = generate_coefficient(args) prob = DipProblem("MILP", display_mode='matplotlib', display_interval=None) # add objective prob += -lpSum([OBJ[i]*var[i] for i in var]), "Objective" # add constraints n_cons = len(RHS) for k in range(n_cons): j = "C1_%s" %(k) prob += lpSum([MAT[i, j]*var[i] for i in var]) <= RHS[j], j #for i in var: # uncomment this two lines, then the code will not stuck # prob.relaxation[0] += var[i] >= 0, i tol = pow(pow(2, -24), old_div(2.0, 3.0)) dippyOpts = addDippyOpts(args) dippyOpts['TolZero'] = str(tol) Solve(prob, dippyOpts)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If I add nothing to prob.relaxation, i.e., simply a MILP problem without decomposition, the Solve() will stuck at some stage, except i add
(add no useful constraints)
The whole script is like below, where the function
generate_coefficient
is frommilp_func.py
The text was updated successfully, but these errors were encountered: