14
DEVS M&S Tutorial with eclipse IDE Chungman Seo [email protected]

DEVS M&S Tutorial with eclipse IDE Chungman Seo [email protected]

Embed Size (px)

Citation preview

Page 1: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

DEVS M&S Tutorial with eclipse IDE

Chungman [email protected]

Page 2: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Environment to develop DEVS M&S Integration Development Environment

Eclipse : www.eclipse.org/downloads NetBeans : www.netbeans.org Jbuilder : http://www.codegear.com/products/jbuilder

Required library Java SDK (1.6) : http://java.sun.com/javase/downloads/in

dex.jsp coreDEVSJAVA3.1 : class home page

Source files gpt.zip : class home page

Page 3: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Install an eclipse IDE

Download eclipse IDE for java Unzip the file Click an execution file : eclipse.exe

Page 4: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Create workspace

Set workspace

Page 5: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Welcom page

Get some information from a welcome page Overview Tutorials Samples What’s new

Page 6: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Make a new project

Click file menu Go to new Click java project Enter a project name

DEVSTutorial Click the finish button

Page 7: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Create Helloworld java

Click the right of mouse on src folder

Go to new-class Type the class name

Helloworld Click finish button Write contents on the H

elloworld.java Run the Helloworld.java

Page 8: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Create lib folder in the project

Click the project name Click right button of

the mouse Go to new Go to folder and click it

Type a name of folder Lib

Click the finish to create a lib folder under the project

Page 9: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Import files into the lib folder

Click the right of the mouse

Select import Click General and

click File System Search a library file

in the hard drivers Click finish button to

import the library into lib folder

Page 10: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Link library files in the project

Click mouse right button on the project

Go to properties menu and click it

Go to java builder path and click a Library tab

Click Add Jars Select jar files and click

OK on Jar selection Click OK on Properties f

or DEVSTutorial

Page 11: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Add DEVS models into src folder

Click src folder and click the right of mouse

Select import as we did on the lib folder

Page 12: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Simulate DEVS model using coordinator Create a coordinator

instance in the top coupled model

Add coupled model into the coordinator

Initialize the coordinator

Call a simulation function in the coordinator

Page 13: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Simulate DEVS model using SimView

Click the right of mouse Select run as – run conf

igurations Click search button on r

un configurations window

Select simView.SimView Click run on run configur

ations

Page 14: DEVS M&S Tutorial with eclipse IDE Chungman Seo cseo@email.arizona.edu

Configure the SimView

Click configure button Type a path to classes

bin Type a path to source

src Type package name

gpt Click OK Select a package to gpt Select a model

Efp