File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
python/cuopt/cuopt/linear_programming Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -527,7 +527,23 @@ class Problem:
527527 Variable can be be created by calling addVariable()
528528 Constraints can be added by calling addConstraint()
529529 The objective can be set by calling setObjective()
530- The problem data is formed when calling solve()
530+ The problem data is formed when calling solve().
531+
532+ Parameters
533+ ----------
534+ model_name : str, optional
535+ Name of the model. Default is an empty string.
536+
537+ Examples
538+ --------
539+ >>> problem = problem.Problem("MIP_model")
540+ >>> x = problem.addVariable(lb=-2.0, ub=8.0, vtype=VType.INTEGER)
541+ >>> y = problem.addVariable(name="Var2")
542+ >>> problem.addConstraint(2*x - 3*y <= 10, name="Constr1")
543+ >>> expr = 3*x + y
544+ >>> problem.addConstraint(expr + x == 20, name="Constr2")
545+ >>> problem.setObjective(x + y, sense=sense.MAXIMIZE)
546+ >>> problem.solve()
531547 """
532548
533549 def __init__ (self , model_name = "" ):
You can’t perform that action at this time.
0 commit comments