Dear Haythem:
I assume that the region where you want to pack the photovoltaic
panels is S = {(x,y) | g(x,y) <= 0}, where
g(x,y) = (x^2 + y^2)^2 - 55x^3 - 17xy^2.
Notice that your derivative of g with respect to y is wrong. It should
be
dwdp2(1) = 4.0d0 * p(2) * (p(1) ** 2.0d0 + p(2) ** 2.0d0) - &
34.0d0 * p(1) * p(2)
instead of
dwdp2(1) = 4.0d0 * p(2) * (p(1) ** 2.0d0 + p(2) ** 2.0d0) - &
55.0d0 * p(1) ** 3.0d0 - 34.0d0 * p(1) * p(2)
Moreover, the values you have chosen for xmin and ymin are wrong. The
values xmin, xmax, ymin and ymax should define a region
R ={(x,y) | xmin <= x <= xmax, ymin <= y <= ymax}
such that S is contained in R. Therefore, a possible choice for these
values is
xmin = 0.0d0
xmax = 55.0d0
ymin = -20.0d0
ymax = 20.0d0
Furthermore, you must change the subroutine drawsol() in order to draw
the region defined by S. The variable "scale" you will find while
adapting this subroutine to your problem can be set to 0.25d0, for
example.
Sincerely,
Rafael
> Hello Rafael,
>
> I'm Haythem, I was in touch with Ernesto about igenpack algorithm.
>
> I have a roof with an oval shape (55m=major axe and 38 m=minor axe), this
> roof has to be covered with photovoltaic panels.
> I need to know the maximum number of panels, that can be installed and the
> configuration.
>
> So the equation of the shape is this one: (x²+y²)²=55.x³+17*x*y²
> Dimensions of photovoltaic panels: 5.2m*0.5m
>
> I made the following changes in the code:
>
> Evalw:
>
> else if ( probid .eq. 7 ) then
>
> w(1) = (p(1) ** 2.0d0 + p(2) ** 2.0d0) ** 2.0d0 - 55.0d0 * p(1) **
> 3.0d0 - &
> 17*p(1)*p(2)**2
>
> Evaldw:
>
> else if ( probid .eq. 7 ) then
>
> dwdp1(1) = 4.0d0 * p(1) * (p(1) ** 2.0d0 + p(2) ** 2.0d0) - &
> 165.0d0 * p(1) ** 2.0d0 - 17.0d0 * p(2) ** 2.0d0
>
> dwdp2(1) = 4.0d0 * p(2) * (p(1) ** 2.0d0 + p(2) ** 2.0d0) - &
> 55.0d0 * p(1) ** 3.0d0 - 34.0d0 * p(1) * p(2)
>
> defpro
>
> else if ( probid .eq. 7 ) then
>
> dx = 0.5d0 * 5.2d0
> dy = 0.5d0 * 0.5d0
>
> lx = - 40.0d+99
> ux = 40.0d+99
> ly = - 20.0d+99
> uy = 20.0d+99
>
> xmin = 0.0d0
> xmax = 40.0d0
> ymin = 0.0d0
> ymax = 60.0d0
>
> r = 1
>
> Ernesto told me the values of lx, ux, ... were wrong.
> I can only pack 5 rectangles... You'll find the drawing solution
>
> I can't draw the oval too.
>
> Can you please help me solving these problems?
>
>
> Thanks,
> Best regards
>
On Friday, May 4, 2012 11:05:28 AM UTC-3, Haythem wrote: