@Override
	public double devalue(ShopKeeper shop, Environmental product)
	{
		final int num=shop.getShop().numberInStock(product);
		if(num<=0) return 0.0;
		double resourceRate=0.0;
		double itemRate=0.0;
		final String s=shop.finalDevalueRate();
		final Vector<String> V=CMParms.parse(s.trim());
		if(V.size()<=0)
			return 0.0;
		else
		if(V.size()==1)
		{
			resourceRate=CMath.div(CMath.s_double(V.firstElement()),100.0);
			itemRate=resourceRate;
		}
		else
		{
			itemRate=CMath.div(CMath.s_double(V.firstElement()),100.0);
			resourceRate=CMath.div(CMath.s_double(V.lastElement()),100.0);
		}
		double rate=(product instanceof RawMaterial)?resourceRate:itemRate;
		rate=rate*num;
		if(rate>1.0) rate=1.0;
		if(rate<0.0) rate=0.0;
		return rate;
	}