Search code examples
repast-simphony

Can I display in the run-GUI the order of the parameters defined in parameters.xml?


For example, for the following parameters defined in the parameters.xml, can I explicitly define the order of the parameters that they appear in the running GUI?

I do not thing they are ordered alphabetically.

<parameter name="Metabolism_min" displayName="2.1.2 Agent Metabolism (minimum)" type="int" defaultValue="1" />
<parameter name="Metabolism_max" displayName="2.1.2 Agent Metabolism (maximum)" type="int" defaultValue="4" />
<parameter name="InitEndownment_min" displayName="2.1.3 Agent Initial Sugar (minimum)" type="int" defaultValue="50" />
<parameter name="InitEndownment_max" displayName="2.1.3 Agent Initial Sugar (maximum)" type="int" defaultValue="100" />

Solution

  • The way to do this is to use the display name as the ordering. For example, if I wanted to have the minimum values show up above the maximum values, I could do something like:

    <parameter name="Metabolism_min" displayName="2.1.2.a Agent Metabolism (minimum)" type="int" defaultValue="1" />
    <parameter name="Metabolism_max" displayName="2.1.2.b Agent Metabolism (maximum)" type="int" defaultValue="4" />
    <parameter name="InitEndownment_min" displayName="2.1.3.a Agent Initial Sugar (minimum)" type="int" defaultValue="50" />
    <parameter name="InitEndownment_max" displayName="2.1.3.b Agent Initial Sugar (maximum)" type="int" defaultValue="100" />
    

    And this would result in the following:enter image description here