diff --git a/docs/build/doctrees/nbsphinx/examples/multiagent_envs.ipynb b/docs/build/doctrees/nbsphinx/examples/multiagent_envs.ipynb index 5f0985ef..a226a62b 100644 --- a/docs/build/doctrees/nbsphinx/examples/multiagent_envs.ipynb +++ b/docs/build/doctrees/nbsphinx/examples/multiagent_envs.ipynb @@ -14,10 +14,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T01:14:11.832284Z", - "iopub.status.busy": "2024-05-30T01:14:11.832192Z", - "iopub.status.idle": "2024-05-30T01:14:11.836625Z", - "shell.execute_reply": "2024-05-30T01:14:11.836368Z" + "iopub.execute_input": "2024-05-30T02:22:13.170922Z", + "iopub.status.busy": "2024-05-30T02:22:13.170812Z", + "iopub.status.idle": "2024-05-30T02:22:13.176020Z", + "shell.execute_reply": "2024-05-30T02:22:13.175728Z" } }, "outputs": [], diff --git a/docs/build/doctrees/nbsphinx/examples/rllib_training.ipynb b/docs/build/doctrees/nbsphinx/examples/rllib_training.ipynb index d3ae15ef..53bcf05c 100644 --- a/docs/build/doctrees/nbsphinx/examples/rllib_training.ipynb +++ b/docs/build/doctrees/nbsphinx/examples/rllib_training.ipynb @@ -12,10 +12,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T01:14:13.120944Z", - "iopub.status.busy": "2024-05-30T01:14:13.120825Z", - "iopub.status.idle": "2024-05-30T01:14:13.125502Z", - "shell.execute_reply": "2024-05-30T01:14:13.125218Z" + "iopub.execute_input": "2024-05-30T02:22:14.311233Z", + "iopub.status.busy": "2024-05-30T02:22:14.311148Z", + "iopub.status.idle": "2024-05-30T02:22:14.316857Z", + "shell.execute_reply": "2024-05-30T02:22:14.316565Z" } }, "outputs": [ diff --git a/docs/build/doctrees/nbsphinx/examples/satellite_configuration.ipynb b/docs/build/doctrees/nbsphinx/examples/satellite_configuration.ipynb index b839a697..74b34f4e 100644 --- a/docs/build/doctrees/nbsphinx/examples/satellite_configuration.ipynb +++ b/docs/build/doctrees/nbsphinx/examples/satellite_configuration.ipynb @@ -12,10 +12,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T01:14:14.275239Z", - "iopub.status.busy": "2024-05-30T01:14:14.275138Z", - "iopub.status.idle": "2024-05-30T01:14:14.279420Z", - "shell.execute_reply": "2024-05-30T01:14:14.279142Z" + "iopub.execute_input": "2024-05-30T02:22:15.389648Z", + "iopub.status.busy": "2024-05-30T02:22:15.389566Z", + "iopub.status.idle": "2024-05-30T02:22:15.394202Z", + "shell.execute_reply": "2024-05-30T02:22:15.393962Z" } }, "outputs": [ diff --git a/docs/build/doctrees/nbsphinx/examples/simple_environment.ipynb b/docs/build/doctrees/nbsphinx/examples/simple_environment.ipynb index 5e2fe381..85f16b8c 100644 --- a/docs/build/doctrees/nbsphinx/examples/simple_environment.ipynb +++ b/docs/build/doctrees/nbsphinx/examples/simple_environment.ipynb @@ -19,10 +19,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T01:14:15.432678Z", - "iopub.status.busy": "2024-05-30T01:14:15.432582Z", - "iopub.status.idle": "2024-05-30T01:14:16.424140Z", - "shell.execute_reply": "2024-05-30T01:14:16.423812Z" + "iopub.execute_input": "2024-05-30T02:22:16.439967Z", + "iopub.status.busy": "2024-05-30T02:22:16.439880Z", + "iopub.status.idle": "2024-05-30T02:22:17.276558Z", + "shell.execute_reply": "2024-05-30T02:22:17.276116Z" } }, "outputs": [], @@ -55,10 +55,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T01:14:16.426230Z", - "iopub.status.busy": "2024-05-30T01:14:16.425928Z", - "iopub.status.idle": "2024-05-30T01:14:16.428377Z", - "shell.execute_reply": "2024-05-30T01:14:16.428123Z" + "iopub.execute_input": "2024-05-30T02:22:17.278717Z", + "iopub.status.busy": "2024-05-30T02:22:17.278498Z", + "iopub.status.idle": "2024-05-30T02:22:17.280902Z", + "shell.execute_reply": "2024-05-30T02:22:17.280632Z" } }, "outputs": [], @@ -72,8 +72,8 @@ " obs.Eclipse(),\n", " ]\n", " action_spec = [\n", - " act.Scan(duration=60.0),\n", - " act.Charge(duration=120.0),\n", + " act.Scan(duration=60.0), # Scan for 1 minute\n", + " act.Charge(duration=600.0), # Charge for 10 minutes\n", " ]\n", " dyn_type = dyn.ContinuousImagingDynModel\n", " fsw_type = fsw.ContinuousImagingFSWModel" @@ -92,10 +92,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T01:14:16.429956Z", - "iopub.status.busy": "2024-05-30T01:14:16.429852Z", - "iopub.status.idle": "2024-05-30T01:14:16.433696Z", - "shell.execute_reply": "2024-05-30T01:14:16.433442Z" + "iopub.execute_input": "2024-05-30T02:22:17.282442Z", + "iopub.status.busy": "2024-05-30T02:22:17.282329Z", + "iopub.status.idle": "2024-05-30T02:22:17.286428Z", + "shell.execute_reply": "2024-05-30T02:22:17.286166Z" } }, "outputs": [ @@ -172,10 +172,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T01:14:16.435092Z", - "iopub.status.busy": "2024-05-30T01:14:16.434986Z", - "iopub.status.idle": "2024-05-30T01:14:16.437497Z", - "shell.execute_reply": "2024-05-30T01:14:16.437132Z" + "iopub.execute_input": "2024-05-30T02:22:17.287827Z", + "iopub.status.busy": "2024-05-30T02:22:17.287721Z", + "iopub.status.idle": "2024-05-30T02:22:17.290513Z", + "shell.execute_reply": "2024-05-30T02:22:17.290150Z" } }, "outputs": [], @@ -184,9 +184,9 @@ "\n", "# Set some parameters as constants\n", "sat_args[\"imageAttErrorRequirement\"] = 0.05\n", - "# sat_args[\"imageRateErrorRequirement\"] = 0.01\n", "sat_args[\"dataStorageCapacity\"] = 1e10\n", "sat_args[\"instrumentBaudRate\"] = 1e7\n", + "sat_args[\"storedCharge_Init\"] = 50000.0\n", "\n", "# Randomize the initial storage level on every reset\n", "sat_args[\"storageInit\"] = lambda: np.random.uniform(0.25, 0.75) * 1e10\n", @@ -212,10 +212,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T01:14:16.439206Z", - "iopub.status.busy": "2024-05-30T01:14:16.439052Z", - "iopub.status.idle": "2024-05-30T01:14:16.562210Z", - "shell.execute_reply": "2024-05-30T01:14:16.561867Z" + "iopub.execute_input": "2024-05-30T02:22:17.292335Z", + "iopub.status.busy": "2024-05-30T02:22:17.292184Z", + "iopub.status.idle": "2024-05-30T02:22:17.396747Z", + "shell.execute_reply": "2024-05-30T02:22:17.396438Z" } }, "outputs": [ @@ -223,28 +223,35 @@ "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,439 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[mCalling env.reset() to get observation space\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,293 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[mCalling env.reset() to get observation space\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,440 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[mResetting environment with seed=3191535840\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,293 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[mResetting environment with seed=3825872640\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,558 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4773549952']\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,379 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mFinding opportunity windows from 0.00 to 5700.00 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,559 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mEnvironment reset\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,394 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_11822013968']\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,394 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mEnvironment reset\u001b[0m\n" ] } ], @@ -254,6 +261,7 @@ " satellite=sat,\n", " scenario=scene.UniformNadirScanning(),\n", " rewarder=data.ScanningTimeReward(),\n", + " time_limit=5700.0, # approximately 1 orbit\n", " log_level=\"INFO\",\n", ")" ] @@ -272,10 +280,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T01:14:16.563866Z", - "iopub.status.busy": "2024-05-30T01:14:16.563758Z", - "iopub.status.idle": "2024-05-30T01:14:16.828151Z", - "shell.execute_reply": "2024-05-30T01:14:16.827853Z" + "iopub.execute_input": "2024-05-30T02:22:17.398631Z", + "iopub.status.busy": "2024-05-30T02:22:17.398480Z", + "iopub.status.idle": "2024-05-30T02:22:17.692246Z", + "shell.execute_reply": "2024-05-30T02:22:17.691868Z" } }, "outputs": [ @@ -283,26 +291,33 @@ "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,649 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[mResetting environment with seed=0\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,502 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[mResetting environment with seed=1\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,678 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mFinding opportunity windows from 0.00 to 5700.00 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,825 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4773549952']\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,690 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_11822013968']\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,826 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mEnvironment reset\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,690 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mEnvironment reset\u001b[0m\n" ] } ], "source": [ - "observation, info = env.reset(seed=0)" + "observation, info = env.reset(seed=1)" ] }, { @@ -310,7 +325,9 @@ "metadata": {}, "source": [ "Next, we take the scan action (`action=0`) a few times. This allows for the satellite to\n", - "settle in the pointing mode to satisfy imaging conditions." + "settle its attitude in the nadir pointing mode to satisfy imaging conditions. Note that \n", + "the logs show little or no data accumulated in the first two steps as it settles, but\n", + "achieves 60 reward (corresponding to 60 seconds of imaging) by the third step." ] }, { @@ -318,10 +335,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T01:14:16.830538Z", - "iopub.status.busy": "2024-05-30T01:14:16.830395Z", - "iopub.status.idle": "2024-05-30T01:14:16.851335Z", - "shell.execute_reply": "2024-05-30T01:14:16.851094Z" + "iopub.execute_input": "2024-05-30T02:22:17.693831Z", + "iopub.status.busy": "2024-05-30T02:22:17.693721Z", + "iopub.status.idle": "2024-05-30T02:22:17.715926Z", + "shell.execute_reply": "2024-05-30T02:22:17.715510Z" } }, "outputs": [ @@ -329,176 +346,176 @@ "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,831 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,694 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,831 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_nadir_scan tasked for 60.0 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,694 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_nadir_scan tasked for 60.0 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,831 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 60.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,695 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 60.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,832 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mRunning simulation at most to 600.00 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,695 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mRunning simulation at most to 600.00 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,836 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 60.0 for action_nadir_scan\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,699 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 60.0 for action_nadir_scan\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,836 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mData reward: {'EO1_4773549952': 0.0}\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,699 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 0.0}\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,837 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4773549952']\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,700 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_11822013968']\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,837 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,700 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,838 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,701 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,838 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_nadir_scan tasked for 60.0 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,701 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_nadir_scan tasked for 60.0 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,838 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 120.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,701 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 120.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,839 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mRunning simulation at most to 660.00 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,702 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mRunning simulation at most to 660.00 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,843 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 120.0 for action_nadir_scan\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,706 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 120.0 for action_nadir_scan\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,843 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mData reward: {'EO1_4773549952': 20.0}\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,706 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 30.0}\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,844 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4773549952']\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,707 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_11822013968']\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,844 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mStep reward: 20.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,707 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mStep reward: 30.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,844 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,708 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,844 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_nadir_scan tasked for 60.0 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,708 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_nadir_scan tasked for 60.0 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,844 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 180.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,708 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 180.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,845 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mRunning simulation at most to 720.00 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,708 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mRunning simulation at most to 720.00 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,848 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 180.0 for action_nadir_scan\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,712 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 180.0 for action_nadir_scan\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,848 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mData reward: {'EO1_4773549952': 60.0}\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,713 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 60.0}\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,849 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4773549952']\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,713 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_11822013968']\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,849 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mStep reward: 60.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,714 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mStep reward: 60.0\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Initial data level: 0.5102387397 (randomized by sat_args)\n", - " Final data level: 0.5902387397\n" + "Initial data level: 0.7341307878 (randomized by sat_args)\n", + " Final data level: 0.8241307878\n" ] } ], @@ -513,7 +530,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Note that the logs show little or no \n" + "The observation reflects the increase in stored data. The first element, corresponding\n", + "to `storage_level_fraction`, starts at a random value set by the `storageInit` function\n", + "in `sat_args` and increases based on the time spent imaging.\n", + "\n", + "Finally, the charging mode is tasked repeatedly in 10-minute increments until the\n", + "environment time limit is reached." ] }, { @@ -521,10 +543,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T01:14:16.852962Z", - "iopub.status.busy": "2024-05-30T01:14:16.852831Z", - "iopub.status.idle": "2024-05-30T01:14:16.864475Z", - "shell.execute_reply": "2024-05-30T01:14:16.864227Z" + "iopub.execute_input": "2024-05-30T02:22:17.717719Z", + "iopub.status.busy": "2024-05-30T02:22:17.717625Z", + "iopub.status.idle": "2024-05-30T02:22:18.124705Z", + "shell.execute_reply": "2024-05-30T02:22:18.124362Z" } }, "outputs": [ @@ -532,62 +554,487 @@ "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,853 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,718 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,718 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 600.0 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,718 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 780.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,719 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mRunning simulation at most to 780.00 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,756 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<780.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 0.0}\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,782 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<780.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,783 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<780.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,783 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<780.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 600.0 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,784 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<780.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 1380.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,784 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<780.00> \u001b[0m\u001b[mRunning simulation at most to 1380.00 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,819 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<1380.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 0.0}\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,820 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<1380.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,820 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<1380.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,821 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<1380.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 600.0 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,821 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<1380.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 1980.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,821 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<1380.00> \u001b[0m\u001b[mRunning simulation at most to 1980.00 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,856 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<1980.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 0.0}\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,857 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<1980.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,858 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<1980.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,858 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<1980.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 600.0 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,858 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<1980.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 2580.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,858 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<1980.00> \u001b[0m\u001b[mRunning simulation at most to 2580.00 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,894 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<2580.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 0.0}\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Charge level: 0.160 (780.0 seconds)\n", + "\tEclipse: start: 5340.0 end: 1800.0\n", + "Charge level: 0.158 (1380.0 seconds)\n", + "\tEclipse: start: 4740.0 end: 1200.0\n", + "Charge level: 0.155 (1980.0 seconds)\n", + "\tEclipse: start: 4140.0 end: 600.0\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,925 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<2580.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,926 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<2580.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,926 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<2580.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 600.0 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,927 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<2580.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 3180.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:17,927 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<2580.00> \u001b[0m\u001b[mRunning simulation at most to 3180.00 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,853 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 120.0 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,962 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<3180.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 0.0}\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,853 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 300.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,963 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<3180.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,854 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mRunning simulation at most to 780.00 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,964 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<3180.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,861 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<300.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 300.0 for action_charge\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,964 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<3180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 600.0 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,862 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<300.00> \u001b[0m\u001b[mData reward: {'EO1_4773549952': 0.0}\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,964 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<3180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 3780.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,862 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<300.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4773549952']\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:17,964 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<3180.00> \u001b[0m\u001b[mRunning simulation at most to 3780.00 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 18:14:16,862 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<300.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 19:22:18,000 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<3780.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 0.0}\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Charge level: 0.175 (2580.0 seconds)\n", + "\tEclipse: start: 3540.0 end: 5670.0\n", + "Charge level: 0.763 (3180.0 seconds)\n", + "\tEclipse: start: 2940.0 end: 5070.0\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,001 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<3780.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,002 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<3780.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,002 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<3780.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 600.0 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,002 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<3780.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 4380.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,003 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<3780.00> \u001b[0m\u001b[mRunning simulation at most to 4380.00 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,038 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<4380.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 0.0}\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,039 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<4380.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,039 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<4380.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,039 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<4380.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 600.0 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,040 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<4380.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 4980.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,040 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<4380.00> \u001b[0m\u001b[mRunning simulation at most to 4980.00 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,074 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<4980.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 0.0}\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,075 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<4980.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,076 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<4980.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,076 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<4980.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 600.0 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,076 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<4980.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 5580.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,076 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<4980.00> \u001b[0m\u001b[mRunning simulation at most to 5580.00 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,111 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<5580.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 0.0}\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,112 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<5580.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,113 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<5580.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,113 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<5580.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 600.0 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,113 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<5580.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 6180.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,114 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<5580.00> \u001b[0m\u001b[mRunning simulation at most to 5700.00 seconds\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,121 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<5700.00> \u001b[0m\u001b[mData reward: {'EO1_11822013968': 0.0}\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,122 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<5700.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,122 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<5700.00> \u001b[0m\u001b[mEpisode terminated: False\u001b[0m\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[90;3m2024-05-29 19:22:18,122 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<5700.00> \u001b[0m\u001b[mEpisode truncated: True\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Charge level: 1.000 (3780.0 seconds)\n", + "\tEclipse: start: 2340.0 end: 4470.0\n", + "Charge level: 1.000 (4380.0 seconds)\n", + "\tEclipse: start: 1740.0 end: 3870.0\n", + "Charge level: 1.000 (4980.0 seconds)\n", + "\tEclipse: start: 1140.0 end: 3270.0\n", + "Charge level: 1.000 (5580.0 seconds)\n", + "\tEclipse: start: 540.0 end: 2670.0\n", + "Charge level: 1.000 (5700.0 seconds)\n", + "\tEclipse: start: 420.0 end: 2550.0\n" ] } ], "source": [ - "observation, reward, terminated, truncated, info = env.step(action=1)\n", - "diff = True" + "while not truncated:\n", + " observation, reward, terminated, truncated, info = env.step(action=1)\n", + " print(f\"Charge level: {observation[1]:.3f} ({env.unwrapped.simulator.sim_time:.1f} seconds)\\n\\tEclipse: start: {observation[2]:.1f} end: {observation[3]:.1f}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It is observed that the battery decrease while the satellite is in eclipse, but once the\n", + "satellite is out of eclipse, the battery quickly increases to full charge." ] } ], diff --git a/docs/source/conf.py b/docs/source/conf.py index 334425b8..cb9e14fe 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -289,11 +289,6 @@ def run(self, source_dir=None): nb_cache = ( self.nb_cache_dir / self.base_doc_dir / index_path / notebook.name ) - - print() - print(notebook.resolve()) - print("cache at", nb_cache.resolve(), nb_cache.is_file()) - if ( self.nb_cache_dir is not None and nb_cache.is_file() @@ -305,13 +300,11 @@ def run(self, source_dir=None): ).__repr__() ) ): - print("COPYING CACHE") shutil.copy( nb_cache, self.base_doc_dir / index_path / notebook.name, ) else: - print("COPYING NOTEBOOK") shutil.copy(notebook, self.base_doc_dir / index_path / notebook.name) # Recursively go through all directories in source, documenting what is available. diff --git a/docs/source/index.rst b/docs/source/index.rst index 4cfb2c5e..edf2fed2 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,5 +1,5 @@ -BSK-RL: Environments Spacecraft Planning and Scheduling -======================================================= +BSK-RL: Environments for Spacecraft Planning and Scheduling +=========================================================== .. toctree:: :hidden: @@ -58,72 +58,8 @@ Complete installation instructions and common troubleshooting tips can be found Construct an Environment ^^^^^^^^^^^^^^^^^^^^^^^^ -A more detailed tutorial can be found at :doc:`examples/simple_environment`. To construct -an environment - -#. Import the necessary modules. - - .. code-block:: python - - import gymnasium as gym - - import bsk_rl - from bsk_rl import act, obs, scene, sats - -#. Describe the satellite's actions and observations. - - .. code-block:: python - - class MyImagingSatellite(sats.Satellite): - observation_spec = [ - obs.SatProperties( - dict(prop="storage_level_fraction"), - dict(prop="battery_charge_fraction") - ), - obs.Eclipse(), - obs.OpportunityProperties( - dict(prop="opportunity_open"), - dict(prop="opportunity_close"), - n_ahead_observe=2, - type="ground_station", - ), - ] - action_spec = [ - act.Scan(duration=60.0), - act.Charge(duration=120.0), - act.Downlink(duration=60.0), - ] - -#. Make the environment. Pass specific and randomized configurations to the satellite. - - .. code-block:: python - - env = gym.make( - "SatelliteTasking-v1", - satellites=MyImagingSatellite( - name="EO1", - sat_args=dict( - imageAttErrorRequirement=0.05, - imageRateErrorRequirement=0.05, - dataStorageCapacity=3.0, - storageInit=lambda: np.random.uniform(0.5, 2.5), - )), - scenario=scene.UniformNadirScanning(value_per_second=1/10000.0), - time_limit=10000.0, - failure_penalty=-1.0, - log_level="INFO", - ) - -#. Step through the environment with random actions. - - .. code-block:: python - - obs, info = env.reset() - terminated = False - truncated = False - while not (terminated or truncated): - action = env.action_space.sample() - observation, reward, terminated, truncated, info = env.step(action) +A quick but comprehensive tutorial can be found at :doc:`examples/simple_environment`. + Acknowledgements ---------------- diff --git a/examples/simple_environment.ipynb b/examples/simple_environment.ipynb index f90fef45..b6f78c05 100644 --- a/examples/simple_environment.ipynb +++ b/examples/simple_environment.ipynb @@ -58,8 +58,8 @@ " obs.Eclipse(),\n", " ]\n", " action_spec = [\n", - " act.Scan(duration=60.0),\n", - " act.Charge(duration=120.0),\n", + " act.Scan(duration=60.0), # Scan for 1 minute\n", + " act.Charge(duration=600.0), # Charge for 10 minutes\n", " ]\n", " dyn_type = dyn.ContinuousImagingDynModel\n", " fsw_type = fsw.ContinuousImagingFSWModel" @@ -100,9 +100,9 @@ "\n", "# Set some parameters as constants\n", "sat_args[\"imageAttErrorRequirement\"] = 0.05\n", - "# sat_args[\"imageRateErrorRequirement\"] = 0.01\n", "sat_args[\"dataStorageCapacity\"] = 1e10\n", "sat_args[\"instrumentBaudRate\"] = 1e7\n", + "sat_args[\"storedCharge_Init\"] = 50000.0\n", "\n", "# Randomize the initial storage level on every reset\n", "sat_args[\"storageInit\"] = lambda: np.random.uniform(0.25, 0.75) * 1e10\n", @@ -134,6 +134,7 @@ " satellite=sat,\n", " scenario=scene.UniformNadirScanning(),\n", " rewarder=data.ScanningTimeReward(),\n", + " time_limit=5700.0, # approximately 1 orbit\n", " log_level=\"INFO\",\n", ")" ] @@ -153,7 +154,7 @@ "metadata": {}, "outputs": [], "source": [ - "observation, info = env.reset(seed=0)" + "observation, info = env.reset(seed=1)" ] }, { @@ -161,7 +162,9 @@ "metadata": {}, "source": [ "Next, we take the scan action (`action=0`) a few times. This allows for the satellite to\n", - "settle in the pointing mode to satisfy imaging conditions." + "settle its attitude in the nadir pointing mode to satisfy imaging conditions. Note that \n", + "the logs show little or no data accumulated in the first two steps as it settles, but\n", + "achieves 60 reward (corresponding to 60 seconds of imaging) by the third step." ] }, { @@ -180,7 +183,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Note that the logs show little or no \n" + "The observation reflects the increase in stored data. The first element, corresponding\n", + "to `storage_level_fraction`, starts at a random value set by the `storageInit` function\n", + "in `sat_args` and increases based on the time spent imaging.\n", + "\n", + "Finally, the charging mode is tasked repeatedly in 10-minute increments until the\n", + "environment time limit is reached." ] }, { @@ -189,8 +197,17 @@ "metadata": {}, "outputs": [], "source": [ - "observation, reward, terminated, truncated, info = env.step(action=1)\n", - "diff = True" + "while not truncated:\n", + " observation, reward, terminated, truncated, info = env.step(action=1)\n", + " print(f\"Charge level: {observation[1]:.3f} ({env.unwrapped.simulator.sim_time:.1f} seconds)\\n\\tEclipse: start: {observation[2]:.1f} end: {observation[3]:.1f}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It is observed that the battery decrease while the satellite is in eclipse, but once the\n", + "satellite is out of eclipse, the battery quickly increases to full charge." ] } ], diff --git a/src/bsk_rl/_default.rst b/src/bsk_rl/_default.rst index 3b45e1eb..9d1bc0db 100644 --- a/src/bsk_rl/_default.rst +++ b/src/bsk_rl/_default.rst @@ -48,5 +48,4 @@ See the :ref:`examples` for more information on environment configuration argume data/index comm/index sim/index - train/index utils/index diff --git a/src/bsk_rl/train/mcts_learn b/src/bsk_rl/train/mcts_learn deleted file mode 100644 index e69de29b..00000000 diff --git a/src/bsk_rl/train/rllib b/src/bsk_rl/train/rllib deleted file mode 100644 index e69de29b..00000000 diff --git a/src/bsk_rl/train/shields b/src/bsk_rl/train/shields deleted file mode 100644 index e69de29b..00000000 diff --git a/src/bsk_rl/train/todo b/src/bsk_rl/train/todo deleted file mode 100644 index e69de29b..00000000