/////////////////////////////////////////////////////////////////////////
// resolution
// $Revision: 31078 $
// $Date: 2010-11-30 23:38:30 +1100 (Tue, 30 Nov 2010) $
// $LastChangedBy: kasprzyk $
/////////////////////////////////////////////////////////////////////////

//////////////////////////////////////
// Resolution: Takes approx 30s
//////////////////////////////////////
"------\nResolution\n";

F9 := FanOfWPS([1,1,1,2,2,2,3]);
v := Rays(F9)[5] + Rays(F9)[6] + Rays(F9)[7] - Rays(F9)[4];
F10 := Blowup(F9,v);
X10 := ToricVariety(Rationals(),F10);
time vars,maps := MMP(X10 : type := "all"); // approx 4.7s
assert #vars eq 6;
assert #maps eq 7;

time F95:=Resolution(F9);                   // approx 1.3s
time X95:=ToricVariety(Rationals(),F95);    // approx 0.4s
// note that results will vary, depending on resolution,
// that is why we do not assert anything.
time vars,arr:=MMP(X95);                    // approx 24s


/////////////////////////////////////////////////////////////////////////
// Finally, clear the caches
/////////////////////////////////////////////////////////////////////////
"------\nClearing caches\n";

CacheClearToricVariety();
CacheClearToricLattice();
