Skip to content

Commit

Permalink
neams
Browse files Browse the repository at this point in the history
  • Loading branch information
jbae11 committed Dec 3, 2020
1 parent 274f8e6 commit 6795c87
Show file tree
Hide file tree
Showing 18 changed files with 4,509 additions and 70 deletions.
811 changes: 811 additions & 0 deletions neams/)

Large diffs are not rendered by default.

830 changes: 830 additions & 0 deletions neams/.ipynb_checkpoints/Untitled-checkpoint.ipynb

Large diffs are not rendered by default.

1,287 changes: 1,287 additions & 0 deletions neams/.ipynb_checkpoints/schema_to_sch-checkpoint.ipynb

Large diffs are not rendered by default.

436 changes: 436 additions & 0 deletions neams/.ipynb_checkpoints/workbench_files_generate-checkpoint.ipynb

Large diffs are not rendered by default.

822 changes: 822 additions & 0 deletions neams/Untitled.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion neams/cyclus.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import shutil
import stat
import paramiko
import http.client
# import http.client
import subprocess
import uuid
import sys
Expand Down
2 changes: 1 addition & 1 deletion neams/cyclus.sch
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ simulation {
MinOccurs=1
val={MinOccurs=1 ValType=String}}}
}
initialfacilitiylist={MaxOccurs=1
initialfacilitylist={MaxOccurs=1
entry={MinOccurs=1
number={MaxOccurs=1
ValType=Int}
Expand Down
8 changes: 7 additions & 1 deletion neams/cyclus_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# standard imports
import os
import sys
sys.path.append('/Users/4ib/Downloads/Workbench-Darwin/rte/')
from util.abstract_remote import AbstractRemoteRuntimeEnvironment, Const, RemoteConstants, get_rte_remote_resource_dir
from util.util import Utilities
from hello_world import TeeStdout
Expand Down Expand Up @@ -68,7 +69,7 @@ def update_and_print_grammar(self, grammar_path):
with open(grammar_path,"w") as workbench_grammar_file:
workbench_grammar_file.write("name='{}' redirect='{}'".format(this_grammar_name, this_grammar_path))
print (grammar_path)
"""!
"""
def app_name(self):
"""returns the app's self-designated name"""
return "cyclus"
Expand Down Expand Up @@ -138,6 +139,9 @@ def run(self, options):

# check for cirrus libraries
cirrus_path = os.path.abspath(os.path.join(pdir,'cirrus'))
#! cirrus path manual
cirrus_path = '/Users/4ib/Downloads/Workbench-Darwin/rte/cirrus'

if not os.path.isdir(cirrus_path):
self.echo(0,'The required Cirrus libraries are not in expected location: ' + cirrus_path)
sys.exit(2)
Expand All @@ -152,6 +156,8 @@ def run(self, options):
self.echo(0,"Processing input file: " + self.__input_filepath)

input_dict = self.get_dict_from_input_path(self.__input_filepath)
print('input_dict')
print(input_dict)

#!version = self.get_version(self.__input_filepath)
#!if version != "1.0.0":
Expand Down
11 changes: 10 additions & 1 deletion neams/recycle.json → neams/example.json.out
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,13 @@
"name": "SingleRegion"
}
}
}
}

Saving output to example.json.out


Python version: 2.7.16
Python executable: /Users/4ib/anaconda3/envs/py2/bin/python
Platform name: darwin

Processing input file: /Users/4ib/Desktop/git/cyclus_gui/neams/example.json
113 changes: 113 additions & 0 deletions neams/mwe.son
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
simulation{

control {
duration = 1234
startmonth = 1
startyear = 2020
explicit_inventory=0
dt=2629846
decay="lazy"
}

archetypes { % This part is automatically filled! No need to worry
spec = {lib="agents" name="KFacility"}
spec = {lib="agents" name="Predator"}
spec = {lib="agents" name="Prey"}
spec = {lib="agents" name="Sink"}
spec = {lib="agents" name="Source"}
spec = {lib="cycamore" name="DeployInst"}
spec = {lib="cycamore" name="Enrichment"}
spec = {lib="cycamore" name="FuelFab"}
spec = {lib="cycamore" name="GrowthRegion"}
spec = {lib="cycamore" name="ManagerInst"}
spec = {lib="cycamore" name="Mixer"}
spec = {lib="cycamore" name="Reactor"}
spec = {lib="cycamore" name="Separations"}
spec = {lib="cycamore" name="Sink"}
spec = {lib="cycamore" name="Source"}
spec = {lib="cycamore" name="Storage"}

}


facility {
name="facility_name"
config {
%This facility acts as a source of material with a fixed throughput
%(per
%time step) capacity and a lifetime capacity defined
%by a total inventory
%size. It offers its material as a single
%commodity. If a composition
%recipe is specified, it provides
%that single material composition to
%requesters. If unspecified,
%the source provides materials with the exact
%requested
%compositions. The inventory size and throughput both
%default to
%infinite. Supplies material results in corresponding
%decrease in
%inventory, and when the inventory size reaches
%zero, the source can provide
%no more material.
%
%
Source {
%(optional) [double] Total amount of material this source has
%remaining. Every trade decreases this value by the supplied
%material quantity. When it reaches zero, the source cannot
%provide any more material.
inventory_size =1e+299

%(optional) [double] Latitude of the agent's geographical position.
%The value should be expressed in degrees as a double.
%
latitude =0.0

%(optional) [double] Longitude of the agent's geographical position.
%The value should be expressed in degrees as a double
%.
longitude =0.0

% [std::string] Output commodity on which the source offers m
%aterial.
outcommod = "outcommod"

%(optional) [std::string] Name of composition recipe that this
%source provides regardless of requested composition. If empty,
%source creates and provides whatever compositions are r
%equested.
outrecipe =""

%(optional) [double] amount of commodity that can be supplied
%at each time step
throughput =1e+299

}
}
}

region {
name="reg"
config {
NullRegion= null
}
institution {
name="inst"
config{
NullInst= null % define institution here
}
}
}


recipe {
% this is an example
basis="mass"
name="natl_u"
nuclide={comp=0.997 id="u238"}
nuclide={comp=0.003 id="u235"}
}

}
125 changes: 125 additions & 0 deletions neams/mwe.son.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
simulation{

control {
duration = 1234
startmonth = 1
startyear = 2020
explicit_inventory=0
dt=2629846
decay="lazy"
}

archetypes { % This part is automatically filled! No need to worry
spec = {lib="agents" name="KFacility"}
spec = {lib="agents" name="Predator"}
spec = {lib="agents" name="Prey"}
spec = {lib="agents" name="Sink"}
spec = {lib="agents" name="Source"}
spec = {lib="cycamore" name="DeployInst"}
spec = {lib="cycamore" name="Enrichment"}
spec = {lib="cycamore" name="FuelFab"}
spec = {lib="cycamore" name="GrowthRegion"}
spec = {lib="cycamore" name="ManagerInst"}
spec = {lib="cycamore" name="Mixer"}
spec = {lib="cycamore" name="Reactor"}
spec = {lib="cycamore" name="Separations"}
spec = {lib="cycamore" name="Sink"}
spec = {lib="cycamore" name="Source"}
spec = {lib="cycamore" name="Storage"}

}


facility {
name="facility_name"
config {
%This facility acts as a source of material with a fixed throughput
%(per
%time step) capacity and a lifetime capacity defined
%by a total inventory
%size. It offers its material as a single
%commodity. If a composition
%recipe is specified, it provides
%that single material composition to
%requesters. If unspecified,
%the source provides materials with the exact
%requested
%compositions. The inventory size and throughput both
%default to
%infinite. Supplies material results in corresponding
%decrease in
%inventory, and when the inventory size reaches
%zero, the source can provide
%no more material.
%
%
Source {
%(optional) [double] Total amount of material this source has
%remaining. Every trade decreases this value by the supplied
%material quantity. When it reaches zero, the source cannot
%provide any more material.
inventory_size =1e+299

%(optional) [double] Latitude of the agent's geographical position.
%The value should be expressed in degrees as a double.
%
latitude =0.0

%(optional) [double] Longitude of the agent's geographical position.
%The value should be expressed in degrees as a double
%.
longitude =0.0

% [std::string] Output commodity on which the source offers m
%aterial.
outcommod = "outcommod"

%(optional) [std::string] Name of composition recipe that this
%source provides regardless of requested composition. If empty,
%source creates and provides whatever compositions are r
%equested.
outrecipe =""

%(optional) [double] amount of commodity that can be supplied
%at each time step
throughput =1e+299

}
}
}

region {
name="reg"
config {
NullRegion= null
}
institution {
name="inst"
config{
NullInst= null % define institution here
}
}
}


recipe {
% this is an example
basis="mass"
name="natl_u"
nuclide={comp=0.997 id="u238"}
nuclide={comp=0.003 id="u235"}
}

}

Saving output to mwe.son.out


Python version: 2.7.16
Python executable: /Users/4ib/anaconda3/envs/py2/bin/python
Platform name: darwin

Processing input file: /Users/4ib/Desktop/git/cyclus_gui/neams/mwe.son
('***Error: Workbench Analysis Sequence Process (WASP) Python wrapper (WASPPY) is not in expected location: ', '../wasppy')
input_dict
{u'simulation': [{u'control': {u'startyear': {u'value': 2020}, u'decay': {u'value': u'lazy'}, u'startmonth': {u'value': 1}, u'duration': {u'value': 1234}, u'dt': {u'value': 2629846}, u'explicit_inventory': {u'value': 0}}, u'region': [{u'config': {u'NullRegion': [{u'value': u'null'}]}, u'name': {u'value': u'reg'}, u'institution': [{u'config': {u'NullInst': [{u'value': u'null'}]}, u'name': {u'value': u'inst'}}]}], u'recipe': [{u'nuclide': [{u'comp': {u'value': 0.997}, u'id': {u'value': u'u238'}}, {u'comp': {u'value': 0.003}, u'id': {u'value': u'u235'}}], u'name': {u'value': u'natl_u'}, u'basis': {u'value': u'mass'}}], u'archetypes': {u'spec': [{u'name': {u'value': u'KFacility'}, u'lib': {u'value': u'agents'}}, {u'name': {u'value': u'Predator'}, u'lib': {u'value': u'agents'}}, {u'name': {u'value': u'Prey'}, u'lib': {u'value': u'agents'}}, {u'name': {u'value': u'Sink'}, u'lib': {u'value': u'agents'}}, {u'name': {u'value': u'Source'}, u'lib': {u'value': u'agents'}}, {u'name': {u'value': u'DeployInst'}, u'lib': {u'value': u'cycamore'}}, {u'name': {u'value': u'Enrichment'}, u'lib': {u'value': u'cycamore'}}, {u'name': {u'value': u'FuelFab'}, u'lib': {u'value': u'cycamore'}}, {u'name': {u'value': u'GrowthRegion'}, u'lib': {u'value': u'cycamore'}}, {u'name': {u'value': u'ManagerInst'}, u'lib': {u'value': u'cycamore'}}, {u'name': {u'value': u'Mixer'}, u'lib': {u'value': u'cycamore'}}, {u'name': {u'value': u'Reactor'}, u'lib': {u'value': u'cycamore'}}, {u'name': {u'value': u'Separations'}, u'lib': {u'value': u'cycamore'}}, {u'name': {u'value': u'Sink'}, u'lib': {u'value': u'cycamore'}}, {u'name': {u'value': u'Source'}, u'lib': {u'value': u'cycamore'}}, {u'name': {u'value': u'Storage'}, u'lib': {u'value': u'cycamore'}}]}, u'facility': [{u'config': {u'Source': [{u'longitude': {u'value': 0.0}, u'outrecipe': {u'value': u''}, u'throughput': {u'value': 1e+299}, u'latitude': {u'value': 0.0}, u'outcommod': {u'value': u'outcommod'}, u'inventory_size': {u'value': 1e+299}}]}, u'name': {u'value': u'facility_name'}}]}]}
64 changes: 1 addition & 63 deletions neams/recycle.son
Original file line number Diff line number Diff line change
Expand Up @@ -4,66 +4,4 @@ simulation{
startmonth=1
startyear=2000
}

archetypes {
spec {lib="agents" name="NullInst"}
spec {lib="agents" name="NullRegion"}
spec {lib="cycamore" name="Source"}
spec {lib="cycamore" name="Sink"}
spec {lib="cycamore" name="Enrichment"}
spec {lib="cycamore" name="Reactor"}
spec {lib="cycamore" name="FuelFab"}
spec {lib="cycamore" name="Separations"}
}

facility {
name="enrichment"
config {
Enrichment {
feed_commod="natl_u"
feed_recipe="natl_u"
product_commod="uox"
tails_assay=0.003
tails_commod="waste"
swu_capacity=1e100
initial_feed=1e100
}
}
}

facility {
name="separations"
config {
Separations {
streams {
item {
commod="sep_stream"
info {
buf_size=1e100
efficiencies {
item {
comp="Pu"
eff=0.99
}
}
}
}
}
leftover_commod="waste"
throughput=30001
feedbuf_size=30001
feed_commods {
val {
spent_uox
}
}
feed_commod_prefs {
val {
2.0
}
}
}
}
}
}

}
16 changes: 16 additions & 0 deletions neams/recycle.son.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
simulation{
control {
duration=600
startmonth=1
startyear=2000
}
}

Saving output to recycle.son.out


Python version: 2.7.16
Python executable: /Users/4ib/anaconda3/envs/py2/bin/python
Platform name: darwin

Processing input file: /Users/4ib/Desktop/git/cyclus_gui/neams/recycle.son
Loading

0 comments on commit 6795c87

Please sign in to comment.