@@ -58,8 +58,15 @@ def create_cvxpy_problem(self):
5858 """
5959 It runs optimization to create optimal plan based upon clinical criteria
6060
61- :return: cvxpy problem object
61+ This method constructs the components of the CVXPY optimization problem:
62+ - Populates :attr obj: with a list of individual objective terms
63+ - Populates :attr constraints: with dose-based and clinical constraints
64+
65+ Note:
66+ This method does not return a CVXPY Problem object. Instead, it prepares the internal components
67+ used by :meth solve(): or for manual construction of a CVXPY Problem.
6268
69+ :return:
6370 """
6471
6572 # unpack data
@@ -324,16 +331,16 @@ def add_boo(self, num_beams: int):
324331
325332 def solve (self , return_cvxpy_prob = False , * args , ** kwargs ):
326333 """
327- Return optimal solution and influence matrix associated with it in the form of dictionary
328- If return_problem set to true, returns cvxpy problem instance
334+ Return optimal solution and influence matrix associated with it in the form of dictionary
335+ If return_problem set to true, returns cvxpy problem instance
329336
330- :Example
331- dict = {"optimal_fluence": [..],
332- "inf_matrix": my_plan.inf_marix
333- }
337+ :Example
338+ dict = {"optimal_fluence": [..],
339+ "inf_matrix": my_plan.inf_marix
340+ }
334341
335- :return: solution dictionary, cvxpy problem instance(optional)
336- """
342+ :return: solution dictionary, cvxpy problem instance(optional)
343+ """
337344
338345 problem = cp .Problem (cp .Minimize (cp .sum (self .obj )), constraints = self .constraints )
339346 print ('Running Optimization..' )
0 commit comments