Professional Documents
Culture Documents
My objective and constraints are linear except the conic constraint written below.
𝑃2 +𝑄2
𝑙≤ 𝑣
This can be written as a second order cone constraint like:
2𝑃
‖ 2𝑄 ‖ ≤ 𝑙 + 𝑣
𝑙−𝑣 2
𝑃, 𝑄, 𝑙, 𝑣 𝑎𝑟𝑒 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝑠
I wrote my code for this constraint as:
2 2 2
√(2𝑃𝑖𝑗 ) + (2𝑄𝑖𝑗 ) + (𝑙𝑖𝑗 − 𝑣𝑖 ) ≤ (𝑙𝑖𝑗 + 𝑣𝑖 )