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

calc_demand takes the values of the demand_eq #281

Closed robfairh closed 5 years ago

robfairh commented 5 years ago

I was trying to run this file where a series of initial facilities are deployed and then the enrichment plant and source are deployed with d3ploy. https://github.com/robfairh/transition-scenarios/blob/experimental6/input/eg01-eg29/eg01-eg29-flatpower-d3ployC-onemixer0-ma2.xml

    <institution>
    <config>
    <DemandDrivenDeploymentInst>
        <calc_method>ma</calc_method>
        <demand_eq>60000</demand_eq>
        <facility_commod>
        <item>
          <facility>source</facility>
          <commod>sourceout</commod>
        </item>
        <item>
          <facility>enrichment</facility>
          <commod>enrichmentout</commod>
        </item>
        </facility_commod>
        <facility_capacity>
        <item>
          <facility>source</facility>
          <capacity>1e8</capacity>
        </item>    
        <item>
          <facility>enrichment</facility>
          <capacity>1e100</capacity>
        </item>
        </facility_capacity>
    </DemandDrivenDeploymentInst>
    </config>
    <name>timeseriesinst</name>
    </institution>

This is the table of calc_demand for enrichmentout: image

And this is the table for the demand of enrichmentout: image

robfairh commented 5 years ago

This is what it is doing now, if there isn't a demand at that time step, it assigns the value of the demand_eq at t=0. Also this causes that the inital calc_demand for all the commodities is the demand_eq at t=0.

if time not in self.commodity_demand[commod]:
    t = 0
    self.commodity_demand[commod][time] = eval(self.demand_eq)
robfairh commented 5 years ago

closed by #282