Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyAmak - noyau
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 - noyau
Commits
0c4f6a36
Commit
0c4f6a36
authored
4 years ago
by
shinedday
Browse files
Options
Downloads
Patches
Plain Diff
Add amasIHM
parent
850479ef
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pyAmakCore/classes/tools/amasIHM.py
+36
-0
36 additions, 0 deletions
pyAmakCore/classes/tools/amasIHM.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
37 additions
and
1 deletion
pyAmakCore/classes/tools/amasIHM.py
0 → 100644
+
36
−
0
View file @
0c4f6a36
"""
Amas class that need to be used for pyAmakIhm
"""
from
pyAmakCore.classes.amas
import
Amas
from
pyAmakCore.classes.environment
import
Environment
class
AmasIHM
(
Amas
):
"""
Convenient class to override while using pyAmakIHM
"""
def
__init__
(
self
,
environment
:
Environment
):
self
.
__observer
=
None
super
().
__init__
(
environment
)
def
get_Agents_Sorted
(
self
):
"""
sort agent by id
"""
agents
=
self
.
get_agents
()
agents
.
sort
(
key
=
lambda
x
:
x
.
get_id
())
return
agents
def
cycle
(
self
)
->
None
:
"""
override amas cycle, to update obsever after each cycle
"""
super
().
cycle
()
self
.
__observer
.
updateCycle
(
self
.
get_environment
(),
self
)
def
attach
(
self
,
observer
:
'
Controleur
'
)
->
None
:
"""
set observer pointer to observer
"""
self
.
__observer
=
observer
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
0c4f6a36
...
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
...
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
setup
(
setup
(
name
=
'
pyAmakCore
'
,
name
=
'
pyAmakCore
'
,
packages
=
find_packages
(),
packages
=
find_packages
(),
version
=
'
0.0.
3
'
,
version
=
'
0.0.
4
'
,
description
=
'
AmakFramework in python
'
,
description
=
'
AmakFramework in python
'
,
author
=
'
BE
'
,
author
=
'
BE
'
,
install_requires
=
[],
install_requires
=
[],
...
...
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