|
447 | 447 | "name": "stdout", |
448 | 448 | "output_type": "stream", |
449 | 449 | "text": [ |
450 | | - "List of component types in result dataset and associated data types\n", |
451 | | - "{'ComponentType.node': <class 'numpy.ndarray'>, 'ComponentType.line': <class 'dict'>, 'ComponentType.sym_load': <class 'dict'>}\n", |
| 450 | + "List of component types in result dataset\n", |
| 451 | + "[<ComponentType.node: 'node'>, <ComponentType.line: 'line'>, <ComponentType.sym_load: 'sym_load'>]\n", |
452 | 452 | "------node result------\n", |
453 | 453 | "('id', 'energized', 'u_pu', 'u', 'u_angle', 'p', 'q')\n", |
454 | 454 | "------line result attributes------\n", |
|
471 | 471 | " },\n", |
472 | 472 | ")\n", |
473 | 473 | "\n", |
474 | | - "print(\"List of component types in result dataset and associated data types\")\n", |
475 | | - "print({str(component_type): type(component_data) for component_type, component_data in output_data.items()})\n", |
| 474 | + "print(\"List of component types in result dataset\")\n", |
| 475 | + "print(list(output_data.keys()))\n", |
476 | 476 | "print(\"------node result------\")\n", |
477 | 477 | "print(output_data[ComponentType.node].dtype.names)\n", |
478 | 478 | "print(\"------line result attributes------\")\n", |
|
499 | 499 | "name": "stdout", |
500 | 500 | "output_type": "stream", |
501 | 501 | "text": [ |
502 | | - "List of component types in result dataset and associated data types\n", |
503 | | - "{'ComponentType.node': <class 'dict'>, 'ComponentType.line': <class 'dict'>, 'ComponentType.sym_load': <class 'dict'>, 'ComponentType.source': <class 'dict'>}\n", |
| 502 | + "List of component types in result dataset\n", |
| 503 | + "[<ComponentType.node: 'node'>, <ComponentType.line: 'line'>, <ComponentType.sym_load: 'sym_load'>, <ComponentType.source: 'source'>]\n", |
504 | 504 | "------node result------\n", |
505 | 505 | "['id', 'energized', 'u_pu', 'u', 'u_angle', 'p', 'q']\n", |
506 | 506 | "------line result attributes------\n", |
|
519 | 519 | " output_component_types=ComponentAttributeFilterOptions.everything, # all attributes for all component types as columns\n", |
520 | 520 | ")\n", |
521 | 521 | "\n", |
522 | | - "print(\"List of component types in result dataset and associated data types\")\n", |
523 | | - "print({str(component_type): type(component_data) for component_type, component_data in output_data.items()})\n", |
| 522 | + "print(\"List of component types in result dataset\")\n", |
| 523 | + "print(list(output_data.keys()))\n", |
524 | 524 | "print(\"------node result------\")\n", |
525 | 525 | "print(list(output_data[ComponentType.node].keys()))\n", |
526 | 526 | "print(\"------line result attributes------\")\n", |
|
1430 | 1430 | "# we run the batch calculation with continue_on_batch_error=True,\n", |
1431 | 1431 | "# it will return the results with partially valid data\n", |
1432 | 1432 | "\n", |
| 1433 | + "\n", |
1433 | 1434 | "output_data = model.calculate_power_flow(update_data=time_series_mutation, continue_on_batch_error=True)\n", |
1434 | 1435 | "\n", |
1435 | 1436 | "# print node data for u_pu, note that the data is rubbish for scenario 3 and 7\n", |
|
0 commit comments