GLPK.L01PSolve |
Syntax |
GLPK.L01PSolve(F:LIST, CuttingNumber:INT, QStrategy:INT, CStrategy:INT, MinMax:STRING) |
Description |
Example |
Use Z/(2)[x[1..4]]; F:=[ x[1]x[2] + x[2]x[3] + x[2]x[4] + x[3]x[4] + x[1] + x[3] + 1, x[1]x[2] + x[1]x[3] + x[1]x[4] + x[3]x[4] + x[2] + x[3] + 1, x[1]x[2] + x[1]x[3] + x[2]x[3] + x[3]x[4] + x[1] + x[4] + 1, x[1]x[3] + x[2]x[3] + x[1]x[4] + x[2]x[4] + 1 ]; CuttingNumber:=6; QStrategy:=0; CStrategy:=0; MinMax:="Max"; -- Then we compute the solution with GLPK.L01PSolve(F, CuttingNumber, QStrategy, CStrategy, MinMax); -- The result will be the following: Converting to CNF with CuttingLength: 6, QStrategy: Standard, CStrategy: Standard. Converting CNF to system of equalities and inequalities... Model is ready to solve with GLPK... Solution Status: INTEGER OPTIMAL Value of objective function: 2 [0, 1, 0, 1] ------------------------------- |
Example |
Use S::=Z/(2)[x[1..5]]; F:=[ x[1]x[5] + x[3]x[5] + x[4]x[5] + x[1] + x[4], x[1]x[2] + x[1]x[4] + x[3]x[4] + x[1]x[5] + x[2]x[5] + x[3]x[5] + x[1] + x[4] + x[5] + 1, x[1]x[2] + x[4]x[5] + x[1] + x[2] + x[4], x[1]x[4] + x[3]x[4] + x[2]x[5] + x[1] + x[2] + x[4] + x[5] + 1, x[1]x[4] + x[2]x[4] + x[3]x[4] + x[2]x[5] + x[4]x[5] + x[1] + x[2] + x[4] + x[5] ]; CuttingNumber:=6; QStrategy:=1; CStrategy:=0; MinMax:="Max"; -- Then we compute the solution with GLPK.L01PSolve(F, CuttingNumber, QStrategy, CStrategy, MinMax); -- The result will be the following: Converting to CNF with CuttingLength: 6, QStrategy: LinearPartner, CStrategy: Standard. Converting CNF to system of equalities and inequalities... Model is ready to solve with GLPK... Solution Status: INTEGER OPTIMAL Value of objective function: 4 [1, 1, 1, 1, 0] ------------------------------- |
Example |
Use ZZ/(2)[x[1..3]]; F := [ x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[3] +1, x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[2], x[1]x[2] + x[2]x[3] + x[2] ]; CuttingNumber:=5; QStrategy:=0; CStrategy:=1; MinMax:="Max"; -- Then we compute the solution with GLPK.L01PSolve(F, CuttingNumber, QStrategy, CStrategy, MinMax); -- The result will be the following: Converting to CNF with CuttingLength: 5, QStrategy: Standard, CStrategy: CubicParnterDegree2. Converting CNF to system of equalities and inequalities... Model is ready to solve with GLPK... Solution Status: INTEGER OPTIMAL Value of objective function: 1 [0, 0, 1] ------------------------------- |