|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.optiloading.Ship
public class Ship
Ship class used to stow information about the ship and do ship's calculations.
Field Summary | |
---|---|
java.util.ArrayList<Intensity> |
intensitylist
An ArrayList containing the intensity data used to make hull stress calculations. |
java.util.ArrayList<Tank> |
tanks
Represents a list of all the ship's cargo tanks. |
Cargo |
toLoad
|
Method Summary | |
---|---|
boolean |
checkDeadweight(float weight,
float dens)
Method to check if the deadweight is acceptable. |
boolean |
checkToLoad(Cargo tload,
float dens,
float t,
float c)
Method to check the cargo and set the to be loaded cargo if the desired cargo value is acceptable. |
boolean |
checkToLoad(float tmd,
float spec,
float dens,
float t,
float c)
Method to check if it is possible to achieve a desired TMD and if so set the to be loaded cargo value. |
boolean |
checkVolume(float vol)
Method to check if the cargo volume is acceptable. |
float |
getData(ShipParticular particular)
Method used to get ship particulars. |
float |
getDispAtTMD(float tmd,
float dens)
Method to calculate the displacement at a desired TMD and water density. |
static Ship |
getInstance()
Returns the uniqueInstance of the Ship object (Singleton). |
java.util.ArrayList<java.lang.Float> |
getSolution(java.util.ArrayList<java.lang.Float> volumes)
Method used to set Volumes and get the solution values (mainly used for testing purposes). |
void |
loadShipData(java.io.InputStream shipd,
java.io.InputStream hydrod,
java.io.InputStream tankd,
java.io.InputStream buoyancyd)
Method to load all the ship's data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.ArrayList<Intensity> intensitylist
public java.util.ArrayList<Tank> tanks
public Cargo toLoad
Method Detail |
---|
public static Ship getInstance()
public void loadShipData(java.io.InputStream shipd, java.io.InputStream hydrod, java.io.InputStream tankd, java.io.InputStream buoyancyd)
shipd
- InputStream object containing general ship's data.hydrod
- InputStream object containing the ship's hydrostatic tables.tankd
- InputStream object containg tank data from the ship.buoyancyd
- InputStream object containg section data from the ship.public boolean checkToLoad(Cargo tload, float dens, float t, float c)
tload
- Cargo object containing the weight, volume and specific gravity of the cargo.dens
- Floating point value that contains the density of the water in which the ship is floating.f
- Floating point value that contains the desired trim.c
- Floating point value that contains the weight of the miscellaneous compartments.
public boolean checkToLoad(float tmd, float spec, float dens, float t, float c)
tmd
- Floating point value indicating the desired TMD.spec
- Floating point value indicating the specific gravity of the cargo to be loaded.dens
- Floating point value that contains the density of the water in which the ship is floating.f
- Floating point value that contains the desired trim.c
- Floating point value that contains the weight of the miscellaneous compartments.
public float getDispAtTMD(float tmd, float dens)
tmd
- Floating point indicating the true mean draught.dens
- Floating point indication the density of the water.public boolean checkVolume(float vol)
vol
- Floating point indicating the total cargo volume.
public boolean checkDeadweight(float weight, float dens)
weight
- Floating point indicating the deadweight.dens
- Floating point indication the density of the water.
public java.util.ArrayList<java.lang.Float> getSolution(java.util.ArrayList<java.lang.Float> volumes)
volumes
- ArrayListpublic float getData(ShipParticular particular)
particular
- ShipParticular indicating which particular to get (see enum class ShipParticular).
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |