MASON-INTEREST-L Archives

March 2017

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Wed, 8 Mar 2017 08:38:07 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (21 lines)
Generally if it ends with "-ed", it's meant to display information, not to let the user modify it.  This is the case for OrientedPortrayal2D: it just shows the orientation.  It's a convenience mechanism because drawing object orientation is really, really common and nontrivial compared to, say, changing color.

The primary purpose of Oriented2D (and Scaled2D) is to provide a standard way that agents can indicate their orientation and size, and that such a thing exists, to interested objects.  Not sure why an interface like this would violate MVC, quite to the contrary.

Sean

On Mar 8, 2017, at 4:18 AM, Abrams, Marshall <[log in to unmask]> wrote:

> Not sure if maybe I’m missing something, but thought I’d ask.  OrientedPortrayal2D seems unusual in that it has no methods for controlling its intended variation, i.e. its orientation.  Instead one makes the agent implement Oriented2D.  By contrast if you want the color of a portrayal to reflect the state of the agent, for example, you can override a method in the portrayal class and set the color based on the state of the agent.  Then the agent doesn’t have have any features that reflect what’s going on in the UI.  Maybe there’s a way to control OrientedPortrayal2D that I’m not seeing, though.  Requiring that the agent implement Oriented2D seems like a small violation of the MVC model, but I suppose it’s not that different from defining bean methods and other tricks (e.g. implementing Propertied) that one can use to allow Mason to provide object inspectors with almost no work on the modeler’s part.  
> 
> Thanks-
> 
> Marshall
> 
> Marshall Abrams, Associate Professor 
> Department of Philosophy, University of Alabama at Birmingham
> Email: [log in to unmask]; Phone: (205) 996-7483;  Fax: (205) 975-6610
> Mail: HB 414A, 900 13th Street South, Birmingham, AL 35294-1260;  Office: HB 418
> Website: http://members.logical.net/~marshall
> 

ATOM RSS1 RSS2