how can I compress many iterations for solving a program?
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
Hello,
I have created a function that solves a linear program for many iterations, more specifically I am changing the X(i)=X(i)+10^(-4) and I am solving the Linear Program for the new value of the X and I check if this value satisfies an inquality, e.g. X<Y. Value of Y is the output of another function (it has the new X as an input) I have included in the first function. Unfortunately, I am having so many iterations and the execution time is so long. Do you have any ideas about how can I reduce it and make it more efficient?
Thank you in advance.
8 Kommentare
Amit
am 3 Feb. 2014
Can you attach your code? If not, please add a little more details.
Walter Roberson
am 3 Feb. 2014
Are you trying to locate the boundary at which the inequality is no longer satisfied?
jimaras
am 3 Feb. 2014
Bearbeitet: Walter Roberson
am 3 Feb. 2014
jimaras
am 3 Feb. 2014
Walter Roberson
am 3 Feb. 2014
Are the inputs integral? Or could they have fractions?
Amit
am 3 Feb. 2014
Ultimately, here the issue is your step size. Unless you can be adaptive or increase the step size somehow, you cannot get out of it.
Without knowing what ArbitrageApple does, we (atleast I) cannot suggest what should be done
jimaras
am 3 Feb. 2014
Antworten (1)
Walter Roberson
am 3 Feb. 2014
0 Stimmen
The HighestPrice code you show above is nearly as fast as you can get. You need to concentrate on making ArbitrageApple faster.
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!