@@ -41,7 +41,7 @@ def get_success_ratio(ac_reqs: list[LocationRequest], qubo: QuadraticProgram, so
4141 # sum over all LocationRequests and sum over their imaging_attempt_score if the respective indicator in sol[index] is 1
4242 solution_vector = solution_vector [::- 1 ]
4343 return cast (
44- float ,
44+ " float" ,
4545 (
4646 sum (
4747 [
@@ -71,7 +71,7 @@ def create_acquisition_position(
7171 np .cos (latitude ),
7272 ]
7373 )
74- return cast (np .ndarray [Any , np .dtype [np .float64 ]], res )
74+ return cast (" np.ndarray[Any, np.dtype[np.float64]]" , res )
7575
7676
7777def calc_needed_time_between_acquisition_attempts (
@@ -85,12 +85,12 @@ def calc_needed_time_between_acquisition_attempts(
8585 theta = np .arccos (delta_r1 @ delta_r2 / (np .linalg .norm (delta_r1 ) * np .linalg .norm (delta_r2 )))
8686 result = theta / (ROTATION_SPEED_SATELLITE * 2 * np .pi )
8787
88- return cast (np .ndarray [Any , np .dtype [np .float64 ]], result )
88+ return cast (" np.ndarray[Any, np.dtype[np.float64]]" , result )
8989
9090
9191def transition_possible (acq_1 : LocationRequest , acq_2 : LocationRequest ) -> bool :
9292 """Returns True if transition between acq_1 and acq_2 is possible, False otherwise"""
93- t_maneuver = cast (float , calc_needed_time_between_acquisition_attempts (acq_1 , acq_2 ))
93+ t_maneuver = cast (" float" , calc_needed_time_between_acquisition_attempts (acq_1 , acq_2 ))
9494 t1 = acq_1 .imaging_attempt
9595 t2 = acq_2 .imaging_attempt
9696 if t1 < t2 :
@@ -187,4 +187,4 @@ def convert_docplex_to_qubo(model: Model, penalty: int | None = None) -> Quadrat
187187def get_longitude (vector : np .ndarray [Any , np .dtype [np .float64 ]]) -> float :
188188 temp = vector * np .array ([1 , 1 , 0 ])
189189 temp /= np .linalg .norm (temp )
190- return cast (float , np .arccos (temp [0 ]) if temp [1 ] >= 0 else 2 * np .pi - np .arccos (temp [0 ]))
190+ return cast (" float" , np .arccos (temp [0 ]) if temp [1 ] >= 0 else 2 * np .pi - np .arccos (temp [0 ]))
0 commit comments