1
$\begingroup$
ph = 80;
pc = 20;
kp = 0.5;
kc = 0.5;
kh = 0.778;
rt = 0.25;
rd = 0.1;
td = 10;
cfc = 10;
cfh = 10;
cobr0 = 68000;
ios0 = 75488.9;


c = {(120 - t1)*cfh == (t2 - 70)*cfc,
   fic == (t1 - 60)*cfh,
   fih == (140 - t2) + cfc,
   cobr == (pc*fic) + (ph*fih),
   ap == (cfh*(120 - t1))/(kp*(120 - t2)),
   ac == fic/(kc*dtc),
   ah == fih/(kh*dth),
   dtp == (((120 - t2)*(t1 - 70)*(((120 - t2) + (t1 - 70))/2)))^(1/3),
   dtc == (((t1 - 35)*40*(((t1 - 35) + 40)/2)))^(1/3),
   dth == ((40*(179 - t2)*((40 + 179 - t2)/2)))^(1/3), t1 >= 80, 
   t2 <= 110, dtp > 30, dtc > 30, dth > 30, ap >= 0, ah >= 0, ac >= 0};

ios = 6110*((ap + 0.00000001)^0.65 + (ac + 0.000000001)^0.65 + (ah + 
        0.000000001)^0.65);

pts = NMinimize[{ios, c}, {ap, ac, ah, dtc, dth, dtp, cobr, fih, fic, 
     t1, t2}, Method -> "NelderMead", 
    StepMonitor :> (Sow[{ac, ah, ap}])] // Reap;

ContourPlot3D[ios, {ac, 0, 2}, {ah, 0, 2}, {ap, 0, 2}, 
 Contours -> 10, 
 Epilog -> ({Red, PointSize[0.01], Line[pts[[2, 1]]], Yellow, 
    Point /@ pts[[2, 1]], Blue, PointSize[0.02], 
    Point[pts[[2, 1, 1]]]})]

So here is my problem. I can get the global optimum and i can create a 3d contour plot, but i can't figure out how to combine a step monitor with all of the above (or if it's even possible)

$\endgroup$
2
  • $\begingroup$ Show[ContourPlot3D[ios, {ac, 0, 2}, {ah, 0, 2}, {ap, 0, 2}, Contours -> 10], Graphics3D@({Red, PointSize[0.01], Line[pts[[2, 1]]], Yellow, Point /@ pts[[2, 1]], Blue, PointSize[0.02], Point[pts[[2, 1, 1]]]})] $\endgroup$ Jan 30, 2014 at 19:38
  • $\begingroup$ This seems to do the trick. Thank you very much. $\endgroup$
    – user 3 50
    Jan 30, 2014 at 19:54

1 Answer 1

0
$\begingroup$

Only for this question not getting to the un-answered queue:

Show[ContourPlot3D[ios, {ac, 0, 2}, {ah, 0, 2}, {ap, 0, 2}, Contours -> 10],             
     Graphics3D@({Red, PointSize[0.01], Line[pts[[2, 1]]], Yellow, Point /@ pts[[2, 1]], 
     Blue, PointSize[0.02], Point[pts[[2, 1, 1]]]})]
$\endgroup$
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.