diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..1ac877a --- /dev/null +++ b/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.metadata/.lock b/.metadata/.lock new file mode 100644 index 0000000..e69de29 diff --git a/.metadata/.log b/.metadata/.log new file mode 100644 index 0000000..935b032 --- /dev/null +++ b/.metadata/.log @@ -0,0 +1,20 @@ +!SESSION 2024-12-03 10:22:05.583 ----------------------------------------------- +eclipse.buildId=4.33.0.20240905-0613 +java.version=23.0.1 +java.vendor=Eclipse Adoptium +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR +Framework arguments: -product org.eclipse.epp.package.java.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product + +!ENTRY ch.qos.logback.classic 1 0 2024-12-03 10:22:07.641 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY ch.qos.logback.classic 1 0 2024-12-03 10:22:17.016 +!MESSAGE Logback config file: C:\Users\droto\eclipse-workspace\CancerEvolutionSimulation\.metadata\.plugins\org.eclipse.m2e.logback\logback.2.6.1.20240411-1122.xml + +!ENTRY org.eclipse.egit.ui 2 0 2024-12-03 10:22:23.802 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\droto'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. diff --git a/.metadata/.mylyn/.taskListIndex/segments_1 b/.metadata/.mylyn/.taskListIndex/segments_1 new file mode 100644 index 0000000..74bb581 Binary files /dev/null and b/.metadata/.mylyn/.taskListIndex/segments_1 differ diff --git a/.metadata/.mylyn/.taskListIndex/write.lock b/.metadata/.mylyn/.taskListIndex/write.lock new file mode 100644 index 0000000..e69de29 diff --git a/.metadata/.mylyn/repositories.xml.zip b/.metadata/.mylyn/repositories.xml.zip new file mode 100644 index 0000000..1652d46 Binary files /dev/null and b/.metadata/.mylyn/repositories.xml.zip differ diff --git a/.metadata/.mylyn/tasks.xml.zip b/.metadata/.mylyn/tasks.xml.zip new file mode 100644 index 0000000..1da22c3 Binary files /dev/null and b/.metadata/.mylyn/tasks.xml.zip differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location new file mode 100644 index 0000000..8e163fb Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version new file mode 100644 index 0000000..25cb955 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index new file mode 100644 index 0000000..d237251 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version new file mode 100644 index 0000000..6b2aaa7 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree new file mode 100644 index 0000000..a43b676 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources new file mode 100644 index 0000000..a55ee7d Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..30841eb --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding=UTF-8 +version=1 diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000..c5f59ce --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.ui.formatterprofiles.version=23 +spelling_locale_initialized=true +typefilter_migrated_2=true +useAnnotationsPrefPage=true +useQuickDiffPrefPage=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jsch.core.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jsch.core.prefs new file mode 100644 index 0000000..d56c53f --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jsch.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jsch.core.hasChangedDefaultWin32SshHome=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs new file mode 100644 index 0000000..67b1d96 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.m2e.discovery.pref.projects= diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs new file mode 100644 index 0000000..43e97e4 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +mylyn.attention.migrated=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs new file mode 100644 index 0000000..8d462a6 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs new file mode 100644 index 0000000..2b60c21 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +migrated.task.repositories.secure.store=true +org.eclipse.mylyn.tasks.ui.filters.nonmatching=true +org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true +org.eclipse.mylyn.tasks.ui.welcome.message=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs new file mode 100644 index 0000000..6af36bc --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +platformState=903991084977397 +quickStart=false +tipsAndTricks=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs new file mode 100644 index 0000000..08076f2 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +showIntro=false diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs new file mode 100644 index 0000000..7e380fb --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs @@ -0,0 +1,12 @@ +//org.eclipse.ui.commands/state/org.eclipse.ui.navigator.resources.nested.changeProjectPresentation/org.eclipse.ui.commands.radioState=false +PLUGINS_NOT_ACTIVATED_ON_STARTUP=;org.eclipse.m2e.discovery; +eclipse.preferences.version=1 +org.eclipse.ui.workbench.ACTIVE_NOFOCUS_TAB_BG_END=41,41,41 +org.eclipse.ui.workbench.ACTIVE_NOFOCUS_TAB_BG_START=43,44,45 +org.eclipse.ui.workbench.ACTIVE_NOFOCUS_TAB_TEXT_COLOR=204,204,204 +org.eclipse.ui.workbench.ACTIVE_TAB_BG_END=41,41,41 +org.eclipse.ui.workbench.ACTIVE_TAB_BG_START=43,44,45 +org.eclipse.ui.workbench.ACTIVE_TAB_TEXT_COLOR=221,221,221 +org.eclipse.ui.workbench.INACTIVE_TAB_BG_END=49,53,56 +org.eclipse.ui.workbench.INACTIVE_TAB_BG_START=59,64,66 +org.eclipse.ui.workbench.INACTIVE_TAB_TEXT_COLOR=187,187,187 diff --git a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi new file mode 100644 index 0000000..9940307 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -0,0 +1,2425 @@ + + + + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration + + + + + + + + topLevel + shellMaximized + + + + + persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation + persp.actionSet:org.eclipse.ui.cheatsheets.actionSet + persp.actionSet:org.eclipse.search.searchActionSet + persp.actionSet:org.eclipse.text.quicksearch.actionSet + persp.actionSet:org.eclipse.ui.edit.text.actionSet.annotationNavigation + persp.actionSet:org.eclipse.ui.edit.text.actionSet.navigation + persp.actionSet:org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo + persp.actionSet:org.eclipse.ui.externaltools.ExternalToolsSet + persp.actionSet:org.eclipse.ui.actionSet.keyBindings + persp.actionSet:org.eclipse.ui.actionSet.openFiles + persp.actionSet:org.eclipse.debug.ui.launchActionSet + persp.actionSet:org.eclipse.jdt.ui.JavaActionSet + persp.actionSet:org.eclipse.jdt.ui.JavaElementCreationActionSet + persp.actionSet:org.eclipse.ui.NavigateActionSet + persp.viewSC:org.eclipse.jdt.ui.PackageExplorer + persp.viewSC:org.eclipse.jdt.ui.TypeHierarchy + persp.viewSC:org.eclipse.jdt.ui.SourceView + persp.viewSC:org.eclipse.jdt.ui.JavadocView + persp.viewSC:org.eclipse.search.ui.views.SearchView + persp.viewSC:org.eclipse.ui.console.ConsoleView + persp.viewSC:org.eclipse.ui.views.ContentOutline + persp.viewSC:org.eclipse.ui.views.ProblemView + persp.viewSC:org.eclipse.ui.views.TaskList + persp.viewSC:org.eclipse.ui.views.ProgressView + persp.viewSC:org.eclipse.ui.navigator.ProjectExplorer + persp.viewSC:org.eclipse.ui.texteditor.TemplatesView + persp.viewSC:org.eclipse.pde.runtime.LogView + persp.newWizSC:org.eclipse.jdt.ui.wizards.JavaProjectWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewPackageCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewClassCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewEnumCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewRecordCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard + persp.newWizSC:org.eclipse.ui.wizards.new.folder + persp.newWizSC:org.eclipse.ui.wizards.new.file + persp.newWizSC:org.eclipse.ui.editors.wizards.UntitledTextFileWizard + persp.perspSC:org.eclipse.jdt.ui.JavaBrowsingPerspective + persp.perspSC:org.eclipse.debug.ui.DebugPerspective + persp.editorOnboardingImageUri:platform:/plugin/org.eclipse.jdt.ui/$nl$/icons/full/onboarding_jperspective.png + persp.editorOnboardingText:Open a file or drop files here to open them. + persp.showIn:org.eclipse.jdt.ui.PackageExplorer + persp.showIn:org.eclipse.team.ui.GenericHistoryView + persp.showIn:org.eclipse.ui.navigator.ProjectExplorer + persp.editorOnboardingCommand:Find Actions$$$Ctrl+3 + persp.editorOnboardingCommand:Show Key Assist$$$Ctrl+Shift+L + persp.editorOnboardingCommand:New$$$Ctrl+N + persp.editorOnboardingCommand:Open Type$$$Ctrl+Shift+T + persp.viewSC:org.eclipse.mylyn.tasks.ui.views.tasks + persp.newWizSC:org.eclipse.mylyn.tasks.ui.wizards.new.repository.task + persp.actionSet:org.eclipse.debug.ui.breakpointActionSet + persp.actionSet:org.eclipse.jdt.debug.ui.JDTDebugActionSet + persp.showIn:org.eclipse.egit.ui.RepositoriesView + persp.newWizSC:org.eclipse.m2e.core.wizards.Maven2ProjectWizard + persp.actionSet:org.eclipse.eclemma.ui.CoverageActionSet + persp.showIn:org.eclipse.eclemma.ui.CoverageView + persp.viewSC:org.eclipse.tm.terminal.view.ui.TerminalsView + persp.showIn:org.eclipse.tm.terminal.view.ui.TerminalsView + persp.viewSC:org.eclipse.jdt.bcoview.views.BytecodeOutlineView + persp.newWizSC:org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizard + persp.actionSet:org.eclipse.jdt.junit.JUnitActionSet + persp.viewSC:org.eclipse.ant.ui.views.AntView + + + + org.eclipse.e4.primaryNavigationStack + active + + View + categoryTag:Java + + + View + categoryTag:Java + + + View + categoryTag:General + + + View + categoryTag:Java + + + + + View + categoryTag:Git + + + + + + + + + + View + categoryTag:Mylyn + + + + org.eclipse.e4.secondaryNavigationStack + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:Java + + + View + categoryTag:Ant + + + + + + org.eclipse.e4.secondaryDataStack + + View + categoryTag:General + + + View + categoryTag:Java + + + View + categoryTag:Java + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:Terminal + + + + + + + + + View + categoryTag:Help + + + View + categoryTag:General + + + View + categoryTag:Help + + + + + + + View + categoryTag:Help + + + + + + View + categoryTag:General + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Help + + + + EditorStack + org.eclipse.e4.primaryDataStack + + + + + + + View + categoryTag:Java + active + activeOnClose + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + + View + categoryTag:General + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + + View + categoryTag:General + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + + View + categoryTag:Mylyn + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Git + + + + + View + categoryTag:Terminal + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Ant + + + + toolbarSeparator + + + + Draggable + + + + toolbarSeparator + + + + Draggable + + + + + toolbarSeparator + + + + Draggable + + + Draggable + + + Draggable + + + toolbarSeparator + + + + Draggable + + + + toolbarSeparator + + + + toolbarSeparator + + + + Draggable + + + stretch + SHOW_RESTORE_MENU + + + Draggable + HIDEABLE + SHOW_RESTORE_MENU + + + + + stretch + + + Draggable + + + Draggable + + + + + TrimStack + Draggable + + + + + + + + + + + + + + + + + + + + + + platform:win32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + platform:win32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Editor + removeOnHide + + + + + View + categoryTag:Ant + + + + + View + categoryTag:Gradle + + + + + View + categoryTag:Gradle + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + View + categoryTag:Debug + + + + + View + categoryTag:Java + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + NoRestore + + + + + View + categoryTag:Git + + + + + View + categoryTag:Help + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Language Servers + + + + + View + categoryTag:Language Servers + + + + + View + categoryTag:Language Servers + + + + + View + categoryTag:Maven + + + + + View + categoryTag:Maven + + + + + View + categoryTag:Maven + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Oomph + + + + + View + categoryTag:General + + + + + View + categoryTag:Version Control (Team) + + + + + View + categoryTag:Version Control (Team) + + + View + categoryTag:Help + + + + + View + categoryTag:Terminal + + + + + View + categoryTag:Other + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:Help + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + glue + move_after:PerspectiveSpacer + SHOW_RESTORE_MENU + + + move_after:Spacer Glue + HIDEABLE + SHOW_RESTORE_MENU + + + glue + move_after:SearchField + SHOW_RESTORE_MENU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.project b/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.project new file mode 100644 index 0000000..3c10856 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.project @@ -0,0 +1,11 @@ + + + .org.eclipse.egit.core.cmp + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.settings/org.eclipse.core.resources.prefs b/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache new file mode 100644 index 0000000..593f470 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache new file mode 100644 index 0000000..593f470 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt b/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt new file mode 100644 index 0000000..8586397 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt @@ -0,0 +1 @@ +java \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache new file mode 100644 index 0000000..593f470 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat new file mode 100644 index 0000000..0edae4b Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml new file mode 100644 index 0000000..a4ee3cb --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml new file mode 100644 index 0000000..9e390f5 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml new file mode 100644 index 0000000..8c4a613 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml @@ -0,0 +1,10 @@ + +
+
+ + + + + +
+
diff --git a/.metadata/.plugins/org.eclipse.m2e.core/workspaceState.ser b/.metadata/.plugins/org.eclipse.m2e.core/workspaceState.ser new file mode 100644 index 0000000..abbf8e5 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.m2e.core/workspaceState.ser differ diff --git a/.metadata/.plugins/org.eclipse.m2e.logback/0.log b/.metadata/.plugins/org.eclipse.m2e.logback/0.log new file mode 100644 index 0000000..5bf287c --- /dev/null +++ b/.metadata/.plugins/org.eclipse.m2e.logback/0.log @@ -0,0 +1 @@ +2024-12-03 10:22:23,589 [Worker-6: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. diff --git a/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.6.1.20240411-1122.xml b/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.6.1.20240411-1122.xml new file mode 100644 index 0000000..9effde7 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.6.1.20240411-1122.xml @@ -0,0 +1,41 @@ + + + + %date [%thread] %-5level %logger{35} - %msg%n + + + ${org.eclipse.m2e.log.console.threshold:-OFF} + + + + + ${org.eclipse.m2e.log.dir}/0.log + + ${org.eclipse.m2e.log.dir}/%i.log + 1 + 10 + + + 10MB + + + %date [%thread] %-5level %logger{35} - %msg%n + + + + + + WARN + + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.mylyn.github.ui/avatars.ser b/.metadata/.plugins/org.eclipse.mylyn.github.ui/avatars.ser new file mode 100644 index 0000000..1e9a069 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.mylyn.github.ui/avatars.ser differ diff --git a/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup b/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup new file mode 100644 index 0000000..1f73e14 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup @@ -0,0 +1,6 @@ + + diff --git a/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml b/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml new file mode 100644 index 0000000..5ca0b77 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml @@ -0,0 +1,3 @@ + +
+
diff --git a/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml new file mode 100644 index 0000000..c057313 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml @@ -0,0 +1,19 @@ + +
+
+ + + + + + + +
+ + + + + +
+
+
diff --git a/.metadata/.plugins/org.eclipse.ui.intro/introstate b/.metadata/.plugins/org.eclipse.ui.intro/introstate new file mode 100644 index 0000000..02f134f --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.intro/introstate @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml new file mode 100644 index 0000000..ca06d3d --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml @@ -0,0 +1,12 @@ + +
+
+
+ + + + + +
+
+
diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml new file mode 100644 index 0000000..1cf2727 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.metadata/version.ini b/.metadata/version.ini new file mode 100644 index 0000000..b640998 --- /dev/null +++ b/.metadata/version.ini @@ -0,0 +1,3 @@ +#Tue Dec 03 10:22:16 GMT-03:00 2024 +org.eclipse.core.runtime=2 +org.eclipse.platform=4.33.0.v20240903-0240 diff --git a/.project b/.project new file mode 100644 index 0000000..5e0dea4 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + MultiAgentTests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..679432a --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=22 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=22 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=22 diff --git a/APDescription.txt b/APDescription.txt new file mode 100644 index 0000000..2f6fcad --- /dev/null +++ b/APDescription.txt @@ -0,0 +1 @@ +( ap-description :name "172.28.144.1:1099/JADE" :ap-services (set ( ap-service :name fipa.mts.mtp.http.std :type fipa.mts.mtp.http.std :addresses (sequence http://Kaua:7778/acc)))) diff --git a/MTPs-Main-Container.txt b/MTPs-Main-Container.txt new file mode 100644 index 0000000..5c8cedb --- /dev/null +++ b/MTPs-Main-Container.txt @@ -0,0 +1 @@ +http://Kaua:7778/acc diff --git a/bin/Agent/CellAgent$CellApoptoseBehaviour.class b/bin/Agent/CellAgent$CellApoptoseBehaviour.class new file mode 100644 index 0000000..312ecf2 Binary files /dev/null and b/bin/Agent/CellAgent$CellApoptoseBehaviour.class differ diff --git a/bin/Agent/CellAgent$CellDivisionBehaviour.class b/bin/Agent/CellAgent$CellDivisionBehaviour.class new file mode 100644 index 0000000..ab4bd13 Binary files /dev/null and b/bin/Agent/CellAgent$CellDivisionBehaviour.class differ diff --git a/bin/Agent/CellAgent$CellInfo.class b/bin/Agent/CellAgent$CellInfo.class new file mode 100644 index 0000000..6144784 Binary files /dev/null and b/bin/Agent/CellAgent$CellInfo.class differ diff --git a/bin/Agent/CellAgent$CellRepairBehaviour.class b/bin/Agent/CellAgent$CellRepairBehaviour.class new file mode 100644 index 0000000..48e4f8e Binary files /dev/null and b/bin/Agent/CellAgent$CellRepairBehaviour.class differ diff --git a/bin/Agent/CellAgent.class b/bin/Agent/CellAgent.class new file mode 100644 index 0000000..49915fd Binary files /dev/null and b/bin/Agent/CellAgent.class differ diff --git a/bin/Agent/commons-codec-1.3.jar b/bin/Agent/commons-codec-1.3.jar new file mode 100644 index 0000000..957b675 Binary files /dev/null and b/bin/Agent/commons-codec-1.3.jar differ diff --git a/bin/Agent/jade.jar b/bin/Agent/jade.jar new file mode 100644 index 0000000..eba8181 Binary files /dev/null and b/bin/Agent/jade.jar differ diff --git a/bin/CellTypes/CancerousCell.class b/bin/CellTypes/CancerousCell.class new file mode 100644 index 0000000..1776a2b Binary files /dev/null and b/bin/CellTypes/CancerousCell.class differ diff --git a/bin/CellTypes/CellType.class b/bin/CellTypes/CellType.class new file mode 100644 index 0000000..4c479d5 Binary files /dev/null and b/bin/CellTypes/CellType.class differ diff --git a/bin/CellTypes/DamagedCell.class b/bin/CellTypes/DamagedCell.class new file mode 100644 index 0000000..24c6515 Binary files /dev/null and b/bin/CellTypes/DamagedCell.class differ diff --git a/bin/CellTypes/ECellState.class b/bin/CellTypes/ECellState.class new file mode 100644 index 0000000..a000582 Binary files /dev/null and b/bin/CellTypes/ECellState.class differ diff --git a/bin/CellTypes/NormalCell.class b/bin/CellTypes/NormalCell.class new file mode 100644 index 0000000..2dd9dc5 Binary files /dev/null and b/bin/CellTypes/NormalCell.class differ diff --git a/bin/CellTypes/PreCancerousCell.class b/bin/CellTypes/PreCancerousCell.class new file mode 100644 index 0000000..8439c7f Binary files /dev/null and b/bin/CellTypes/PreCancerousCell.class differ diff --git a/src/Agent/CellAgent.java b/src/Agent/CellAgent.java new file mode 100644 index 0000000..a0bf1b3 --- /dev/null +++ b/src/Agent/CellAgent.java @@ -0,0 +1,199 @@ +package Agent; + +import jade.core.Agent; +import jade.core.behaviours.TickerBehaviour; +import java.util.Random; +import java.util.concurrent.ConcurrentLinkedQueue; + +import CellTypes.CancerousCell; +import CellTypes.CellType; +import CellTypes.DamagedCell; +import CellTypes.ECellState; +import CellTypes.NormalCell; +import CellTypes.PreCancerousCell; + + +public class CellAgent extends Agent { + private static final long serialVersionUID = 1L; + private int age = 1; // Idade da célula + // geracao, predisposicao inicial + private int generation = 0;; + private CellType celltype = new NormalCell(generation,10);; + private static int agentCount = 0; // Contador de agentes ativos + private static final int MAX_AGENTS = 100; // Limite máximo de agentes + private static final ConcurrentLinkedQueue cellRegistry = new ConcurrentLinkedQueue<>(); + + @Override + protected void setup() { + final Random random = new Random(); + + // Recuperar parâmetros de inicialização + Object[] args = getArguments(); + if (args != null && args.length > 0) { + try { + // Converter o argumento para o enum + ECellState cellType = ECellState.valueOf(args[0].toString()); + generation = Integer.parseInt(args[1].toString()); + + System.out.println("Celltype: "+ cellType); + + // Switch com base no enum + switch (cellType) { + case Normal: + celltype = new NormalCell(generation,10); + case Damaged: + celltype = new DamagedCell(generation,30); + break; + case PreCancerous: + celltype = new PreCancerousCell(generation,50); + break; + case Cancerous: + celltype = new CancerousCell(generation,90); + break; + default: + celltype = new NormalCell(generation,10); + break; + } + } catch (IllegalArgumentException e) { + System.err.println("Valor inválido para ECellState: " + args[0]); + } + } + + // Adicionar ao registro global + synchronized (cellRegistry) { + cellRegistry.add(new CellInfo(getLocalName(), celltype.getGeneration())); + agentCount++; + } + + System.out.println("Agente célula iniciado: " + getLocalName()); + System.out.println("Predisposição genética: " + celltype.getGeneticPredisposition() + "%"); + System.out.println("Status da célula: " + celltype); + + // Adicionar comportamentos + addBehaviour(new CellDivisionBehaviour(this, random.nextInt(10) * 1000 + 1)); + addBehaviour(new CellApoptoseBehaviour(this, random.nextInt(99) * 1000 + 1)); + addBehaviour(new CellRepairBehaviour(this, random.nextInt(99) * 1000 + 1)); + } + + @Override + protected void takeDown() { + synchronized (cellRegistry) { + cellRegistry.removeIf(cell -> cell.name.equals(getLocalName())); + agentCount--; + } + System.out.println("TakeDown : Agente célula encerrado: " + getLocalName() + ". Total de agentes ativos: " + agentCount); + } + + private class CellDivisionBehaviour extends TickerBehaviour { + private static final long serialVersionUID = 1L; + + public CellDivisionBehaviour(Agent a, long interval) { + super(a, (celltype.getcellState() == ECellState.Cancerous) ? Math.max(interval / 2, 500) : interval); + } + + @Override + protected void onTick() { + try { + synchronized (cellRegistry) { + if (agentCount + 2 > MAX_AGENTS) { + System.out.println("Removendo 50% dos agentes!"); + System.out.println("Removendo 50% dos agentes!"); + System.out.println("Removendo 50% dos agentes!"); + int cellsToRemove = MAX_AGENTS/2; + for (int i = 0; i < cellsToRemove; i++) { + CellInfo oldestCell = cellRegistry.poll(); + if (oldestCell != null) { + jade.wrapper.AgentController agent = getContainerController().getAgent(oldestCell.name); + if (agent != null) { + agent.kill(); + agentCount--; + } + + } + } + } + } + + // Criação de novas células + if (agentCount + 2 <= MAX_AGENTS) { + jade.wrapper.AgentContainer container = getContainerController(); + + // Nomeia os agentes filhos + String newAgent1Name = celltype.getGeneration() + 1 + "-" + getLocalName().substring(2) + "0"; + String newAgent2Name = celltype.getGeneration() + 1 + "-" + getLocalName().substring(2) + "1"; + + // Cria os agentes filhos + jade.wrapper.AgentController newAgent1 = container.createNewAgent( + newAgent1Name, + "Agent.CellAgent", + new Object[]{celltype.russianRoulete(),generation+1} + ); + jade.wrapper.AgentController newAgent2 = container.createNewAgent( + newAgent2Name, + "Agent.CellAgent", + new Object[]{celltype.russianRoulete(),generation+1} + ); + + // Registra os agentes filhos e incrementa contador + synchronized (cellRegistry) { + cellRegistry.add(new CellInfo(newAgent1Name, celltype.getGeneration() + 1)); + cellRegistry.add(new CellInfo(newAgent2Name, celltype.getGeneration() + 1)); + agentCount += 1; + + } + + newAgent1.start(); + newAgent2.start(); + + doDelete(); + } else { + System.out.println("Limite de agentes alcançado. Divisão não realizada por " + getLocalName()); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + private class CellApoptoseBehaviour extends TickerBehaviour { + + private static final long serialVersionUID = 1L; + private Agent agent; + + public CellApoptoseBehaviour(Agent a, long interval) { + super(a, interval); + agent = a; + } + + @Override + protected void onTick() { + if(celltype.apoptose(agent)) + agentCount--; + } + } + + private class CellRepairBehaviour extends TickerBehaviour { + private static final long serialVersionUID = 1L; + private Agent agent; + public CellRepairBehaviour(Agent a, long interval) { + super(a, interval); + agent = a; + } + + @Override + protected void onTick() { + celltype.repair(agent); + } + } + + + private static class CellInfo { + String name; + int generation; + + CellInfo(String name, int generation) { + this.name = name; + this.generation = generation; + } + } +} \ No newline at end of file diff --git a/src/Agent/commons-codec-1.3.jar b/src/Agent/commons-codec-1.3.jar new file mode 100644 index 0000000..957b675 Binary files /dev/null and b/src/Agent/commons-codec-1.3.jar differ diff --git a/src/Agent/jade.jar b/src/Agent/jade.jar new file mode 100644 index 0000000..eba8181 Binary files /dev/null and b/src/Agent/jade.jar differ diff --git a/src/CellTypes/CancerousCell.java b/src/CellTypes/CancerousCell.java new file mode 100644 index 0000000..5c223ce --- /dev/null +++ b/src/CellTypes/CancerousCell.java @@ -0,0 +1,26 @@ +package CellTypes; + +import jade.core.Agent; + +public class CancerousCell extends CellType { + + public CancerousCell(int generation, int geneticPredisposition) { + super(generation, geneticPredisposition); + setcellState(ECellState.Cancerous); + } + + @Override + public void repair(Agent a) { + return; + } + + @Override + public ECellState russianRoulete() { + return this.getcellState(); + } + + @Override + public boolean apoptose(Agent a) { + return false; + } +} diff --git a/src/CellTypes/CellType.java b/src/CellTypes/CellType.java new file mode 100644 index 0000000..44184ee --- /dev/null +++ b/src/CellTypes/CellType.java @@ -0,0 +1,66 @@ +package CellTypes; + +import java.util.Random; + +import jade.core.Agent; + +public abstract class CellType { + protected ECellState cellState = ECellState.Normal; + protected int repairCapability = 0; + protected int geneticPredisposition = 10; + protected int generation = 0; + protected int apoptosePropetion = 1; + + public CellType(int generation,int geneticPredisposition) { + this.generation = generation; + this.geneticPredisposition = geneticPredisposition; + } + + public boolean apoptose(Agent a) { + final Random random = new Random(); + int randomNumber = random.nextInt(99) + 1; + if (randomNumber <= apoptosePropetion) { + System.out.println(a.getLocalName() + " realizou APOPTOSE!"); + a.doDelete(); + return true; + } + return false; + } + + public void repair(Agent a){ + return; + } + + // generation == 0 + public ECellState russianRoulete() { + final Random random = new Random(); + int randomNumber = random.nextInt(99) + 1; + System.out.println(generation + " "+ geneticPredisposition); + if(generation > 5 && randomNumber <= geneticPredisposition) { + System.out.println("Evoluiu"); + System.out.println("Evoluiu"); + System.out.println("Evoluiu"); + + return ECellState.Damaged; + } + return cellState; + } + + public ECellState getcellState() { + return cellState; + } + + public int getGeneticPredisposition() { + return geneticPredisposition; + } + + public int getGeneration() { + return generation; + } + + protected void setcellState(ECellState state) { + cellState = state; + } + + +} diff --git a/src/CellTypes/DamagedCell.java b/src/CellTypes/DamagedCell.java new file mode 100644 index 0000000..d40cb58 --- /dev/null +++ b/src/CellTypes/DamagedCell.java @@ -0,0 +1,35 @@ +package CellTypes; + +import java.util.Random; + +import jade.core.Agent; + +public class DamagedCell extends CellType{ + + public DamagedCell(int generation, int geneticPredisposition) { + super(generation, geneticPredisposition); + + setcellState(ECellState.Damaged); + } + + @Override + public void repair(Agent a) { + final Random random = new Random(); + int randomNumber = random.nextInt(99) + 1; + if (randomNumber <= repairCapability) { + setcellState(ECellState.Normal); + System.out.println(a.getLocalName() + " realizou REPARO!"); + } + } + + @Override + public ECellState russianRoulete() { + final Random random = new Random(); + int randomNumber = random.nextInt(99) + 1; + if(generation > 5 && randomNumber <= geneticPredisposition) + return ECellState.PreCancerous; + return this.getcellState(); + } + + +} diff --git a/src/CellTypes/ECellState.java b/src/CellTypes/ECellState.java new file mode 100644 index 0000000..538e9a1 --- /dev/null +++ b/src/CellTypes/ECellState.java @@ -0,0 +1,8 @@ +package CellTypes; + +public enum ECellState { + Normal, + Damaged, + PreCancerous, + Cancerous +} diff --git a/src/CellTypes/NormalCell.java b/src/CellTypes/NormalCell.java new file mode 100644 index 0000000..297ae4d --- /dev/null +++ b/src/CellTypes/NormalCell.java @@ -0,0 +1,9 @@ +package CellTypes; + +public class NormalCell extends CellType{ + + public NormalCell(int generation, int geneticPredisposition) { + super(generation, geneticPredisposition); + } + +} diff --git a/src/CellTypes/PreCancerousCell.java b/src/CellTypes/PreCancerousCell.java new file mode 100644 index 0000000..e8a97e2 --- /dev/null +++ b/src/CellTypes/PreCancerousCell.java @@ -0,0 +1,34 @@ +package CellTypes; + +import java.util.Random; + +import jade.core.Agent; + +public class PreCancerousCell extends CellType { + + public PreCancerousCell(int generation, int geneticPredisposition) { + super(generation, geneticPredisposition); + setcellState(ECellState.PreCancerous); + } + + @Override + public void repair(Agent a) { + final Random random = new Random(); + int randomNumber = random.nextInt(99) + 1; + if (randomNumber <= repairCapability) { + setcellState(ECellState.Normal); + System.out.println(a.getLocalName() + " realizou REPARO!"); + } + } + + @Override + public ECellState russianRoulete() { + final Random random = new Random(); + int randomNumber = random.nextInt(99) + 1; + if(generation > 10 && randomNumber <= geneticPredisposition / 2) + return ECellState.Cancerous; + return this.getcellState(); + } + + +}