Problem with Commonroad-io Tutorials

Hello Team,
I tried to run the code in the Tutorials for Commonroad-io but met the following problems.
In Tutorial 1:

  1. I couldn’t find the file ‘ZAM_Tutorial-1_1_T-1.xml’
    In Tutorial 2:
  2. x = Variable(n,N+1): Variable name 41 must be a string.
    So I tried: x = Variable((n,N+1))
  3. cost = quad_form(x[:,k+1]-npy.transpose(npy.array([0,v_ref,0,0])), Q) + quad_form(u[:,k],R): invalid dimension of args
    So I tried: R = npy.array([[w_u]])
  4. prob.constraints += [x[:,0] == x_0]: ValueError: Cannot broadcast dimensions (4,) (4, 1)
    So I tried: prob.constraints += [x[:,0] == x_0.reshape(n)]
  5. prob.constraints += [x[:,0] == x_0.reshape(n)]: AttributeError: can’t set attribute

I am using python3.6 and cvxpy1.0.25, could it be the problem of the versions?
Thank you very much for your answers!

Hi Jiaying,

  1. Somehow the xml file is not included in the Tutorial, you can check out the temporary link to the file here.

  2. Try installing cvxpy of version 0.4.9 with command pip install cvxpy==0.4.9 and see if Tutorial 2 works. I think you don’t need to change anything in Tutorial 2, it’s just the installation problem.

1 Like

Thank you very much!
It worked with version 0.4.9.
Seems like my scipy version is also wrong, but by changing the “scipy.misc” to “scipy.special” in the file cvxpy/atoms/log_sum_exp.py solved the problem.

1 Like

Many thanks to both of you. I have exactly the same problem with scipy. It seems that we can either downgrade scipy to 1.2.1 or do what Jiaying said to solve this problem.