arfc / d3ploy

A collection of Cyclus manager archetypes for demand driven deployment
BSD 3-Clause "New" or "Revised" License
4 stars 11 forks source link

new input structure with single level maps #212

Closed gwenchee closed 5 years ago

gwenchee commented 5 years ago

Since, the map structure in python does not work beyond a single level map (https://github.com/cyclus/cyclus/issues/1500), a new input structure that makes use of the single level map system should be implemented.

The previous input for information about a commodity in d3ploy looked like: <commodities><val>POWER_reactor2_3000_2*t_storageuox_8000</val></commodities>

where the format refers to commodity_facility_capacity_preference_constraint-commodity_constraint-commodity-value

The new structure looks like:

      <facility_commod>
        <item>
          <facility>reactor2</facility>
          <commod>POWER</commod>
        </item>
      </facility_commod>

      <facility_capacity>
        <item>
          <facility>reactor2</facility>
          <capacity>3000</capacity>
        </item>
      </facility_capacity>

      <facility_pref>
        <item>
          <facility>reactor2</facility>
          <pref>2*t</pref>
        </item>
      </facility_pref>

      <facility_constraintcommod>
        <item>
          <facility>reactor2</facility>
          <constraintcommod>storageuox</constraintcommod>
        </item>
      </facility_constraintcommod>

      <facility_constraintval>
        <item>
          <facility>reactor2</facility>
          <constraintval>8000</constraintval>
        </item>
      </facility_constraintval>

The new structure aims to be clearer, and not prohibit the user from inputting strings that include underscores

gwenchee commented 5 years ago

closed with @ #213