Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.
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)

share|improve this question
    
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]]]})] –  belisarius Jan 30 at 19:38
    
This seems to do the trick. Thank you very much. –  user 3 50 Jan 30 at 19:54

1 Answer 1

up vote 0 down vote accepted

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]]]})]
share|improve this answer
    
i'm sorry i am a bit new here so i didn't know the protocol. –  user 3 50 Jan 30 at 20:17
    
@user12073 You haven't done anything wrong. Welcome to the site. When you have doubts about the site etiquette you can ask in chat chat.stackexchange.com/rooms/2234/wolfram-mathematica –  belisarius Jan 30 at 20:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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