SlideShare a Scribd company logo
Building the CarryDrop simulation in Eclipse Creating a new project with existing code from John Murphy’s RePast tutorial
Preparation For these slides you will need: The Eclipse IDE installed and running. Access to the source code from John Murphy’s RePast  tutorial , step  14 .
Creating a new project Start Eclipse Go to File -> Project In the New Project dialog box select “Java Project” and hit the Next button In the next screen, name the project and choose a location. Leave the default setting for the project layout.
Creating a new project cont. Add RePast to the build path under the “Libraries” tab. Click the “Finish” button. Please refer to  Installing Repast in the Eclipse IDE  under section IV.B of the RePast Study Group  homepage  for details on adding the RePast jar to a project build path.
Creating a new class Now that we have the project established we can add the first new class. Go to File->New->Class.  A New Class window should appear. For the Package, enter “demo” For Name, enter CarryDropModel. Leave all other settings at default values. Hit the “Finish” button.
The first class: CarryDropModel Go to step 14 of Murphy’s tutorial. In your browser, select all the Java code for the CarryDropModel class and go to Edit->Copy In Eclipse, select all the pre-written code in the new CarryDropModel
The first class: CarryDropModel Go to Edit->Paste. The code from the tutorial webpage should have now replaced the pre-written code.
Adding the other classes Save the CarryDropModel in Eclipse and it is done Repeat the previous steps to create new classes, copy code from the tutorial, and paste it in Eclipse for both CarryDropAgent and CarryDropSpace. The CarryDrop simulation is now in Eclipse and ready to be run.
The CaryyDrop simulation To start the simulation, go to Run->Run… In the Run dialog box CarryDropModel,  make sure the Project name is correct  the Main Class box has demo.CarryDropModel Hit the “Run” button
The CarryDrop Simulation RePast will start Press the Initialize button The CarryDropModel window will appear with the initialized money space.

More Related Content

PPT
How to write c program with code blocks
PPT
How to write c programme
PDF
How to work with code blocks
ODP
Verbatim experience
PDF
Java flyer final_2014
PDF
Ic In Large Global Organizations
PPT
7 第七章 学习与进化模型ann
PDF
Lean Inventive Systems Thinking - Why, What and How
How to write c program with code blocks
How to write c programme
How to work with code blocks
Verbatim experience
Java flyer final_2014
Ic In Large Global Organizations
7 第七章 学习与进化模型ann
Lean Inventive Systems Thinking - Why, What and How

Similar to 6.1.2 用eclipse环境调试一步一步学repast操作 (20)

PDF
Compiling With Eclipse
PDF
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
PDF
Java Intro: Unit1. Hello World
PDF
Supplement J Eclipse
 
DOCX
Page 8 of 83.Tutorial Get Started with Eclipse in the Compute.docx
DOCX
Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docx
PDF
Android programming-basics
PPTX
03 eclipse basics & hello world
PPTX
Intro to programing with java-lecture 1
DOCX
Unit2 java
PDF
Chapter 3
PPT
Hello world pascal tutorial
DOCX
Prg 218 entire course
PDF
Supplement2d netbeans6
PDF
Supplement2d netbeans6
PDF
Oop c sharp_part_1
DOCX
Object Oriented Programming in Android Studio
PDF
‘Hello, world!’ application how to dockerize golang application
PDF
Hadoop Tutorial
Compiling With Eclipse
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Java Intro: Unit1. Hello World
Supplement J Eclipse
 
Page 8 of 83.Tutorial Get Started with Eclipse in the Compute.docx
Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docx
Android programming-basics
03 eclipse basics & hello world
Intro to programing with java-lecture 1
Unit2 java
Chapter 3
Hello world pascal tutorial
Prg 218 entire course
Supplement2d netbeans6
Supplement2d netbeans6
Oop c sharp_part_1
Object Oriented Programming in Android Studio
‘Hello, world!’ application how to dockerize golang application
Hadoop Tutorial
Ad

More from zhang shuren (13)

PPT
8.2第八章 win dynamo
PPT
8.1第八章系统动力学与dynamo模型
PPT
6.1.1一步一步学repast代码解释
PPT
4.2第四章 swarm代码剖析 可选补充课程
PPT
4.1第四章 多主体系统仿真的软件工具
PPT
3第三章 多主体模型与社会科学复杂性研究
PPT
2第二章 多主体模型与社会科学复杂性研究
PPTX
网络营销第4章 张树人
PPT
网络营销 第3章 张树人
PPT
网络营销 第1章 张树人
PPT
第4章 数据库管理
PPT
第2章 服务器管理
PPT
第10章 权限管理
8.2第八章 win dynamo
8.1第八章系统动力学与dynamo模型
6.1.1一步一步学repast代码解释
4.2第四章 swarm代码剖析 可选补充课程
4.1第四章 多主体系统仿真的软件工具
3第三章 多主体模型与社会科学复杂性研究
2第二章 多主体模型与社会科学复杂性研究
网络营销第4章 张树人
网络营销 第3章 张树人
网络营销 第1章 张树人
第4章 数据库管理
第2章 服务器管理
第10章 权限管理
Ad

Recently uploaded (20)

DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
HVAC Specification 2024 according to central public works department
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PPTX
20th Century Theater, Methods, History.pptx
PDF
Empowerment Technology for Senior High School Guide
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PPTX
Computer Architecture Input Output Memory.pptx
PPTX
Introduction to Building Materials
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
Indian roads congress 037 - 2012 Flexible pavement
PPTX
TNA_Presentation-1-Final(SAVE)) (1).pptx
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
Trump Administration's workforce development strategy
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
HVAC Specification 2024 according to central public works department
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
20th Century Theater, Methods, History.pptx
Empowerment Technology for Senior High School Guide
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Computer Architecture Input Output Memory.pptx
Introduction to Building Materials
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Share_Module_2_Power_conflict_and_negotiation.pptx
Indian roads congress 037 - 2012 Flexible pavement
TNA_Presentation-1-Final(SAVE)) (1).pptx
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Trump Administration's workforce development strategy
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
A powerpoint presentation on the Revised K-10 Science Shaping Paper

6.1.2 用eclipse环境调试一步一步学repast操作

  • 1. Building the CarryDrop simulation in Eclipse Creating a new project with existing code from John Murphy’s RePast tutorial
  • 2. Preparation For these slides you will need: The Eclipse IDE installed and running. Access to the source code from John Murphy’s RePast tutorial , step 14 .
  • 3. Creating a new project Start Eclipse Go to File -> Project In the New Project dialog box select “Java Project” and hit the Next button In the next screen, name the project and choose a location. Leave the default setting for the project layout.
  • 4. Creating a new project cont. Add RePast to the build path under the “Libraries” tab. Click the “Finish” button. Please refer to Installing Repast in the Eclipse IDE under section IV.B of the RePast Study Group homepage for details on adding the RePast jar to a project build path.
  • 5. Creating a new class Now that we have the project established we can add the first new class. Go to File->New->Class. A New Class window should appear. For the Package, enter “demo” For Name, enter CarryDropModel. Leave all other settings at default values. Hit the “Finish” button.
  • 6. The first class: CarryDropModel Go to step 14 of Murphy’s tutorial. In your browser, select all the Java code for the CarryDropModel class and go to Edit->Copy In Eclipse, select all the pre-written code in the new CarryDropModel
  • 7. The first class: CarryDropModel Go to Edit->Paste. The code from the tutorial webpage should have now replaced the pre-written code.
  • 8. Adding the other classes Save the CarryDropModel in Eclipse and it is done Repeat the previous steps to create new classes, copy code from the tutorial, and paste it in Eclipse for both CarryDropAgent and CarryDropSpace. The CarryDrop simulation is now in Eclipse and ready to be run.
  • 9. The CaryyDrop simulation To start the simulation, go to Run->Run… In the Run dialog box CarryDropModel, make sure the Project name is correct the Main Class box has demo.CarryDropModel Hit the “Run” button
  • 10. The CarryDrop Simulation RePast will start Press the Initialize button The CarryDropModel window will appear with the initialized money space.