net.sf.cpsolver.coursett.model
Class RoomLocation

java.lang.Object
  extended by net.sf.cpsolver.coursett.model.RoomLocation
All Implemented Interfaces:
Comparable<RoomLocation>

public class RoomLocation
extends Object
implements Comparable<RoomLocation>

Room part of placement.

Version:
CourseTT 1.2 (University Course Timetabling)
Copyright (C) 2006 - 2010 Tomas Muller
muller@unitime.org
http://muller.unitime.org

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses/.

Constructor Summary
RoomLocation(Long id, String name, Long bldgId, int preference, int size, Double x, Double y, boolean ignoreTooFar, RoomConstraint rc)
          Constructor
 
Method Summary
 int compareTo(RoomLocation o)
           
 boolean equals(Object o)
           
 Long getBuildingId()
          Building id
 double getDistanceInMeters(DistanceMetric m, RoomLocation roomLocation)
           
 int getDistanceInMinutes(DistanceMetric m, RoomLocation roomLocation)
           
 Long getId()
          Room id
 boolean getIgnoreTooFar()
           
 String getName()
          Room name
 Double getPosX()
          X-position of the building
 Double getPosY()
          Y-position of the building
 int getPreference()
          Room preference
 RoomConstraint getRoomConstraint()
           
 int getRoomSize()
          Room size
 int hashCode()
           
 void setCoordinates(Double x, Double y)
          Position of the building
 void setPreference(int preference)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoomLocation

public RoomLocation(Long id,
                    String name,
                    Long bldgId,
                    int preference,
                    int size,
                    Double x,
                    Double y,
                    boolean ignoreTooFar,
                    RoomConstraint rc)
Constructor

Parameters:
id - room id
name - room name
bldgId - building id
preference - soft preference
size - room size
x - x-position of the building
y - y-position of the building
Method Detail

getId

public Long getId()
Room id


getBuildingId

public Long getBuildingId()
Building id


getName

public String getName()
Room name


getPreference

public int getPreference()
Room preference


setPreference

public void setPreference(int preference)

getRoomSize

public int getRoomSize()
Room size


setCoordinates

public void setCoordinates(Double x,
                           Double y)
Position of the building


getPosX

public Double getPosX()
X-position of the building


getPosY

public Double getPosY()
Y-position of the building


getIgnoreTooFar

public boolean getIgnoreTooFar()

getRoomConstraint

public RoomConstraint getRoomConstraint()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getDistanceInMeters

public double getDistanceInMeters(DistanceMetric m,
                                  RoomLocation roomLocation)

getDistanceInMinutes

public int getDistanceInMinutes(DistanceMetric m,
                                RoomLocation roomLocation)

compareTo

public int compareTo(RoomLocation o)
Specified by:
compareTo in interface Comparable<RoomLocation>

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2014 UniTime LLC. All Rights Reserved.