Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All tests passed with vector coordinates #27

Open
wants to merge 13 commits into
base: dev_master_x
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ isort
black
pre-commit
fmpy==0.3.15
cosapp_fmu @ git+ssh://[email protected]/twiinIT/cosapp-fmu.git@master
#cosapp_fmu @ git+ssh://[email protected]/twiinIT/cosapp-fmu.git@master
1 change: 1 addition & 0 deletions rocket-twin
Submodule rocket-twin added at 105bfc
23 changes: 6 additions & 17 deletions rocket_twin/notebooks/Demonstration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"metadata": {},
"outputs": [],
"source": [
"from rocket_twin.systems import Station, StationControllerFMU, RocketControllerFMU, StageControllerFMU\n",
"from rocket_twin.systems import Station\n",
"from rocket_twin.drivers import FuelingRocket, VerticalFlyingRocket, Mission\n",
"from rocket_twin.utils import run_sequences\n",
"from cosapp.utils import swap_system\n",
Expand Down Expand Up @@ -596,7 +596,9 @@
"source": [
"## Choice of control mode\n",
"\n",
"The control of the system can be done through either cosapp or .fmu files. In order to use the fmu control, either a .mo file (from OpenModelica) or an .fmu file should be passed to the system."
"The control of the system can be done through either cosapp or .fmu files. In order to use the fmu control, either a .mo file (from OpenModelica) or an .fmu file should be passed to the system.\n",
"\n",
"In this release, only the cosapp control is available. "
]
},
{
Expand All @@ -606,22 +608,9 @@
"metadata": {},
"outputs": [],
"source": [
"use_fmu = False\n",
"\n",
"model_path = r\"systems\\control\\station_controller.mo\"\n",
"model_name = \"station_controller\"\n",
"\n",
"model_path_r = r\"systems\\control\\rocket_controller.mo\"\n",
"model_name_r = \"rocket_controller\"\n",
"\n",
"model_path_s = r\"systems\\control\\stage_controller.mo\"\n",
"model_name_s = \"stage_controller\"\n",
"\n",
"if use_fmu:\n",
" swap_system(sys.controller, StationControllerFMU(\"controller\", model_path=model_path, model_name=model_name))\n",
" swap_system(sys.rocket.controller, RocketControllerFMU(\"controller\", model_path=model_path_r, model_name=model_name_r, n_stages=n_stages))\n",
" for i in range(1, n_stages + 1):\n",
" swap_system(sys.rocket[f\"stage_{i}\"].controller, StageControllerFMU(\"controller\", model_path=model_path_s, model_name=model_name_s))"
"model_name_s = \"stage_controller\""
]
},
{
Expand Down Expand Up @@ -1020,7 +1009,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.10.5"
}
},
"nbformat": 4,
Expand Down
8 changes: 1 addition & 7 deletions rocket_twin/systems/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
from rocket_twin.systems.control import (
RocketControllerCoSApp,
RocketControllerFMU,
StageControllerCoSApp,
StageControllerFMU,
StationControllerCoSApp,
StationControllerFMU,
)
from rocket_twin.systems.engine import Engine, EngineGeom, EnginePerfo
from rocket_twin.systems.ground import Ground
from rocket_twin.systems.physics import Dynamics
from rocket_twin.systems.structure import NoseGeom, TubeGeom, WingsGeom
from rocket_twin.systems.tank import Pipe, Tank, TankFuel, TankGeom

from rocket_twin.systems.rocket import OCCGeometry, Stage, Rocket # isort: skip
from rocket_twin.systems.station import Station # isort: skip
from rocket_twin.systems.ground import Ground # isort: skip

__all__ = [
"Engine",
Expand All @@ -31,9 +28,6 @@
"StageControllerCoSApp",
"StationControllerCoSApp",
"RocketControllerCoSApp",
"StageControllerFMU",
"StationControllerFMU",
"RocketControllerFMU",
"NoseGeom",
"TubeGeom",
"WingsGeom",
Expand Down
7 changes: 0 additions & 7 deletions rocket_twin/systems/control/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@
from rocket_twin.systems.control.stage_controller_cosapp import StageControllerCoSApp
from rocket_twin.systems.control.station_controller_cosapp import StationControllerCoSApp

from rocket_twin.systems.control.rocket_controller_fmu import RocketControllerFMU # isort: skip
from rocket_twin.systems.control.stage_controller_fmu import StageControllerFMU # isort: skip
from rocket_twin.systems.control.station_controller_fmu import StationControllerFMU # isort: skip

__all__ = [
"StageControllerCoSApp",
"StationControllerCoSApp",
"RocketControllerCoSApp",
"StageControllerFMU",
"StationControllerFMU",
"RocketControllerFMU",
]
34 changes: 0 additions & 34 deletions rocket_twin/systems/control/rocket_controller.mo

This file was deleted.

Binary file not shown.
95 changes: 0 additions & 95 deletions rocket_twin/systems/control/rocket_controller_fmu.py

This file was deleted.

10 changes: 0 additions & 10 deletions rocket_twin/systems/control/stage_controller.mo

This file was deleted.

Binary file modified rocket_twin/systems/control/stage_controller/stage_controller.fmu
Binary file not shown.
2 changes: 1 addition & 1 deletion rocket_twin/systems/control/stage_controller_cosapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def setup(self):

self.add_outward("w", 1.0, desc="Command flow", unit="")

self.add_event("full", trigger="weight_prop == weight_max")
self.add_event("full", trigger="weight_prop == weight_max") # transition is defined in station

def compute(self):

Expand Down
77 changes: 0 additions & 77 deletions rocket_twin/systems/control/stage_controller_fmu.py

This file was deleted.

10 changes: 0 additions & 10 deletions rocket_twin/systems/control/station_controller.mo

This file was deleted.

Binary file not shown.
Loading