This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some informal experiments with Christmas Lights for the MOSEK blogpost | |
from mosek.fusion import * | |
import numpy as np | |
import sys | |
def exRandom(): | |
D = 2 # Dimension of the tree | |
N = 20 # Number of lights | |
P = 35 # Number of decorations to shine upon | |
T = 10 # Tree top |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mosek.fusion import * | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import sys, itertools | |
# For a scalar variable x returns a new variable | |
# exactly representing abs(x) | |
def abs(M, x): | |
absx = M.variable() |