Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyAmak - IHM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMAC
AMAK
Python
PyAMAK
pyAmak - IHM
Commits
dec394be
Commit
dec394be
authored
4 years ago
by
Jdrezen
Browse files
Options
Downloads
Patches
Plain Diff
Suppression du amas
parent
c2041f5c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyAmakIHM/classes/amas.py
+0
-31
0 additions, 31 deletions
pyAmakIHM/classes/amas.py
with
0 additions
and
31 deletions
pyAmakIHM/classes/amas.py
deleted
100644 → 0
+
0
−
31
View file @
c2041f5c
from
time
import
sleep
class
Amas
:
def
__init__
(
self
):
self
.
agents
=
[]
self
.
sleep
=
1
self
.
__observer
=
None
def
attach
(
self
,
observer
):
self
.
__observer
=
observer
def
notifyObserver
(
self
,
value
):
self
.
__observer
.
updateCycle
(
value
)
def
add_agent
(
self
,
name
):
self
.
agents
.
append
(
name
)
def
remove_agent
(
self
):
del
self
.
agents
[
len
(
self
.
agents
)
-
1
]
def
reset
(
self
):
self
.
agents
=
[]
def
set_speed
(
self
,
value
):
self
.
sleep
=
value
def
cycle
(
self
):
while
(
True
):
for
i
in
range
(
len
(
self
.
agents
)):
print
(
'
Je suis le numéro %d
'
%
i
)
sleep
(
10
/
self
.
sleep
)
self
.
notifyObserver
(
self
.
sleep
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment