Merge pull request #37 from BlockScience/param-sweep-multi-proc
renamed b_identity to p_identitiy
This commit is contained in:
commit
9697ed488a
|
|
@ -3,7 +3,7 @@
|
|||
.DS_Store
|
||||
.idea
|
||||
notebooks
|
||||
SimCAD.egg-info
|
||||
*.egg-info
|
||||
__pycache__
|
||||
Pipfile
|
||||
Pipfile.lock
|
||||
|
|
@ -12,6 +12,7 @@ results
|
|||
*.csv
|
||||
*.txt
|
||||
simulations/.ipynb_checkpoints
|
||||
simulations/validation/config3.py
|
||||
dist/*.gz
|
||||
cadCAD.egg-info
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ class Processor:
|
|||
return sdf_values, bdf_values
|
||||
elif (bdf.empty == True) and (sdf.empty == False):
|
||||
sdf_values = sdf.values.tolist()
|
||||
bdf_values = [[self.b_identity] * len(sdf_values) for m in range(len(partial_state_updates))]
|
||||
bdf_values = [[self.p_identity] * len(sdf_values) for m in range(len(partial_state_updates))]
|
||||
return sdf_values, bdf_values
|
||||
else:
|
||||
sdf_values = sdf.values.tolist()
|
||||
|
|
|
|||
|
|
@ -7,19 +7,19 @@ from cadCAD import configs
|
|||
|
||||
exec_mode = ExecutionMode()
|
||||
|
||||
# print("Simulation Execution 1")
|
||||
# print()
|
||||
# first_config = [configs[0]] # from config1
|
||||
# single_proc_ctx = ExecutionContext(context=exec_mode.single_proc)
|
||||
# run1 = Executor(exec_context=single_proc_ctx, configs=first_config)
|
||||
# run1_raw_result, tensor_field = run1.main()
|
||||
# result = pd.DataFrame(run1_raw_result)
|
||||
# print()
|
||||
# print("Tensor Field:")
|
||||
# print(tabulate(tensor_field, headers='keys', tablefmt='psql'))
|
||||
# print("Output:")
|
||||
# print(tabulate(result, headers='keys', tablefmt='psql'))
|
||||
# print()
|
||||
print("Simulation Execution 1")
|
||||
print()
|
||||
first_config = [configs[0]] # from config1
|
||||
single_proc_ctx = ExecutionContext(context=exec_mode.single_proc)
|
||||
run1 = Executor(exec_context=single_proc_ctx, configs=first_config)
|
||||
run1_raw_result, tensor_field = run1.main()
|
||||
result = pd.DataFrame(run1_raw_result)
|
||||
print()
|
||||
print("Tensor Field:")
|
||||
print(tabulate(tensor_field, headers='keys', tablefmt='psql'))
|
||||
print("Output:")
|
||||
print(tabulate(result, headers='keys', tablefmt='psql'))
|
||||
print()
|
||||
|
||||
print("Simulation Execution 2: Concurrent Execution")
|
||||
multi_proc_ctx = ExecutionContext(context=exec_mode.multi_proc)
|
||||
|
|
|
|||
Loading…
Reference in New Issue