Filter löschen
Filter löschen

How to add constraints to a optimization problem matrix

8 Ansichten (letzte 30 Tage)
Hello everybody,
I have another problem to solve. It is a linear problem but it is pretty big and thats why Matlab needs more than 30 minutes to solve
[x,fval] = linprog(M, A, b, Aeq, beq);
My matrix A is approximately 40.000 x 20.000, so I have about 20.000 variables in my vector x.
I would like to add some constraints that the solver doesnt take to much time. I would like to add for example a constraint where I give him a possible x with a low function value M*x. My idea is that the branch and bound algorithm cuts more branches off because I added a guilty constraint with a very good value. How can I do this ? Do I have to set this as x_0 ??
Or is it possible to put this constraint in A. But I have no idea how to do this.
Actually I would like to add a row in my matrix A with this constraint, but I dont know how to combine this with my function value
Thank you very much for your help !
Best regards

Akzeptierte Antwort

Pruthvi Muppavarapu
Pruthvi Muppavarapu am 14 Mai 2019
Hi,
The following document might help you understand linear constraints and a way to use them:
Feel free to refer to the following example, which shows the usage of constraints in an optimization problem:
Hope this answer helps.
Regards,
Pruthvi
  1 Kommentar
Kernel7364
Kernel7364 am 19 Mai 2019
Hey Pruthvi,
thank you very much for the answer.
The examples and links you posted here were very helpful.
I solved my problem thanks to the links you gave me.
Have a great day and best regards,
Michael

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with Optimization Toolbox finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by