Saturday, June 8, 2019

CPS Summer School 2019

Participants in the CPS Summer School 2019 are invited to download and install the Acumen jar file for following the practice session on the second day (Tuesday). The main part that requires care is to make sure that you are running Java8.  Depending on your platform, can install the right version for WindowsLinux, or Mac. If one of these links does not work for you, get Version 8 from this site.

Once you have installed Java 8, download the Acumen distribution. To run Acumen, double click on the jar file in the top level directory.

We recommend that you carry out these steps before the first class (that is, before Monday) and post to the developers mailing list (acumen-developers@list.hh.se) on this post if you run into problems. If you complete the installation successful please post to confirm that all is well, and then familiarize yourself with the different examples that come with this distribution.

See you all on Monday!

Here is the model from the first day:


model Main(simulator) =
initially
 c1 = create Car((0,0,0),red),
 c2 = create Car((0,2,0),blue),
 x1=0, x1'=0, x1''=0,
 x2=0, x2'=0, x2''=0,
 z = 0
always
 if x1<20
  then x1'' = -(x1'-10)
  else if x1'>0
         then x1'' = -10
         else x1'' = 0,
 c1.pos = (x1,0,0),
 x2'' = -100*(x2-x1)-10*(x2'-x1'),
 c2.pos = (x2,2,0),
 z = x1-x2

model Car(pos,col) =
initially
 _3D = (),_Plot=()
always
 _3D = (Box center = pos+(0,0,0)
            color = 0.4*col + 0.6*white
            length = 4
            width = 1.55
            height = 1,
        Box center = pos+(0,0,1)
            color = 0.4*col + 0.6*white
            length = 2
            width = 1.55
            height = 1
        )