Creates a copy of the optimization problem given as Opt object.
new_problem = problem.copy
new_problem = copy(problem)
problem |
Object of the Opt class that defines optimization problem. Class: Opt |
new_problem |
Object of the Opt that is an exact copy of problem. Class: Opt |
f = [1; -1];The linear inequality constraints
A = [1 2;-1 -0.3;-3 1]; b = [3; 1; 4];Create the optimization problem
problem = Opt('f',f,'A',A,'b',b)
------------------------------------------------- Linear program Num variables: 2 Num inequality constraints: 3 Num equality constraints: 0 Solver: LCP -------------------------------------------------We want to have a new copy of problem.
LPproblem = problem.copy
------------------------------------------------- Linear program Num variables: 2 Num inequality constraints: 3 Num equality constraints: 0 Solver: LCP -------------------------------------------------The new LPproblem is exactly the same as problem. If we transform problem to LCP, its representation will change
problem.qp2lcp
------------------------------------------------- Linear complementarity problem Num variables: 3 Num inequality constraints: 0 Num equality constraints: 0 Solver: LCP -------------------------------------------------But we keep the original problem stored as LPproblem.
◀ | feasibleset | mpt | ▶ |
© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch