Giter Club home page Giter Club logo

cormas / cormas Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 23.0 14.31 MB

CORMAS (COmmon pool Ressources and Multi-Agent Simulations)

Home Page: http://cormas.cirad.fr/indexeng.htm

License: MIT License

Smalltalk 85.36% Dockerfile 0.03% NSIS 0.69% Batchfile 0.23% StringTemplate 13.69%
abm agent-based-modeling common-pool-ressources complex-systems hacktoberfest multi-agent multi-agent-simulation pharo pharo-smalltalk simulation-framework smalltalk

cormas's Introduction

CORMAS

CORMAS

COmmon pool Ressources and Multi-Agent Simulations
Explore the docs »

Report a defect | Request feature

CI Core CI Full Coverage Status Licence All Contributors Archived | swh:1:dir:7861db8c1b3c19b867c665d86a0b47a8770f1db0

Table of Contents

Description

This is an ongoing effort to port CORMAS to Pharo ecosystem.

Some documentation (to be cleaned and reorganized) about Cormas is available on the Wiki here: https://github.com/cormas/documentation

If you want to contribute to CORMAS please have a look to the contributing guide. Join us on the cormas-dev mailing-list: http://groups.google.com/group/cormas-dev

Installation

Standard Installation

  • Download a Pharo 9.0 image+VM depending of your platform: http://pharo.org/download
  • Load Cormas: Open Pharo 9.0 image then click anywhere to open the main menu. Choose Playground (Ctrl + OW or Cmd + OW) to execute the following script to install the latest stable version of Cormas (pre-v0.5). Paste the script below in Playground, select all then right-click and choose Do it (Ctrl+D or Cmd+D) to execute it:
EpMonitor disableDuring: [
    Metacello new
        onConflictUseLoaded;
        onWarningLog;
        repository: 'github://cormas/cormas:v0.8';
        baseline: 'Cormas';
        load ].

Use this script if you want the latest development version of Cormas:

EpMonitor disableDuring: [
    Metacello new
        onConflictUseLoaded;
        onWarningLog;
        repository: 'github://cormas/cormas';
        baseline: 'Cormas';
        load ].

All packages load into the Cormas-* package names:

Loading...

CLI Installation

Using Standard Unix CLI

You can install CORMAS through Unix command line. It works as follow:

mkdir mydir; cd mydir
curl https://get.pharo.org/90+vm | bash
./pharo Pharo.image eval "EpMonitor disableDuring: [
	Metacello new
		onConflictUseLoaded;
		onWarningLog;
		repository: 'github://cormas/cormas/';
		baseline: 'Cormas';
		load ]. 
Smalltalk snapshot: true andQuit: true"

Using PI

Make sure you have pi installed, and then execute:

pi install Cormas

Troubleshooting

There is from time to time, loading errors with github. If it happens, execute the following expression from Pharo:

| maxCount count |
maxCount := 3.
count := 1.
Transcript open.
[ count <= maxCount ] whileTrue: [ [
	^ Metacello new
		onWarningLog;
		repository: 'github://cormas/cormas/';
		baseline: 'Cormas';
		load
	]
	on: IceGenericError "Failed to connect to github.com: Interrupted system call"
	do: [ : ex |
		MetacelloNotification signal: String cr , ex description , String cr , 'RETRYING ', maxCount asString.
		(Delay forSeconds: 2) wait.
		ex retry
	].
	count := count + 1 ]

Please add an issue if the installation expression above does not work due to one of these known exceptions:

  • IceGenericError: Failed to connect to github.com: Interrupted system call.
  • IceGenericError: SecureTransport error: connection closed via error
  • IceGenericError: unexpected return value from ssl handshake -9806

Saving your image

As the loading process is rather slow, we recommend to save your image once the installation procedure has been successfully concluded. For that, select Save As... from the 'Pharo' menu:

SaveAs

Then write the name of your choice (ex: cormasPharo.im):

Loading...

Features

Work in progress

Documentation

Work in progress

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Oleksandr Zaitsev

💻 ⚠️

Serge Stinckwich

💻 ⚠️

Tomohiro Oda

💻 ⚠️

Etienne DELAY

💻 ⚠️

Hernán Morales Durand

💻 ⚠️

Pierre Bommel

💻

Christophe Le Page

💻

Cédrick Béler

💻

nbecu

💻

npapoylias

💻 ⚠️

Bruno Bonté

💻

Jigyasa Grover

💻

Peter Uhnak

🔧

Géraldine Abrami

⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

Historical contributors

Innocent Bakam, François Bousquet, Alassane Bah, Emmanuel Lieurain, Jean-Christophe Soulié, Paul Guyot, Jean-François Lefevre, Anne Dray.

cormas's People

Contributors

allcontributors[bot] avatar brun0 avatar cdrick65 avatar elcep avatar eltociear avatar jecisc avatar jordanmontt avatar nbecu avatar npapoylias avatar olekscode avatar pierbo avatar sergestinckwich avatar tomooda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cormas's Issues

Announceur VI not used anywhere

There is an announceur (french of announcer) variable instance defined in Model class, not used anywhere in Cormas code:

Model>>announcer
	"pay attention we name this instance variable announceur and not announcer because subclasses may already have an announcer instance variable. We will remove them and rename this one in the future."
	^ announceur ifNil: [ announceur := Announcer new ]

implementing the model launcher interface in pharo

Need to implement an interface which lists the different model available for the end-user , allow him to see the description, version comments and authors of the different models and choose one model to load

implementing the entity color code in pharo version

need to usef the color code from the vw version to vizualize the type of entities

  • spatial green,
  • social blue,
  • passive orange

this color code can be used in

  • the interface showing all the entities of the model
  • the interface showing the model parameters
  • the uml -like interfaces which will be developed later on

Shoud we allow beeing able to launch several models at the same time in Cormas for Pharo?

In VW we choose to have the CormasModel class has a singleton because:

  • we wanted to be able to call the instance of the current model from anywhere in the code, by using: CormasModel currrent
  • having a single model open in an image was making things much more simple for implementing the distributed version of CORMAS.

Now that we switch to Pharo, - and that for the moment a distributed version on pharo is not the priority - we can ask ourselves, should we keep CormasModel as a singleton or should we allow several model to be lauched in a same image
The floor is yours. What are your arguments in favor or one or the other option?

Entity Inspector does not always refresh when changing the instance inspected

During the monday 19th web session, on Anne's and Bruno's computers, the value of the attributes of Plant instance shown in the entity inspector did not refresh when they were going to the next instance
image

They say that if they clic on the left or righ arrow that allows to go to the previous or next instance, at the first clic, the value of energy was updated but then it was not updated anymore.
I don't know why

Cleaning utils_files class category in Cormas class

There is a lot of obsolete methods in Cormas class, let's start by utils_files class category:

  • allClassesInCategory: categoryName
  • allClassesInCategory: categoryName fromNameSpace: aNameSpace
  • checkIfNameContainsBlank: aName
  • editClass: aClass
  • editMethod: aSelector fromClass: aClass
  • listing
  • loadLinesInCollecFromTxtFile: aString
  • removeExtensionOf: aFilename
  • separator
  • separator: aSeparator

What they are doing, which ones we can remove ?

Can at least remove:

  • checkIfNameContainsBlank
  • loadLinesInCollecFromTxtFile: aString

Task: Integration of GIS in Cormas core

Nick+Nico: integration of GIS (Geranium project -- Pharo functionality ++ Continuous or Large-Grid Space) in Cormas core

4.1 Does that need ESRI support?? http://smalltalkhub.com/#!/~hernan/Shapes
4.2  Etienne, Nico and who ever wants, want to work on a study case for GIS integration in the cormas core, which would be a fire diffusion model on top of a vectorial representation of a territory that can be downloaded from openStreetMap

Cormas updater - to be checked

Bruno mentionned that when he used the update cormas tool (in the "?" main menu) to load the parcel Pierre sent him on the 16th May, it didn't work. It actually bugged he said.

Remove classFromSymbol: or classNamed: ?

In CormasEntity class side, we have 2 methods :

  • classFromSymbol: aSymbol with a comment that say: deprecated
    but there is 34 senders of this methods
    This method only call classNamed: method (below)
  • classNamed: aClassName never used in CORMAS

Should we remove one of these methods ?

Replace code refering to protocol names (pov, info probes, *,...) by pragmas

On Mon, Jun 30, 2014 at 1:06 PM, Nicolas Becu [email protected] wrote:

Thank you Serge.

Well to tell you the truth about why we use the name of protocols to
identify certain methods instead of using pragmas.... it is because we
discovered pragmas just some months ago (at least for me, thanks to
Jean-François). And I would say that in my case, I'm still not so sure
about how to use it. ;) But, we might switch to pragmas in a next cormas
version.

Pragmas are dead simple ! You can see them as meta-data or properties
attached to a specific method.
For example for if you have the povFood method in the class X:

povFood

^Color green

You just add: pragma to the beginning of your method.
This does not change the behaviour of your method.

You can then do a search of all pragmas in your system.
If you want to know all the methods that have the
pragmas, you can evaluate :

Pragmas allNamed: #pointOfView in: X

that will return a collection of pragrmas #pointOfView available in the class X.

(Pragmas allNamed: #pointOfView in:X) collect: [:pragma | pragma method]
if you want to have the collection of methods containing the

pointOfView pragma.

In you environnement window, you can build dynamically your menu by
doing a search on pointOfView and info pragmas for example.

See http://www.cincomsmalltalk.com/main/documentation/VisualWorks/AppDevGuide.pdf
page 4-25 for more information about Pragmas.

Undeclared temp: RTGridLayout when loading a Model

RTGridLayout (from Roassal 2) seems to be replaced by RTLayoutBuilder in its latest version, however #lineItemsCount: (a previously available implementor) is not available anymore. Model examples such as CMConwayModel and ECEC use RTGridLayout class raising a warning exception:

OCUndeclaredVariableWarning: Undeclared temp: RTGridLayout

Plan: Rename RTGridLayout with RTLayoutBuilder and check if a #lineItemsCount: implementor is available.

asRational in pharo is asFraction

Hi,
This function doesn't work anymore. In pharo, asRational doesn't exist. It's asFraction I guess.
I don't know (yet) how to fix it and if asRational exist in other cormas part.

randomFloatFrom: startNumber to: endNumber
	"Purpose: Return a random float between 'startNumber' and 'endNumber' (excluding startNumber and endNumber): 
	startNumber < randomFloat < endNumber, ie. randomFloat € ]startNumber ; endNumber[.
Examples: Cormas randomFloatFrom: 0 to: 10.
		Cormas randomFloatFrom: -4.1 to: 2.5
		10 timesRepeat: [Cormas randomFloatFrom: 1.1 to: 2.9] => (2.19661 1.78905 1.19457 1.96943 1.6194 1.12104 1.94028 2.41498 2.19254 2.18504) "
	
	| extent result |
	extent := endNumber asRational - startNumber asRational.
	result := (Cormas random * extent + startNumber asRational) asFloat.
	^result = endNumber
		ifTrue: [self randomFloatFrom: startNumber to: endNumber]
		ifFalse: [result]

What is the purpose of BBaseVisuel and AgentObs classes ?

BBaseVisuel is a subclass of Modeland AgentObsis a subclass of BBaseVisuel. There is no comment in BBaseVisuel and there is no reference to this class in CORMAS.
AgentObs is also not commented but used in other classes.

BBaseVisuel and AgentObs have a mix of english and French methods/instance variables.

allClassesInPackage or allClasses

to go on cleaning, there are 2 similar class methods: allClassesInPackage or allClasses.
#allClasses is expected to return the list of the subclasses of Entity that belong to the model.
Perhaps we should rename it as #allEntityClasses?

allEntityClasses
	"return all the classes of the model (except the classes that inheriting from Msg and other classes like Interface etc"

	| collection |
	collection := self allClassesInPackage.
	collection removeAllSuchThat: [:cl | (cl inheritsFrom: CMEntity) not].
	^ collection

Loading Cormas on non-Moose image raises dependency exception

When loading Cormas in Pharo 6.1, an exception is raised with the following message:

This package depends on the following classes:
  RTView
You must resolve these dependencies before you will be able to load these definitions: 
  CMPharoGridSimulation
  CMPharoGridSimulation>>#on:with:
  CMPharoGridSimulation>>#runAndVisualize

Select Proceed to continue, or close this window to cancel the operation.

Fixing this warning by resolving the dependency will enable to load Cormas on standard Pharo image or even minimal images.

Task: Be able to use Cormas headless

Be able to use CORMAS headless (continuous discussion, related also to DSLs) --> Comment: points 7 and 9 might be developped simultaneously
Be able to launch, stop, ... a simulation
Example script:
ECEC initialize.
ECEC new initSimulation.

Random API extensions for CORMAS

At the moment, we have the following API

  • Cormas randomFloatFrom: 2.3 to: 5.6.
  • Cormas randomIntegerFrom: -5 to: 10.

Why not convert them to ?

  • Float randomfrom: 2.3 to: 5.6..
  • Integer randomFrom:-5 to: 10..

Remove passmode methods ?

There is several methods passMode in various classes : CormasEntity, CormasModel, EntityPOV, ... I guess they are related to serialisation and openTalk. Can we remove them ?

Why there is not a step: methods on each model ?

There is a step: method in the ECEC model but not on FireAutomata and Conway models.
Should we add a step: methods for each models ?
Should we add an abstract step: method in CormasModel class ?

Playground broken in last version of Cormas

There is an issue with last version of Cormas dev on last version of Pharo 6.1:

When I load with :

Metacello new
  smalltalkhubUser: 'SergeStinckwich' project: 'CORMAS';
  configuration: 'Cormas';
  version: #development;
  load: 'All'.

the Playgroung is broken after that ...
Try : 3+4 CTRL-G in a Playground and then select integer.
There is an error :
Instance of SubscriptionRegistry did not understand #glmSubscriptions

I guess there is a problem with one of the packages you load @hernanmd ?

Unable to disable toolbar menu groups

Menu enable/disable behavior is implemented currently (0.30) in CMSpecProjectWindow. See for example method menuDisableTools

Each time a project state is changed (new project, open project, close, save, etc), announcements are triggered allow update UI menu. (Ex: updateCloseProject method). We currently use a FSM.

The advantage is we can remove a lot of conditionals by enabling/disabling a whole set of allowed/not allowed operations - i.e. without having to check (ifTrue: ifFalse:) if a model is loaded, or raise warn dialogs.

Any time a project is opened, a MenuItemModel is in enabled state:

(self selectMenuItemNamed: self translator tTools) enabled " -> true ".

On disable a menu from toolbar this code is executed:

(self selectMenuItemNamed: self translator tTools) enabled: false.

However, the UI does not reflect the disabled setting. Apparently MenuGroupMorph are not disabled properly (need to isolate)

How to modify Entity changes and notification of the dependents for the new version ?

in vw version there is an architecture to inform the dependents of the entities when something has change on the entity (see methods 'entity changed' or 'entity moveTo:')
this is used mainly to update the display of the entities on the different ui (spaceInterface mainly).

I've switch off for the moment this operation by putting into comment the registerChange messages in
In the 'entity changed' and 'entity moveTo:' methods

An exception is generated when you try to launch a simulation without doing the initialization

After loading a model, when you click the button execute 'on step' without initializing the simulation before, generate the following exception.

Unhandled exception: NonBoolean receiver--proceed for truth.
UndefinedObject(Object)>>mustBeBoolean
CormasNS.Kernel.Cormas>>runStepByStep
optimized [] in ApplicationModel>>actionFor:
optimized [] in ActionButtonSpec>>typeConvert:
PluggableAdaptor>>setValue:
PluggableAdaptor(ValueModel)>>value:
TriggerButtonController>>pressAction
TriggerButtonTracker(BasicButtonTracker)>>finishSelectionFor:
TriggerButtonTracker>>finishSelectionFor:
TriggerButtonTracker(SelectionTracker)>>redButtonReleasedEvent:
RedButtonReleasedEvent>>dispatchTo:
TriggerButtonTracker(SelectionTracker)>>handleEvent:
EventDispatcher>>dispatch:to:
EventDispatcher>>dispatchEvent:
RedButtonReleasedEvent(Event)>>dispatch
RedButtonReleasedEvent(Event)>>dispatchForWindowManager:
optimized [] in WindowManager>>safelyDispatchForWindowManager:
BlockClosure>>on:do:
WindowManager>>safelyDispatchForWindowManager:
WindowManager>>processNextEvent
optimized [] in [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in Process class>>forBlock:priority:


UndefinedObject(Object)>>mustBeBoolean
Receiver:
an UndefinedObject
Context PC = 9


CormasNS.Kernel.Cormas>>runStepByStep
Receiver:
a CormasNS.Kernel.Cormas
Instance Variables:
dependents = an ApplicationWindow 7089280
builder = an UIBuilder
uiSession = a ControlManager
eventHandlers = nil
reducedCommandsBar = nil
modelName = #ECEC
eraseLinks = nil
obsWin = nil
visualStateWin = nil
definePatchWin = nil
defineCSEWin = nil
defineEntityWin = nil
defineObjectWin = nil
defineCommWin = nil
displayCommWin = nil
defineChartsWin = nil
displayChartsWin = nil
stepCounter = a ValueHolder on: 0
cycle = a ValueHolder on: 1
cormasModel = a CormasNS.Models.ECEC.ECEC
cormasModelClass = CormasNS.Models.ECEC.ECEC
defineObservation = a ValueHolder on: #openPovSetterGUI
listPassiveEntities = a SelectionInList
listSpatialEntities = a SelectionInList
listSocialEntities = a SelectionInList
process = nil
displaySimNumber = nil
mainWin = an ApplicationWindow 7089280
simulationWin = nil
modelNameField = a ValueHolder on: #ECEC
versionField = a ValueHolder on: 'ECEC.pcl'
exportPlaybackLog = nil
useExternalVisualization = nil
xmlModel = nil
simManager = nil
menuHolder = a ValueHolder on: a Menu
useOnlyOneRB = nil
browser = nil
distributionControl = nil
isChangesDelayed = nil
subcanvasSim = a CormasNS.Kernel.Cormas
mainBuilder = an UIBuilder
simName = a ValueHolder on: ''
simNum = a ValueHolder on: ''
Context PC = 70


optimized [] in ApplicationModel>>actionFor:
Receiver:
an UndefinedObject
Temporaries:
.super = a CormasNS.Kernel.Cormas
.aKey = #runStepByStep
Context PC = 7


optimized [] in ActionButtonSpec>>typeConvert:
Receiver:
an UndefinedObject
Arguments:
b = a ValueHolder on: nil
v = true
Temporaries:
.aValue = BlockClosure [] in ApplicationModel>>actionFor:
Context PC = 5


PluggableAdaptor>>setValue:
Receiver:
a PluggableAdaptor
Instance Variables:
dependents = a MacActionButtonView
model = a ValueHolder on: nil
getBlock = BlockClosure [] in ActionButtonSpec>>typeConvert:
putBlock = BlockClosure [] in ActionButtonSpec>>typeConvert:
updateBlock = BlockClosure [] in ActionButtonSpec>>typeConvert:
Arguments:
newValue = true
Context PC = 6


PluggableAdaptor(ValueModel)>>value:
Receiver:
a PluggableAdaptor
Instance Variables:
dependents = a MacActionButtonView
model = a ValueHolder on: nil
getBlock = BlockClosure [] in ActionButtonSpec>>typeConvert:
putBlock = BlockClosure [] in ActionButtonSpec>>typeConvert:
updateBlock = BlockClosure [] in ActionButtonSpec>>typeConvert:
Arguments:
newValue = true
Context PC = 5


TriggerButtonController>>pressAction
Receiver:
a TriggerButtonController
Instance Variables:
model = a PluggableAdaptor
view = a MacActionButtonView
sensor = a TranslatingSensor
keyboardProcessor = a KeyboardProcessor
keyboardHook = nil
dispatcher = nil
Context PC = 17


TriggerButtonTracker(BasicButtonTracker)>>finishSelectionFor:
Receiver:
a TriggerButtonTracker
Instance Variables:
controller = a TriggerButtonController
inside = true
Arguments:
aPoint = 15@20
Context PC = 8


TriggerButtonTracker>>finishSelectionFor:
Receiver:
a TriggerButtonTracker
Instance Variables:
controller = a TriggerButtonController
inside = true
Arguments:
aPoint = 15@20
Context PC = 11


TriggerButtonTracker(SelectionTracker)>>redButtonReleasedEvent:
Receiver:
a TriggerButtonTracker
Instance Variables:
controller = a TriggerButtonController
inside = true
Arguments:
aMouseButtonEvent = a RedButtonReleasedEvent
Context PC = 13


RedButtonReleasedEvent>>dispatchTo:
Receiver:
a RedButtonReleasedEvent
Instance Variables:
time = 56276339
initiator = an EventDispatcher
window = an ApplicationWindow 7089280
state = 0
x = 264
y = 122
gx = 517
gy = 663
buttonNumber = 1
Arguments:
anObject = a TriggerButtonTracker
Context PC = 4


TriggerButtonTracker(SelectionTracker)>>handleEvent:
Receiver:
a TriggerButtonTracker
Instance Variables:
controller = a TriggerButtonController
inside = true
Arguments:
anEvent = a RedButtonReleasedEvent
Context PC = 4


EventDispatcher>>dispatch:to:
Receiver:
an EventDispatcher
Instance Variables:
windowController = an ApplicationStandardSystemController
currentMouseConsumer = nil
grabbingMouse = false
keyboardProcessor = a KeyboardProcessor
lastControlObject = nil
trapList = nil
state = nil
repairDamageWhenDebugging = true
flushQueueAfterError = true
distributeEventsWhenDebugging = true
dragDropInProgress = false
dragDropTracker = nil
dispatchUnknownEvents = false
Arguments:
event = a RedButtonReleasedEvent
object = a TriggerButtonTracker
Temporaries:
tmp = nil
Context PC = 10


EventDispatcher>>dispatchEvent:
Receiver:
an EventDispatcher
Instance Variables:
windowController = an ApplicationStandardSystemController
currentMouseConsumer = nil
grabbingMouse = false
keyboardProcessor = a KeyboardProcessor
lastControlObject = nil
trapList = nil
state = nil
repairDamageWhenDebugging = true
flushQueueAfterError = true
distributeEventsWhenDebugging = true
dragDropInProgress = false
dragDropTracker = nil
dispatchUnknownEvents = false
Arguments:
event = a RedButtonReleasedEvent
Temporaries:
objectWantingControl = nil
targetKeyboardProcessor = nil
Context PC = 60


RedButtonReleasedEvent(Event)>>dispatch
Receiver:
a RedButtonReleasedEvent
Instance Variables:
time = 56276339
initiator = an EventDispatcher
window = an ApplicationWindow 7089280
state = 0
x = 264
y = 122
gx = 517
gy = 663
buttonNumber = 1
Context PC = 16


RedButtonReleasedEvent(Event)>>dispatchForWindowManager:
Receiver:
a RedButtonReleasedEvent
Instance Variables:
time = 56276339
initiator = an EventDispatcher
window = an ApplicationWindow 7089280
state = 0
x = 264
y = 122
gx = 517
gy = 663
buttonNumber = 1
Arguments:
aWinMgr = a WindowManager
Context PC = 4


optimized [] in WindowManager>>safelyDispatchForWindowManager:
Receiver:
an UndefinedObject
Temporaries:
.event = a RedButtonReleasedEvent
.super = a WindowManager
Context PC = 6


BlockClosure>>on:do:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in WindowManager>>safelyDispatchForWindowManager:
outerContext = nil
copiedValues = an Array[2]
Arguments:
anExceptionSelector = BadControllerError
handlerBlock = BlockClosure [] in WindowManager>>safelyDispatchForWindowManager:
Context PC = 18


WindowManager>>safelyDispatchForWindowManager:
Receiver:
a WindowManager
Instance Variables:
windows = an OrderedCollection[2]
activeController = nil
interruptLock = false
outstandingMetaOrDamage = false
openInProgress = false
eventQueue = an EventQueue
baseProcess = a Process in Semaphore>>wait
dontFilterEvents = false
Arguments:
event = a RedButtonReleasedEvent
Context PC = 13


WindowManager>>processNextEvent
Receiver:
a WindowManager
Instance Variables:
windows = an OrderedCollection[2]
activeController = nil
interruptLock = false
outstandingMetaOrDamage = false
openInProgress = false
eventQueue = an EventQueue
baseProcess = a Process in Semaphore>>wait
dontFilterEvents = false
Temporaries:
event = a RedButtonReleasedEvent
Context PC = 9


optimized [] in [] in WindowManager>>newProcess
Receiver:
an UndefinedObject
Temporaries:
.super = a WindowManager
Context PC = 13


BlockClosure>>on:do:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in [] in WindowManager>>newProcess
outerContext = nil
copiedValues = a WindowManager
Arguments:
anExceptionSelector = TerminateException
handlerBlock = BlockClosure [] in [] in WindowManager>>newProcess
Context PC = 18


optimized [] in WindowManager>>newProcess
Receiver:
an UndefinedObject
Temporaries:
.super = a WindowManager
Context PC = 15


BlockClosure>>on:do:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in WindowManager>>newProcess
outerContext = nil
copiedValues = a WindowManager
Arguments:
anExceptionSelector = TerminateException
handlerBlock = BlockClosure [] in [] in Process class>>forBlock:priority:
Context PC = 18


optimized [] in Process class>>forBlock:priority:
Receiver:
an UndefinedObject
Temporaries:
.aBlock = BlockClosure [] in WindowManager>>newProcess
Context PC = 9

How to replace namespace used in cormas for the pharo version

in cormas vw we use namespace but in pharo there is no things such as namespace
how can we deal with this

here is a list of use case of namespace in cormas VW and possible solution to replace them

  • case1
    description: the class Entity of cormas package
    solution: was renamed to CormasEntity
  • case2
    description: we use them to differentiate between Farmer in model A and Farmer in model B
    solution: a prefix, such as in case1, is not an option. we cannot have ModelNameFamer syntax each time. to boring. No solution for the moment
  • case3
    description: we use environment of namespace to navigate from one class to another within a specific model
    solution: we can use the instruction 'package classes' instead. Such as in the modelClass method of CormasEntity

methods in protocols starting by * are missing in pharo version

I found that the method noOccupant of cormasModel was not present in the pharo version.

actually in vw, this method is in a protocol named '* testing' and i found that all the methods of that protocol was missing in the pharo version.
perhaps all the methods in protocols starting by '*' were not copied. I didn't check but if this is the case we should correct it.

Originally, in vw version, methods stored in protocols strating by '*' are put here because they are the one made available for the end user - in a specific ui - to interactt directly with the entities during the course of a simulation

POV and info methods updated dynamically

The list of POV and info methods in the simulation windows is not updated every time you add or modify these methods. At the moment, we have to reopen the environment window. Maybe the update will be easier to achieved when #10 is fixed.

nclasses: is not used and the name is not good

There is two problems with nclasses: anAttribute method, defined on CormasModel and SpaceModel classes.

  • This method has no senders in the current CORMAS version. Is it use in a model ?
  • the name is not revealing the intuition of the method. I propose to rename this method to : nbDistinctStatesOf: anAttribute

Task: Build a common New Cormas Model

EVERYONE: Build a common Model where everyone can contribute (maybe Cholera epidemic propagation):
* With water
* network
* epidemic
* in south!
Something with 2 layers (water table and spatial landscape), where humain agents are situated in the spacial landscape (coordinates). There is a cholera involved in society.
With several point of views: pov on the landscape + pov on the aquifer.
The human agents (grouped in family networks) use water through well that pump water from the aquifer, but contaminate underground water.
There is a underground water mouvements (simple cellular automata) + superficial water mouvements by river network.
Cholerate diffuses through direct contact between people but also through water contamination.

Distinction between loading models from image & storage

Context: Currently the Load model option in UI presents a list of in-image model names.

Problem:

  1. There is no way to select other model previously downloaded.
  2. It is not clear for an user if these are all the available models

After selection of a model, an open file dialog is presented to select the model source code (.pcl in VW or .st in Pharo).

Propose: To split the Load Model menu item in:

Load from image = Loads a model into the window workspace without selecting external file.
Load from disk/network = Open directly the File dialog to open from a file.

Additional suggestions?

Add option to display colors in the Entities Browser

Currently the Cormas Entities Browser opened with:

CormasEntitiesBrowser new buildBrowser

does not display the color codes from the VisualWorks version to visualize the type of entities (spatial green, social blue, passive orange).

Such coloring option could be added as a Preference, which defaults to use the Green/Blue/Orange or not using it.

How to manage CORMAS model's files ?

For files like maps related to models, we have to find a way to manage them in the versioning system also.
This is not possible to version files in Monticello, but we can use git+Monticello together in order to put files on github for examples.
There was a thread on this recently on cormas-users mailing-list, raised by Nicolas Paget from IRSTEA.
One benefit of using github repositories for CORMAS models is that this easy for end-users to see diff between models and comment the models with the web interface.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.